fix(review): recognize approved Browser redaction fixtures - #1332
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 5:59 AM ET / 09:59 UTC. ClawSweeper reviewWhat this changesAdds two approved synthetic Browser credential-fixture digests at three exact OpenClaw test paths and keeps review admission fail-closed for every other finding. Merge readinessKeep open for maintainer landing review: current main does not contain the Browser fixture entries, while the PR’s exact digest/path/mode checks and native before/after scanner trace support the intended narrow repair. No introduced correctness defect was found. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper scans complete pull-request source with TruffleHog before a model can inspect it. The fixture classifier may recognize reviewed synthetic test values, then emits sanitized notices and permits the review; all other secret-shaped findings still stop admission. flowchart LR
A[Pull request source] --> B[Native secret scan]
B --> C[Fixture classifier]
C --> D{Exact digest, path, and mode match?}
D -->|Yes| E[Sanitized admission notice]
E --> F[Codex review starts]
D -->|No| G[Review admission refused]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the narrowly scoped fixture classification while preserving fail-closed admission for any unapproved digest, path, mode, detector result, or scan state. Do we have a high-confidence way to reproduce the issue? Yes: the current PR body records a production-owner before/after run in which the baseline refused the Browser fixtures and the candidate admitted only the approved pairs while rejecting executable mode. Is this the best way to solve the issue? Yes: fixed digest, exact source path, regular-file mode, literal-line, and scanner-contract checks are the narrowest maintainable way to classify known synthetic fixtures without weakening general secret detection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b056c0ab1510. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…enclaw#1333) Prepare complete pinned Git source independently of API context and cache eligibility. Remove duplicate API file/status mapping and retain the scanner’s identity, size, and refusal boundaries. Real public PR1070 partial-clone replay changes from incomplete_source to a passed production scan after fetching248missing blobs. Current-head AWS full check4252passed/14skipped plus13focusedcoverage; CI/CodeQL/Windows/sparse checks and managed reviews passed. Maintainer accepts the documented bounded hydration cost.
Require a readable trusted author before adopting or updating repair status comments. Share the predicate while preserving the router and executor allowlists and case-insensitive untrimmed matching. Missing author metadata deliberately fails closed. The controlled before/after probe covered 12 author scenarios and 103 production-boundary calls per phase. Current-head CI and CodeQL pass; full AWS check passed4253 tests with14 skips, plus13 focused coverage tests. Managed review and the fresh hosted review found no blocking defect. The previously blocked hosted review now completes on the source-hydration fix in PR1333. Fixes openclaw#1072 Co-authored-by: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir>
…aw#1070) Keep trailing marker parsing within each actual HTML comment. The first closing delimiter after an opener must be the candidate's delimiter, so visible prose cannot bridge an earlier closed comment into a fake trailing marker. The final change is two production lines, one focused regression, and contract documentation. Current-head compiled parser/consumer proof and75 focused tests pass; CI/CodeQL and managed review passed. The fresh hosted review completed successfully after PR1333 and found no actionable defect. Fixes openclaw#1069 Co-authored-by: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir>
Classify the two verified synthetic Browser URI literals at their three existing source paths so complete-source review can proceed. Check source references against the already digest-selected fixture and remove the redundant source lookup that assumed one digest per path. Exercise the approved pairs and mismatched pair through the existing admission tests. Correct the cache-symlink test to supply the canonical cwd used by production callers on macOS, preserving its unsafe_path assertion. Native TruffleHog proof admits the exact public two-file Browser range and still refuses an executable-mode variant. Preserve the contributor's original commit and keep release-note context in the PR rather than the release-owned changelog. Co-authored-by: scotthuang <scotthuang@tencent.com>
What Problem This Solves
Exact reviews of Browser changes can stop with
AgentInputScanError: findingsbefore Codex starts because complete changed files include existing synthetic authentication and credential-redaction fixtures. This affects the source reported in OpenClaw PR 134400. Source hydration was fixed separately in PR 1333; the Browser literals still need classification.Why This Change Was Made
Approve two exact synthetic URI digests at three existing Browser test paths. The classifier now checks every blob reference against the fixture it already selected by digest. Removing
reviewedFixtureForSourceeliminates the second lookup and its one-fixture-per-source assumption, so both approved literals inchrome.test.tswork without adding another policy mechanism.The fixtures were independently read from their immutable public source blobs, their Git hashes recomputed, and their introduction checked against raw commit parents and patches. The local value is dummy authentication for a loopback test server; the remote value is dummy credential-redaction input under
browserless.example.com:Every reference must still match the same digest, exact path, and Git mode
100644. Complete-scan, detector, literal-line, source-drift, staging, and cleanup checks remain active. These hashes identify the scanner's URI literals, not whole files or arbitrary surrounding URL content. The existing policy is not repository/commit scoped; the links above document provenance.User Impact
Reviews can inspect the approved Browser fixture changes. Unclassified findings continue to stop admission. OpenClaw Bay, publication, queueing, and mutation authority are unchanged.
Documentation Impact
The README documents the approved sources and exact digest/path/mode membership. Release-note context is in this PR; the changelog is unchanged. The original contributor commit and credit for @scotthuang are preserved.
Evidence
Candidate:
52d62998d9a4a67e7b3c28b35635b1dfebd63435. Production classifier source SHA-256:b7bb49034223716b67bd229fa0d9596a00813ad18ac00eb4a0c11366ffd8d30f; compiled module SHA-256:9ada61cd1421f8f37a566f07c48960e6de887462966d0187b568408b6b2d9563. The committed source is checked against the bytes exercised below. Against mainabfcb0dc084c962d123d49e560a82446bb0988c0, the integration delta is three files, +55/-44; production code is +14/-9.Build and repair build, targeted source/test lint, formatting, documentation checks, and the 55-case fixture admission matrix passed. The new cases exercise all three approved pairs and reject the local fixture on the remote server-context path. Managed Codex reviews of both the final uncommitted change and committed branch completed scoped-clean at P0 with no findings.
Full current-head CI passed 4,263 tests with 14 skips and zero failures, plus 13 changed-file coverage tests: https://github.com/openclaw/clawsweeper/actions/runs/33494736334. CI checked out
52368029af08f4bf14bf45182ca4739f18f23fc6, merging this candidate with then-mainb056c0ab1510b23330f15bd44af7087129f9f270, using Node 24.19.0 and pnpm 11.10.0. CodeQL passed in https://github.com/openclaw/clawsweeper/actions/runs/33494736366. The fresh hosted review accepted the native owner proof and found no correctness or security defects.The first local scanner-file run passed 88/89 tests. Its existing cache-symlink test supplied the macOS
/varalias as the canonical checkout argument, unlike both production callers. A same-function baseline/candidate probe reproduced that mismatch and confirmed both production-shaped calls reject withunsafe_path. The test now suppliesrealpathSync(f.cwd)while retaining the lexical argument and rejection assertion; its exact case was rerun after correction. No cache runtime code changed.Real Behavior Proof
The built production
scanAgentInputowner used native TruffleHog 3.97.1 on Node 24.20.0/macOS arm64, with a 60-second scan budget. A task-owned two-file Git repository contains the exact public Chrome and server-context test bytes from upstream72dab3e751988337961c3d80fb41164fded7128aandfafc74649c9afc279e581883805d9b4d5fccc761. All four Git blob IDs were verified; its complete 4,362-byte binary diff contains neither approved URI literal. Commands werenode owner-proof.mjs beforeandnode owner-proof.mjs after; the script invokes the real compiled owner on committed source and consumes its normal sanitized notices.findings100755findingsSanitized result:
The three admitted groups were
d69d650dc6c3…at the Chrome path and60267342b1ab…at the Chrome and server-context paths. Production notices identify only digest, source, detector, blob, line, decoder, and occurrence count. No raw fixture values or verification diagnostics were published.This proves real native admission over a synthetic two-file range containing exact public source bytes. It is not the complete 13-file upstream PR, a hosted deployment, or a model review. Browser code was never executed or imported. No real credentials, GitHub mutations, or remote lease were needed. The individual durations are observations, not a performance benchmark.