Repository navigation
fix(scanner): unblock reviews of generated Git metadata - #1601
Conversation
Keep the complete primary scan and require canonical Git object witnesses before requesting a supplemental patch scan. Mask only witnessed metadata fields at their original lengths so native decoding must independently clear matching content before review admission. Preserve verified-result, completion, source-fence, and cleanup gates. Exercise the original dependency source range and synthetic encoded-content counterexamples with the pinned native scanner.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 7:19 AM ET / 11:19 UTC (Revision 5). ClawSweeper reviewWhat this changesThe scanner verifies generated Git blob IDs and rescans a metadata-masked patch before allowing otherwise blocked reviews to proceed. Merge readiness✅ Ready for maintainer review The PR remains necessary: current main still rejects generated Git metadata findings. No actionable introduced defect remains, and the recorded native proof and current-head validation support maintainer review. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper scans prompts, schemas, Git changes, and complete source blobs before starting a review agent. This admission gate blocks sensitive or incompletely scanned input from reaching the model. flowchart TD
A[Prompt and complete Git inputs] --> B[Primary native scan]
B --> C[Classify findings]
C --> D[Verify Git metadata witnesses]
D --> E[Scan metadata-masked patch]
E --> F[Completion and source checks]
F --> G[Admit review]
C --> H[Refuse unsafe input]
E --> H
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain the complete primary scan and narrowly admit proven metadata only after independent native replay clears the unchanged content. Do we have a high-confidence way to reproduce the issue? Yes: current main explicitly rejects detector-58 patch findings, and the recorded native run demonstrates the original refusal. This review verified the source path without executing it. Is this the best way to solve the issue? Yes: sharing the blob witness and requiring native replay is a narrow repair that avoids guessing decoded coordinates. The documented mixed URI/metadata limitation preserves an existing refusal rather than expanding fixture policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 02cd682921ca. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review The current head's full CI has passed. The PR body now records that result, the unchanged-head coverage-collection retry, and the separate local loopback-test limitation. Runtime source and native behavior proof are unchanged. |
|
🦞👀 Re-review progress:
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(scanner): unblock reviews of generated Git metadata This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
What Problem This Solves
Fixes review refusals when the native scanner mistakes generated Git blob IDs for credentials, including the dependency update in openclaw/openclaw#149908.
User Impact
Updates containing only these generated metadata findings can reach review. A conditional second native scan uses the existing deadline and staging limit.
The same-file combination of metadata findings and an already-reviewed unchanged URI fixture can still refuse when masked headers cannot satisfy the URI witness parser. Those cases were already blocked; URI-only reviews retain their existing single scan. This change does not expand that fixture policy.
Why This Change Was Made
The scanner owner binds each eligible complete object ID to canonical raw-diff and patch fields, matching endpoints, paths, regular-file modes, and independently rehashed blobs. A matching value in any full blob, prompt, schema, additional input, or raw working bytes refuses classification.
These witnesses only request proof. HTML decoding can reconstruct the same value from source content and borrow a detector keyword from the patch filename, so a value found in a header does not prove where a decoded finding originated. The owner therefore scans a second complete patch copy with only proven metadata fields masked at their original lengths. Its actual masked bytes are retained; filenames and content are unchanged. Any remaining unclassified finding, verified result, metadata-proof request, native error, incomplete completion, or source drift blocks admission.
The complete primary patch, raw diff, full blobs, prompt, schema, and additional input remain scanned unchanged. There are no detector exclusions, new settings, decoder reimplementations, gate bypasses, or deployments.
OpenClaw Bay Impact
Bay is unaffected: this changes scanner admission and host stderr notices, without changing dashboard data or action surfaces.
Documentation Impact
Updated the active README safety contract, active reproducible proof guide, and Unreleased changelog. The scanner admission owner and pinned native implementation remain the source of truth. Requalify this proof when the scanner version, metadata witness, staging, or admission flow changes.
Evidence
pnpm check, Windows launcher, network smoke, and sparse-build checks. CodeQL passed. The full check succeeded on an unchanged-head retry after the first attempt passed all 6,253 active tests but hit an empty Node coverage-profile error during collection; no coverage gate was changed.ECONNRESET, and 36 skipped. Both consumers passed isolated reruns, and their fixed-profile requests do not invoke the scanner. The exact transport cause is unproved. A separate harness follow-up is to consume the unauthorized-claim response bodies inscripts/e2e/command-proof-consumer-loopback.mjs; this missing cleanup is not claimed as the cause of those resets.Real Behavior Proof
Claim and surface: the real
scanAgentInputflow admits generated metadata without clearing matching decoded source content. No model is invoked by the proof.Environment: macOS 27 arm64, Node 24.21.0, pnpm 12.4.1, checksum-qualified TruffleHog 3.97.4. The current native release still has the upstream metadata false-positive tracked in trufflesecurity/trufflehog#3266.
Command:
Observed results: the unchanged trusted scanner owner refused the original complete source range with 16 metadata findings. The corrected owner admits that same range with two metadata notices after its supplemental scan.
Trace and limits: the committed proof script writes the native classification/diagnostic JSON used for this matrix. Encoded fixture blobs contain no literal object ID, and their filename supplies the detector keyword. The tag-split case proves why an independent replay is required instead of guessed decoded line offsets. Output contains safe classifications and digests, never matched values. This controlled proof does not replace the hosted review's own prompt/schema/source scan.