Repository navigation
fix(review): stop forged proof headings in model prose from flipping PR verdicts - #1048
Merged
Merged
Conversation
Contributor
Author
|
Follow-up for the residual legacy-record bypass described in the Limits section: #1049 |
ostehost
pushed a commit
to ostehost/clawsweeper
that referenced
this pull request
Aug 7, 2026
…PR verdicts (openclaw#1048) * fix: prevent report section spoofing * fix: close report metadata injection paths * fix: fail closed on ambiguous report metadata * fix: reject ambiguous report line metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #951.
A forged
## Real Behavior Proofblock inside model-authored prose (echoed from an attacker-controlled PR body into the report summary) flipped a PR's proof verdict from blocked to sufficient, routing unproven external PRs into the automated repair lane. Verified against shippeddist/entry points in all four shapes: bare, fenced,<details>, HTML comment.What changed
Write side (
clawsweeper-decision-parser.ts): every model-authored prose field that lands in a report section body now passes throughneutralizeOwnedSectionSpoofing(summary, changeSummary, bestSolution, risks, evidence, label justifications, merge-risk options, review metrics, owners, findings, security concerns). Structural metadata scalars (file paths, SHAs, commands, commit lists) are single-line-enforced so a newline cannot smuggle a heading or front-matter line.clawsweeper-report-helpers.tsadditionally normalizes U+2028/U+2029 line separators before per-line heading checks.Read side (protects already-published unescaped reports, re-read every sweep cycle): front-matter reads are bounded to the leading
---block, duplicate/empty keys report as ambiguous, and proof/rating readers treat ambiguous or out-of-enum metadata asmissing+ needs-contributor-action — verdicts can only get stricter, never looser. The duplicate legacy readers insrc/repair/workflow-utils.tsandsrc/repair/create-job.tsnow prefer validated bounded front matter over section text and fail closed (no promotion) on invalid metadata.Real Behavior Proof
dist/production entry points (parseDecision,reviewAutomationMarkersFromReport, report proof/rating readers), no mocks.summarycarries a forged## Real Behavior Proofblock claiming sufficient, while genuine metadata says missing,pr_rating_overall: F,work_candidate: queue_fix_pr; all four forgery shapes.routing=clawsweeper-verdict:needs-changes clawsweeper-action:fix-required,proof=diamond lobster (5/6)— 4 of 21 driver assertions fail.routing=clawsweeper-verdict:needs-human,proof=unranked krab (1/6), no fix-required marker — 4/4 variants pass; the driver is kept as regression tests.pnpm run build:all, focused suites 162/162, fullpnpm run check3,155 pass / 0 fail (9 platform skips),pnpm run lint,pnpm run format:check; independent rerun of the four focused suites: 101/101.---inside a model scalar that early-terminates the apparent leading front-matter block; fixing that requires a versioned report-format sentinel and legacy invalidation/rereview — tracked separately (see follow-up issue linked in comments).Codex autoreview on the committed branch: clean, no accepted or actionable findings.