Skip to content

feat(mcp): add caller nonces and independent attestation verification - #80

Merged
kryptocodes merged 1 commit into
mainfrom
codex/mcp-agent-verification
Sep 9, 2026
Merged

feat(mcp): add caller nonces and independent attestation verification#80
kryptocodes merged 1 commit into
mainfrom
codex/mcp-agent-verification

Conversation

@AbdulRashidReshamwala

@AbdulRashidReshamwala AbdulRashidReshamwala commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

User description

Agents could retrieve an attestation document but could not supply their own challenge, and attested: true described successful retrieval rather than independent verification. Require a caller-generated nonce and provide a verifier that runs locally against separately trusted deployment policy.

Changes:

  • verify_runtime requires a fresh 32-byte caller nonce, encoded as 64 lowercase hex characters. Missing or invalid challenges fail before any request; there is no server-generated fallback.
  • Replace attested with evidence_available and verification.status: "not_performed". Return fixed Google discovery/JWKS references, expected claims, the image-binding algorithm, policy requirements, and claims established by successful verification.
  • Add a dependency-free Node verifier for Google RS256 signatures, token times, caller challenge, image hash, pinned image references, audience, project, zone, exact instance name, hardware and secure boot. Optional service-account policy is enforced when configured; current live tokens omit account claims.
  • Document the verification steps and what success establishes: Google-signed platform claims and nonce-bound, orchestrator-reported image identities satisfy the approved policy.

Compatibility: this changes the MCP tool contract. Clients must refresh tool discovery, supply a nonce, and consume the replacement output fields. The hosted service is not deployed by this PR.

Validation:

  • 78 MCP tests and 20 standalone verifier tests pass; CI now runs the verifier tests.
  • Live test: generated and retained the nonce locally, obtained a fresh browser proof, fetched Google keys locally, and verified against policy assembled separately from authenticated Kubernetes pod/node inventory. Signature, nonce, image binding and required policy checks passed; test session cleaned up.
  • Independently reviewed by a subagent with no blocking findings.
  • Commit SSH-signed under Abdul Rashid's Git identity.

PR Type

Enhancement, Tests, Documentation


Description

  • Require caller-generated nonce for runtime evidence retrieval

  • Replace retrieval-based attestation status with evidence availability

  • Add independent Google RS256 proof verifier

  • Document trusted policy requirements and verification limits


Diagram Walkthrough

flowchart LR
  Caller["Caller retains fresh nonce"]
  MCP["MCP retrieves nonce-bound evidence"]
  Proof["Runtime v3 proof"]
  Verifier["Local independent verifier"]
  Policy["Separately trusted policy"]
  Caller -- "supplies nonce" --> MCP
  MCP -- "requests" --> Proof
  Proof -- "returns evidence" --> Verifier
  Policy -- "defines trusted identities" --> Verifier
Loading

File Walkthrough

Relevant files
Tests
4 files
attestation-tool.test.ts
Test nonce-required runtime evidence tool contract             
+47/-0   
popcorn.test.ts
Test caller nonce evidence retrieval behavior                       
+30/-8   
oss-ci.yml
Run independent attestation verifier tests                             
+3/-0     
verify.test.mjs
Test signature claims policy and bindings                               
+62/-0   
Enhancement
4 files
attestation.ts
Define nonce validation and verification guidance               
+49/-0   
popcorn.ts
Retrieve runtime proofs using caller nonce                             
+4/-4     
tools.ts
Update runtime verification tool schema and output             
+21/-7   
verify.mjs
Add local Google attestation proof verifier                           
+122/-0 
Documentation
2 files
README.md
Document independent proof verification workflow                 
+100/-0 
README.md
Document breaking runtime verification contract                   
+14/-8   

@reclaim-pr-agent reclaim-pr-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Reclaim PR Agent after an automated GPT-5.6 Terra review.

@reclaim-pr-agent

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@reclaim-pr-agent

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@reclaim-pr-agent reclaim-pr-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Reclaim PR Agent after an automated GPT-5.6 Terra review.

@AbdulRashidReshamwala
AbdulRashidReshamwala force-pushed the codex/mcp-agent-verification branch from 26f3978 to 51acba7 Compare September 9, 2026 23:11

@reclaim-pr-agent reclaim-pr-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Reclaim PR Agent after an automated GPT-5.6 Terra review.

@kryptocodes
kryptocodes merged commit d378e38 into main Sep 9, 2026
18 checks passed
@kryptocodes
kryptocodes deleted the codex/mcp-agent-verification branch September 9, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants