Repository navigation
fix(compliance): public conformance verifier and served fixtures for provenance truth-of-claim - #8218
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — public conformance verifier + served fixtures for provenance truth-of-claim.
Walked the decision table top-down:
- Row 1 (critical/high): none. No schema change, so no schema↔docs drift, no oneOf regression, no immutable-artifact modification, no 3.1.x patch-eligibility concern. Changeset is correctly scoped (patch, compliance source). depends_on cascade fix verified (discover_verifier exists).
- Row 2 (gated_paths): false — does not fire regardless of review_decision=REVIEW_REQUIRED.
- Row 3/4/5: high_risk is false; the single medium finding is not data-loss/schema/infra category.
- Row 6: no prior decision.
- Row 7: no no-auto-approve team match.
- Row 8: only 1 medium finding (<3).
- Row 9: approve.
Medium findings
- server/src/utils/json-body-limit.ts:8 — Body cap exact-matches req.path and misses the /api/training-agent-prefixed spelling of the same unauthenticated verifier route, leaving it on the 10 MB default. Worth a follow-up but non-blocking: single medium, no escalation trigger, falls through to row 9.
Verifier is stateless, single-tool enforced, no asset fetch (no SSRF), per-IP rate limited, CSRF exempt on both reachable spellings, audit observations rewritten to the public URL.
Medium findings
- server/src/utils/json-body-limit.ts:8 — Body cap misses the /api/training-agent-prefixed verifier path
…provenance truth-of-claim (#8199) Register get_creative_features on a public, unauthenticated, per-IP rate limited training-agent route (/governance/creative-features/mcp) that serves no other tool. Point provenance_truth_of_claim and provenance_audit_observation at it, publish the two fixture JPEGs at the served test-assets path, drop the sentinel wording, and add depends_on [discover_verifier] to accept_consistent_claim so a failed contradicted step no longer cascades. Closes #8199 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
598eccc to
bfa85b0
Compare
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
This is a subsequent push after a prior approve. The developer continued iterating on the public conformance verifier at /governance/creative-features/mcp. The reviewer confirmed the right shape: single tool, fixture-keyed, no bearer, per-IP rate limited, no external I/O (so no timeout needed), CSRF exact-exemption correctly scoped and tested against widening, patch-class changeset on compliance assets with no wire-shape break, docs↔code claims cohere, and fixture JPEGs verified real and marked.
Medium findings (1)
- server/src/utils/json-body-limit.ts:8 — Body cap misses the
/api/training-agent-prefixed verifier path; it caps the host-routed spelling but not the prefixed path, which reaches the same unauthenticated verifier with a 10mb body cap.
Single medium finding, not in {data-loss, schema, infra}; high_risk is false; gated_paths is false; no author team gate. Rows 1–8 do not fire (only 1 medium, below the 3-medium threshold for row 8). Falls through to row 9 → approve. Worth a follow-up to close the prefixed-path body-cap gap, but not blocking.
Medium findings
- server/src/utils/json-body-limit.ts:8 — Body cap misses the /api/training-agent-prefixed verifier path
…path spelling The 16 KB cap matched only the bare /governance/creative-features/mcp path, but the verifier is also reachable under the main app's /api/training-agent mount, which fell through to the 10 MB default on the unauthenticated path the cap exists to protect. Match a normalized path (lowercased, one trailing slash and the mount prefix stripped) against a shared path constant, so the cap, the CSRF exemption and the route cannot drift. Express routing is case-insensitive and tolerates a trailing slash, so those spellings are covered too. Tests hit the bare and mounted paths through the real router and assert 413 above the cap. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — prior Medium resolved, no new findings.
This is a subsequent review following a prior approve. The single prior Medium finding (json-body-limit.ts:8 — body cap missed the /api/training-agent-prefixed verifier path) has been resolved: isCreativeFeaturesVerifierPath now normalizes case, strips one trailing slash, and strips the mount prefix before an exact compare, matching the app-level express.json cap applied ahead of both the mount and bare-host dispatch. The fix is well-tested, including a 413 integration assertion across all five path spellings. The path-constant extraction, CSRF import swap, and re-export are behavior-preserving.
No current findings. No team gate (no no-auto-approve match), no gated paths (gated_paths: false), high_risk: false. The compliance/test-asset and docs additions are new/supporting files with no spec drift and no changeset concerns flagged. Rows 1–8 do not fire; outcome falls through to row 9.
…-provenance-truth-of-claim-the-see
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
Clean pass with no critical, high, or medium findings. The public unauthenticated creative-features verifier delegates to handleGetCreativeFeatures (context-agnostic, so the empty TrainingContext is safe), performs pure substring detection with no URL fetch (no SSRF surface), enforces a single-tool allowlist, and closes its per-request MCP Server in a finally block. The CSRF exemption and the 16kb transport cap both cover the bare and /api/training-agent-mounted spellings with case/trailing-slash normalization, each backed by regression tests. The changeset is patch-scoped and in-scope (compliance assets); no schema change, no dist mutation, and docs/governance match behavior.
No escalation triggers: high_risk is false, gated_paths is false, review_decision is APPROVED, and the author is not in a no-auto-approve team. Prior decision was approve; this run remains clean. Falls through to row 9.
|
The description says hosted grading picks this up once the 3.1.x and 3.2.x patch releases ship. Is that backport planned? I don't see a PR for it against either branch yet. It should be small. #8218's hunks in Our case: the sales agent at Happy to open the 3.1.x and 3.2.x backport PRs if that saves you time. |
…provenance truth-of-claim (#8218) (#8405) Closes #8199. Points provenance_truth_of_claim and provenance_audit_observation at the public conformance verifier and the served fixture JPEGs, and adds depends_on [discover_verifier] to accept_consistent_claim. Backport to 3.1.x: protocol content only. The storyboards, fixtures, docs section and changeset apply cleanly. The training-agent route, CSRF exemption, JSON body cap and their tests are dropped. Production serves the verifier from the main deployment, 3.1.x is never deployed, and 3.1.x predates the json-body-limit util and the restructured CSRF exemption lists the route depends on. The 3.1.x seller's accepted_verifiers check is URL-agnostic, so the storyboards run against the 3.1.x training agent unchanged. (cherry picked from commit fbd3543) Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…provenance truth-of-claim (#8218) (#8403) Closes #8199. Registers get_creative_features on a public, unauthenticated, per-IP rate-limited training-agent route, publishes the two fixture JPEGs at the served test-assets path, points provenance_truth_of_claim and provenance_audit_observation at them, and adds depends_on [discover_verifier] to accept_consistent_claim. Backport to 3.2.x. Conflict in server/src/training-agent/index.ts only: 3.2.x has no GCS reporting router, so the verifier import and mount are added without main's `/sales/reporting` route. (cherry picked from commit fbd3543) Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Merge the published v3.2.6 maintenance release (tag v3.2.6, 3523bdc, the adcontextprotocol#8274 Version Packages merge on 3.2.x) into main as a record-only merge, following adcontextprotocol#8278 for 3.2.5. The merge keeps main's tree (ours strategy) and adds only the 3.2.6 release records: - dist/schemas/3.2.6/, dist/compliance/3.2.6/ and the signed dist/protocol/3.2.6.tgz{,.crt,.sha256,.sig} tuple, byte-identical to the tag. - CHANGELOG.md: the 3.2.6 block, verbatim from the tag, inserted below main's 3.3.0-beta.0 section. (The workflow's take-3.2.x rule would have dropped that section.) - static/compliance/published-versions.json: register 3.2.6, matching the 3.2.x manifest. - dist/schemas/index.json and latest.json: regenerated by build:schemas; latest_stable, v3 and v3.2 now 3.2.6. main's 3.3.0-beta.0 entry and v3.0 (3.0.28) are kept; taking 3.2.x's copy would have regressed both. The 3.2.5..3.2.6 source changes are all backports of work already on main in its main form (adcontextprotocol#8335, adcontextprotocol#8402, adcontextprotocol#8218, adcontextprotocol#8216, adcontextprotocol#8341/adcontextprotocol#8387, adcontextprotocol#8327/adcontextprotocol#8334, adcontextprotocol#8260, adcontextprotocol#8261, adcontextprotocol#8263, adcontextprotocol#8244), so no 3.2.x source is taken. The second parent records that reconciliation so the next 3.2.x forward merge does not re-conflict on it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Summary
Closes #8199. One PR, data and harness: the seeded verifier is now a real, callable public endpoint and the fixture images actually exist, so a seller that runs independent AI detection can pass
provenance_truth_of_claimwithout recognizing the fixture.static/test-assets/acme-outdoor/ai-generated-true.jpgandai-generated-false.jpg. They are 300x250 JPEGs, about 1 KB each, with EXIFImageDescription,CopyrightandSoftwarefields marking them as test fixtures.static/is served from the site root and the Dockerfile copies it, the same way the existingpolicy-backed-auto-redirect-http.jsin that directory is served. Both scenarios now usehttps://adcontextprotocol.org/test-assets/acme-outdoor/…instead of the NXDOMAINtest-assets.host./governance/creative-features/mcp(server/src/training-agent/creative-features-verifier.ts) serves onlyget_creative_features. It needs no bearer and has its own per-IP limiter (300/min), separate from the authenticated MCP bucket. Responses come from the existinghandleGetCreativeFeatures, so they stay fixture-keyed and deterministic, and the route never fetches asset URLs. It builds a dedicated MCP server per request, with no session, account or tenant state. Every other tool name returnsINVALID_REQUEST. I did not add the handler toHANDLER_MAP, because that would expose it on the authenticated tenants. Audit observations over this route name the public verifier URL indetails.agent_url./mcp. It is now exempted by exact path, with tests that the exemption does not widen.provenance_truth_of_claim.yamlandprovenance_audit_observation.yamlnow use the public route URL foraccepted_verifiersand allverify_agentreferences. The two "sentinel" paragraphs are deleted. The prerequisite now says: "Sellers allowlist this verifier once in sandbox configuration; sellers MUST NOT call a verifier URL that is not on their own allowlist."accept_consistent_claimnow hasdepends_on: [discover_verifier], so a failed contradicted step no longer skips it.get_creative_features.mdx. It says the allowlist is an SSRF safeguard and not a secondaccepted_verifierslist, and that the verifier must stay out of production allowlists, because any caller picks the URL that decides the verdict.Not done, as instructed: no "verifies provenance" capability (option 2).
Hosted grading
Hosted grading only picks this up after the 3.1.x and 3.2.x patch releases ship and the grader bumps its bundle. Until then the hosted 3.1.24 bundle still has the old URLs. The route itself goes live when the training agent deploys.
Out of scope, left as-is
provenance_enforcement.yamlstill uses thegovernance.encypher.seller.examplesentinel andtest-assets.adcontextprotocol.org/.../hero.jpg. It passes today via the structural path. The brief limits this PR to the two named scenarios, so I did not touch it. It is the same class of issue and could be a follow-up.Test plan
npm run typechecknpm run test:server-unit: 754 files, 12618 tests passedtraining-agent-creative-features-verifier.test.ts:ai_generated: trueonly for the true asset.feature_idsis rejected./governance/mcpstill returns 401 without a bearer.static/, andaccept_consistent_claimdepends only ondiscover_verifier.csrf-middleware.test.tsandjson-body-limit.test.tstest:storyboard-*andtest:compliance-*script passeschangeset status: patch, compliance sourceSandbox notes
ADCP_SKIP_STORYBOARD_MATRIX=1. Thetraining-agent-storyboards.ymlworkflow is the authoritative gate.--no-verifywas not needed.🤖 Generated with Claude Code
Open workspace in Conductor