fix(runner): prevent NUL content scan bypass - #43
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 14, 2026, 3:54 PM ET / 19:54 UTC. ClawSweeper reviewWhat this changesThe PR normalizes inspectable NUL-containing files for static scanning and judge prompts, records opaque binary omissions, and adds documentation and regression coverage. Merge readiness⛔ Blocked until real behavior proof is added - 3 items remain Keep open. Current main still silently omits NUL-containing files from the static scan path; this focused patch addresses that boundary without a source-level correctness finding. Before merge, it needs observable after-fix proof rather than only asserted command results. Priority: P1 Review scores
Verification
How this fits togetherClawScan’s built-in static scanner reads local skill or plugin files and writes raw JSON evidence, which can then be included in an external judge prompt. This change decides whether NUL-containing input is decoded and scanned or retained as an opaque omission, affecting both findings and judge context. flowchart LR
A[Skill or plugin files] --> B[Static scanner and prompt renderer]
B --> C{NUL bytes present?}
C -->|No| D[Scan original text]
C -->|Inspectable text| E[Normalize or decode content]
C -->|Opaque binary| F[Omission with policy evidence]
E --> G[Static findings and judge prompt]
D --> G
F --> G
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Add a redacted built-CLI transcript that demonstrates the NUL-split detection, a judge prompt free of raw NUL bytes, opaque-image omission evidence, and successful BOM-text scanning, then merge this narrow repair. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible with high confidence: current main omits a file immediately upon finding a NUL byte, and the branch’s focused tests encode the affected input shapes. This read-only review did not execute the reproduction. Is this the best way to solve the issue? Yes, the shared inspection helper is a narrow solution because it preserves original scan accounting while making inspectable NUL content visible to both rules and judges; the remaining requirement is real after-fix proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9f6a6fbb9f11. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
Proof
TMPDIR=<canonical /private/tmp directory> go test -count=1 ./...go vet ./...make docs-sitecurltriggered bothstatic.nul_byte_in_textandstatic.pipe_to_shell; the judge received normalized text without a raw NUL; opaque PNG content remained omitted withstatic.opaque_binary; clean text remained finding-freeReported by @nedlir — thank you for the clear reproduction and root-cause analysis.
Closes #42