Repository navigation
[MCP contract security 2/2] Verify and sign MCP trust baselines - #804
salmonumbrella wants to merge 10 commits into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b46e28129
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6b46e28 to
59b05f2
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Extend existing tool pinning with complete bounded snapshots, conservative contract differences and credential-safe descriptor audits. Bind approval to the reviewed inventory, connection identity, scope and current source/store. Share explicit revision-bound acceptance across CLI and local dashboard API, harden discovery transports and preserve full exact-number review text. Document threat boundaries and independently authored prior-art provenance. Tests are authored but unrun: required local devcontainer is unavailable. Remote CI and review must verify compilation and runtime behavior.
Preserve credential-free project root identifiers exactly so dashboard checks associate the right project and approvals submit the selected scope. Continue redacting credential-bearing roots after refusing their review, and escape controls at presentation boundaries. The rebased feature already rejects numeric credential lexemes in both contract and live checks and excludes disabled project entries from strict observation failures; their regression coverage remains in the feature commit.
Remove unreachable and duplicated scenarios, retain unique credential and scope checks, and use valid server fixtures. Exercise real control runes in JSON output and consolidate dashboard refusal and localization cases.
Combine remaining scope, persistence, status and contract cases into shared tables while preserving distinct behavior checks and reachable fixtures.
Resolve the stdio working directory before launch and bind that same path into the review identity, so retargeted symlinks cannot reuse approval. Reject unresolved directories before starting a server. Parse HTTP media types to handle case and parameters in event streams and discovery errors. Exercise both cases and remove the disclaimer-only UI test.
Describe the complete contract snapshots stored in tool-pins.json and warn that their text may be sensitive. Keep the existing translated file maps consistent.
Fingerprint the explicit transport, credential references, tool policy and native options without target selection or disabled state. Client selection changes can then retain an unchanged contract approval.
Keep the live review, explicit revision approval and fresh unchanged check as the CLI integration boundary while leaving detailed drift and logging coverage to their owning tests.
Remove the unsupported disabled entry with an active connection while retaining identity and approval coverage for valid target changes.
Authenticate the complete atomic MCP baseline envelope with an external Ed25519 verifier. Require explicit unsigned migration, bind the full proposal and public anchor to review, and preserve every unselected record as legacy evidence. Keep byte-stable verified no-ops under the existing lock and CAS. Add independently authored standard-library regression/property fixtures with ephemeral keys. Translate all six signing refusal messages in every dashboard locale and cover the Persian signed-store refusal without changing sanitization of untrusted text. Runtime tests, builds and full gates were not run locally because the required devcontainer is unavailable; remote CI remains the runtime gate.
59b05f2 to
a642eef
Compare
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Thanks for all the work you've put into these. A lot of large PRs have arrived at once, more than I can take in right now, so I need to go through them slowly. I can't promise a date, but I'll get to them. |
Stacks on #803
Type
proposals/only)Linked Issue
Refs #789 and design note #802. Merge order: contract review first, signing second. This PR's own commit is
a642eef544fb2fb49126cac282b4d50165d46c07; its parent is47646362cfebcb4073a631b47341bb57871ed5d1. The upstream-main diff also includes the unmerged first slice.What changed
Why
Contract hashes can explain drift, but an attacker who can rewrite unsigned state can also recompute its hashes. An independently trusted public key lets operators detect altered baseline contents without treating a key committed beside the state as a trust anchor.
Usage
With an existing Ed25519 PKIX public key and matching PKCS8 private key:
For an existing unsigned store, add
--sign-unsignedto both the explicit preview and acceptance. That migration signs the selected approved record and preserves every other record aslegacy-unsignedevidence requiring its own review. A missing store does not need migration. A signed store needs--verify-keyon every live check, and a matching signer on every acceptance, including a no-op.The first slice's conservative recognized-credential overlap rules still apply, including short resolved values; signing does not bypass them.
The dashboard has no key inputs and cannot approve signed stores. It reports that CLI verification is required. Keys are never created automatically, saved to MCP configuration or included in probe arguments, reports or logs. Private key files require safe Unix mode bits; Windows ACL validation is not implemented.
Threat model and limits
Verification authenticates the complete saved payload, including other scopes and retained legacy evidence. It does not attest the MCP implementation, mediate calls, protect a compromised external key, or detect rollback to an older valid signed store. Removing a signature and omitting the external verification requirement can look like unsigned state; the trusted verifier must remain outside attacker-writable state and be supplied on protected checks.
Signing uses a domain-separated native envelope, not PIN-SPEC signature interoperability. Independently authored standard-library Go, with RugSnare (Apache-2.0) as the primary design reference and Tirith (AGPL-3.0) for concepts only. No source, translated code, fixtures or golden vectors from either project are copied.
Verification
Ready for review at
a642eef544fb2fb49126cac282b4d50165d46c07, rebased onto #803 head47646362cfebcb4073a631b47341bb57871ed5d1. This now includesdbcc5726, which checks numeric JSON credential leaves in both contract and connection-identity walks, plus the later #803 safety fixes. The signing delta is preserved; the sole rebase conflict kept the base's consolidated CLI fixtures and the signing flag tests.git diff --checkandpython3 scripts/ai-context.py checkpassed. Independent Terra and Sonnet five-pass source reviews cleared the signing integration without confirmed findings. Exact-head Nix run 43156835137, unit/race, Windows, Ubuntu integration and redteam stages in Test run 43156835136 passed. Both numeric regressions passed. macOS integration and Docker-offline also passed; every executed check is green. Docker-online and redteam-signal are workflow skips. No roborev-ci workflow/check is currently exposed.No local tests/builds, Docker, real signing runbook, property suite, frontend tooling or website build were run during this feedback pass. CI is the runtime gate. Maintainer feature approval remains pending.
Checklist
make check) — equivalent context, Herdr, formatting, vet, unit/race and Ubuntu integration CI stages passed ona642eef5; all executed checks are green