You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security(agent): ripr agent receipt and verify accept fabricated input — no head binding, no signature, no re-execution #1941
Three compounding trust gaps in the repair receipt loop:
ripr agent verify (commands.rs:210-225) does NOT re-run any test. It reads two JSON snapshot files and computes static movement. No schema_version, sha256, or git binding is checked on inputs.
ripr agent receipt (commands.rs:227-274) accepts any hand-authored agent-verify.json. Provenance carries sha256s but no commit binding, no signature. A fixer can fabricate agent-verify.json with any movement they like.
ripr receipt write (app/receipt.rs) — current_head is optional and only format-validated (40 hex). Never compared to git rev-parse HEAD. A receipt can be stamped with any SHA.
Impact
A malicious or compromised agent can fabricate a receipt that looks like valid repair evidence. The advisory status and safe_to_merge=false in the output provide some mitigation, but downstream consumers that treat the receipt as proof of testing are deceived.
Fix
ripr agent verify should validate that snapshots were produced by ripr (check schema_version, check provenance head_sha against git rev-parse HEAD).
ripr receipt write should bind current_head to the actual HEAD (resolve via git rev-parse, not just format-check).
Consider a content-hash commitment: the receipt should hash the actual analysis artifacts, not just accept whatever the caller provides.
Evidence
commands.rs:210-225 — verify reads JSON files, no re-execution
commands.rs:227-274 — receipt accepts any verify-json
app/receipt.rs:38,263 — current_head optional, format-check only
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
The receipt fix must not recreate an exact-head merge doctrine. #1977–#1979 remain the implementation sequence for artifact provenance, assurance vocabulary, and explicit command execution. New #2023 separately defines PR-revision evidence plus current-main compatibility for squash merges.
For this issue, an artifact/receipt must be bound to the repository revision and analysis input it actually represents; a currentness claim may compare that revision with the invocation's selected repository state. That is distinct from requiring a PR branch to be rebased onto the latest main or expecting the final squash SHA to equal the reviewed PR head.
Bounded provenance floor is in PR #2228: #2228 (head 40f6350). The canonical receipt writer now resolves actual Git HEAD, emits it when omitted, and rejects mismatched caller assertions. Focused receipt tests and applicable policy/traceability checks pass. This does not complete #1941: artifact/config/root binding, command execution, result commitments, and receipt issuance validation remain follow-up slices under #1979.
Receipt trust slice completed in PR #2254 at exact head d6ce2e4 (pending required approving review before merge). The app-layer validator now confines and validates before/after artifacts, checks repository artifact identity and comparability, recomputes canonical agent-verify output, rejects fabricated/tampered/mismatched verify JSON with tagged errors, and passes validated parsed data into rendering. Local precommit, output-contract, generated-state, format, focused tests, clippy, traceability, spec-format, and diff checks passed; hosted required and auxiliary checks passed. This slice does not yet execute producer-issued verification commands, bind receipts to an execution run, add signatures, or complete replay/current-head policy beyond the existing artifact checks; issue #1941 remains open for those follow-ups.
Partial delivery in flight on PR #2254 (branch security/receipt-verify-inputs-1941, head 8aed51f5).
Landed on the branch so far
ripr agent receipt revalidates the bound before/after repo-exposure artifacts and recomputes canonical agent verify movement before rendering a receipt; fabricated or altered verify JSON is rejected (aecefc95).
Reject causes are tagged (malformed, path, artifact_read, artifact, incomparable_base_revision, incomparable_analysis_inputs, movement_recompute, canonical_render, not_canonical) instead of one opaque string (32443654) — addresses the opposition review finding.
Validation lives in app/agent_receipt.rs, not the CLI layer (d6ce2e46) — addresses the architecture review finding.
Canonical comparison is byte-exact (trailing-newline tolerant), not parsed-Value equality: compact re-serialization of real verify output is rejected, closing the codex P1 (8aed51f5, plus regression test agent_receipt_rejects_rerendered_verify_json; cli_smoke agent_receipt_ 7/7 green, clippy/fmt green).
Head binding / signature / re-execution aspects beyond canonical-input validation: assess what this PR does NOT cover once merged and record the residual here.
status/partial applies only once the PR merges; holding status/needs-work until then.
Fix 3 (content-hash commitment over analysis artifacts) — the issue's own "Consider" item. Partially covered by the canonical-byte validation + provenance sha256s, but no explicit artifact-hash commitment in the receipt. Needs a scoped decision: implement as a bounded additive receipt field, or record as a non-goal.
Keeping status/partial until the Fix-3 decision lands. Next owner: whoever picks up the receipt-hardening lane; the decision is one ADR-sized call, not new machinery.
Resolved — HEAD binding implemented and tagged #1941 in app/receipt.rs:114-118,350-365. Writer resolves real HEAD via git rev-parse and rejects mismatches. Regression test at receipt.rs:1356. Verify path in verification_execution.rs:334-380 captures head_before/after.
Activity
coderabbitai commentedon Jul 19, 2026
🔗 Related PRs
#1670 - perf(review-comments): emit bounded phase receipts [merged]
#1714 - audit(goals): add fail-closed authority audit framework [merged]
#1827 - feat(receipt): add current_head to receipt JSON output [merged]
#1858 - fix(lsp): preserve diagnostic budget evidence [merged]
#1861 - feat(lsp): define versioned agent protocol contract [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
EffortlessSteven commentedon Jul 19, 2026
Receipt/verification trust slices
verifycannot imply hidden test execution.The sequence is provenance → vocabulary/CLI contract → explicit execution. Static-only receipts remain useful but must remain visibly lower assurance.
EffortlessSteven commentedon Jul 19, 2026
Identity boundary clarification
The receipt fix must not recreate an exact-head merge doctrine. #1977–#1979 remain the implementation sequence for artifact provenance, assurance vocabulary, and explicit command execution. New #2023 separately defines PR-revision evidence plus current-main compatibility for squash merges.
For this issue, an artifact/receipt must be bound to the repository revision and analysis input it actually represents; a currentness claim may compare that revision with the invocation's selected repository state. That is distinct from requiring a PR branch to be rebased onto the latest
mainor expecting the final squash SHA to equal the reviewed PR head.security(cli): confine agent brief --files paths to the workspace (#2100
EffortlessSteven commentedon Jul 22, 2026
Bounded provenance floor is in PR #2228: #2228 (head 40f6350). The canonical receipt writer now resolves actual Git HEAD, emits it when omitted, and rejects mismatched caller assertions. Focused receipt tests and applicable policy/traceability checks pass. This does not complete #1941: artifact/config/root binding, command execution, result commitments, and receipt issuance validation remain follow-up slices under #1979.
EffortlessSteven commentedon Jul 22, 2026
Receipt trust slice completed in PR #2254 at exact head d6ce2e4 (pending required approving review before merge). The app-layer validator now confines and validates before/after artifacts, checks repository artifact identity and comparability, recomputes canonical agent-verify output, rejects fabricated/tampered/mismatched verify JSON with tagged errors, and passes validated parsed data into rendering. Local precommit, output-contract, generated-state, format, focused tests, clippy, traceability, spec-format, and diff checks passed; hosted required and auxiliary checks passed. This slice does not yet execute producer-issued verification commands, bind receipts to an execution run, add signatures, or complete replay/current-head policy beyond the existing artifact checks; issue #1941 remains open for those follow-ups.
EffortlessSteven commentedon Jul 22, 2026
Partial delivery in flight on PR #2254 (branch
security/receipt-verify-inputs-1941, head8aed51f5).Landed on the branch so far
ripr agent receiptrevalidates the bound before/after repo-exposure artifacts and recomputes canonicalagent verifymovement before rendering a receipt; fabricated or altered verify JSON is rejected (aecefc95).malformed,path,artifact_read,artifact,incomparable_base_revision,incomparable_analysis_inputs,movement_recompute,canonical_render,not_canonical) instead of one opaque string (32443654) — addresses the opposition review finding.app/agent_receipt.rs, not the CLI layer (d6ce2e46) — addresses the architecture review finding.8aed51f5, plus regression testagent_receipt_rejects_rerendered_verify_json;cli_smoke agent_receipt_7/7 green, clippy/fmt green).Remaining before this issue can close
run_agent_receipt; conflict is mechanical), push, thread resolution, merge.status/partialapplies only once the PR merges; holdingstatus/needs-workuntil then.EffortlessSteven commentedon Jul 22, 2026
#2254 merged (
2d3171c1, required checkRipr Rust Small ResultSUCCESS at head62255ea4, 6/6 review threads resolved).Delivered (merged to main)
ripr agent receiptrevalidates the bound before/after repo-exposure artifacts and recomputes canonicalagent verifymovement before rendering; fabricated, altered, incomparable, or re-rendered verify JSON is rejected with tagged causes (malformed,path,artifact_read,artifact,incomparable_base_revision,incomparable_analysis_inputs,movement_recompute,canonical_render,not_canonical).app/agent_receipt.rs::validate_agent_receipt_verify_json; single read/parse per artifact; CLI consumes the validated struct.Residual acceptance not covered by #2254 (next owner: unassigned)
agent verifymovement is recomputed from the bound artifacts, but proof commands named in the receipt are not re-executed.Applying
status/partial: a bounded portion (canonical-input validation) has merged; the residual above remains open and actionable.security(receipt): bind current_head to actual git HEAD (#1941)
security(receipt): bind current_head to actual git HEAD (#1941) (#2275)
EffortlessSteven commentedon Jul 23, 2026
Evidence-bound reconciliation (all-state PR search attached).
Delivered and verified on main
current_headbound to actual HEAD) — security(receipt): bind current head to repository #2228 (bind current head to repository, merged 2026-07-22) and security(receipt): bind current_head to actual git HEAD (#1941) #2275 (bindcurrent_headto actual git HEAD viagit rev-parse, merged 2026-07-23 as 2b56f1b;crates/ripr/src/app/receipt.rsresolves HEAD through a bounded git probe with a process-allowlist entry).agent verifyrejects any snapshot that is not the byte-exact canonical output of ripr (schema_version + canonical-byte comparison + downstream parse from the canonical body), closing the hand-authored-JSON gap statically. feat(verify): add provenance-bound execution result contract #2232 added the provenance-bound execution result contract.Residual
Keeping
status/partialuntil the Fix-3 decision lands. Next owner: whoever picks up the receipt-hardening lane; the decision is one ADR-sized call, not new machinery.EffortlessSteven commentedon Jul 23, 2026
Residual closeout sequence after the landed provenance/contract work
The original defect is now partially fixed, but the parent remains open because RIPR still lacks a producer-controlled execution-and-issuance path.
New bounded slices:
CommandSpecunder bounded process/network/output/currentness policy and emit the landedVerificationExecutionResultV1contract;RepairReceiptV2only after revalidating/recomputing static movement and validating any optional execution result;Already-landed prerequisites remain authoritative: #1977/#2203 artifact provenance, #1978 assurance vocabulary, #2232 execution-result contract, #2218 command-spec population, #2228 actual-HEAD binding, and #2254 canonical verify-input validation.
Sequence: #2332 → #2333 → #2334 → close #1941. Static-only receipts remain useful but visibly lower assurance throughout; no signing, correctness, mutation-adequacy, or merge-approval claim is introduced.
fix(output): document --root/--current-head in receipt help + replace…
fix(output): document --root/--current-head in receipt help + replace…
security(receipt): fail-closed on absent/unrecognized movement — defa…
security(receipt): fail-closed on absent/unrecognized movement — defa…
security(receipt): fail-closed on absent/unrecognized movement — defa…
test(receipt): add HEAD-binding tests for #1941 security check (#2329)
test(receipt): add HEAD-binding tests for #1941 security check (#2329) (
EffortlessSteven commentedon Jul 28, 2026
Current-main reconciliation
Verified against:
13fd9032f2b0e1a7dcbafe9c3868cad19a6a2a54Delivered
Still outstanding
Evidence
365f7d61e27fd441e997e6e17e3f3e28859a3964Current disposition
status/partialEffortlessSteven commentedon Aug 1, 2026
Resolved — HEAD binding implemented and tagged #1941 in
app/receipt.rs:114-118,350-365. Writer resolves real HEAD via git rev-parse and rejects mismatches. Regression test at receipt.rs:1356. Verify path inverification_execution.rs:334-380captures head_before/after.