Skip to content

[adversarial test — do not merge] forged receipt.json vs broken build - #5

Closed
yebiguo wants to merge 2 commits into
v0.2-github-actionfrom
test/forged-receipt
Closed

[adversarial test — do not merge] forged receipt.json vs broken build#5
yebiguo wants to merge 2 commits into
v0.2-github-actionfrom
test/forged-receipt

Conversation

@yebiguo

@yebiguo yebiguo commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Adversarial test for v0.2 Day 3: this branch commits a forged .proofrun/receipt.json claiming build/test/vet all PASS (with a fingerprint matching this exact commit, so it is not STALE), while internal/ci/broken_adversarial.go actually fails to compile. If action.yml is working correctly, the dogfood run here must report a real FAIL for build, not the forged PASS. This PR will be closed without merging once verified.

@yebiguo

yebiguo commented Aug 13, 2026

Copy link
Copy Markdown
Owner Author

Adversarial test confirmed: action.yml correctly ignored the forged all-PASS receipt.json and reported the real build failure (job exit 1). See run https://github.com/yebiguo/ProofRun/actions/runs/31723398795 for the log. Closing without merging — this branch only existed to prove the defense.

@yebiguo yebiguo closed this Aug 13, 2026
@yebiguo
yebiguo deleted the test/forged-receipt branch August 13, 2026 17:00
yebiguo added a commit that referenced this pull request Aug 16, 2026
…enario

TestStatusStrict_HandEditedReceipt_NeverShowsForgedPass — the
subprocess/binary version of the scenario already proven at the unit
level (internal/receipt.TestLoad_DropsHandEditedEntryEvenWithMatchingFingerprint)
and, before that, manually against a real build during Day 2. Builds
the actual compiled binary, records a genuine signed FAIL via a real
`run-all`, hand-edits receipt.json's status/exit_code fields to fake a
PASS while leaving the signature untouched — exactly how a naive
attacker or an AI agent unaware of signing would edit the file — then
confirms `status --strict` exits non-zero and shows NOT RUN, never the
forged PASS.

Confirmed this actually tests something: temporarily neutered
verifySignature to always return true (simulating what pre-Day-2 code
effectively did) and watched this test fail with the forged PASS
trusted, exit 0. Restored the real implementation before committing.

Mirrors v0.2's PR #5 adversarial-test methodology, closing the path
v0.2 didn't: no GitHub Action, no rm -rf .proofrun/, just a local
`status --strict` reading whatever's on disk — the exact scenario a
pre-commit hook like portfolio-tracker's exercises in real usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant