Skip to content

fix(scanner): qualify the cron webhook FTP fixture - #1713

Merged
steipete merged 2 commits into
mainfrom
codex/qualify-cron-ftp-fixture
Sep 29, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qualify-cron-ftp-fixture

Conversation

@steipete

@steipete steipete commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

ClawSweeper refuses an existing synthetic FTP warning-redaction fixture, blocking review of OpenClaw PR #161161.

User Impact

The exact known fixture can pass source admission with scanning and verification enabled. Different values, source locations, unsupported decoders and verified findings remain blocking. An existing review hold still requires an explicit fresh review after the policy correction lands.

The qualification pins the complete bytes of both inspected versions of the source file. Any future change to that file, including an unrelated edit, requires explicit requalification.

Why This Change Was Made

Extend the existing exact-attribution policy for the observed FTP PLAIN/HTML findings and retain its complete-line, path, mode, committed-role and native-metadata checks. The change adds 31 production lines. No schema, queue, status or publication contract changes are involved.

The required committed-branch review found that plain literal searching alone could miss a second HTML-encoded occurrence and give it the approved line's identity. Native scanning reproduced that unsafe admission. The fix hashes the actual staged source bytes and filters the same policy rows used for all remaining attribution checks, avoiding a second HTML decoder or replay policy. The conservative requalification tradeoff is intentional.

Required validation also exposed a July 1 test date that crossed the 90-day age boundary on September 29. That fixture now uses the current timestamp, matching its neighbor and preserving the policy and assertions.

Evidence

  • 30 reported FTP regression cases pass in 0.57 seconds, including both observed variants, the HTML extra occurrence, unrelated byte changes, invalid source pins, and existing refusal controls. The small algorithm fixtures use the existing custom-policy argument; the real scanner proof below checks the production pins.
  • Both scanner owner files pass all 772 tests in 200.62 seconds. Build, static checks, source lint and changed-test lint pass after the source-pin repair.
  • Fresh managed Codex review of committed head 97f30ac80111dc3db7fa1aa4dd3ec43eef659b70 is scoped-clean through P2. The earlier mixed index/working-copy report remains recorded with its findings; staging the identical reviewed working bytes resolved those index-only findings before this fresh committed-branch review.
  • The original full pnpm run check passed static checks, builds, lint and coverage thresholds; its broad suite reported 7,036 passes, 37 skips and two failures. The date fixture is corrected and its 15-case owner file passes with coverage (41.27 s).
  • The unchanged replacement-publication fixture failed after 122.15 s with a missing report against its existing 120 s child budget. One replay of all five cases in their original order, with coverage enabled, passed (293.70 s). That replay does not establish a fix; the original failure remains recorded and its cause is unproven. No timeout, assertion or coverage setting was weakened.
  • CI run 36571376884 passed on the previous head 134adab3df0f1d19379af17fe4a08da173ffce83; it is prior-head evidence, not validation of the source-pin follow-up.

Real Behavior Proof

The actual scanAgentInput entry point scanned the complete OpenClaw range using checksum-qualified TruffleHog 3.97.4 with its normal verification enabled on macOS arm64, Node 26.10.0 and pnpm 12.4.1.

node docs/proof/agent-input-scan-context/run-proof.mjs \
  <clean-openclaw-checkout> \
  2fc693e33eff44730a0113d33f8f68b1642db0a3 \
  340c1ff4441b3c5e8b573c41c7c319df46ddec81 \
  <receipt.json>

The original policy refused the earlier range. The complete inspected base/head blobs are byte-identical in the refreshed range above, and the final source-pin policy admits it in 2.841 seconds. A synthetic HTML-marked source with the approved plain line and a second entity-encoded occurrence was admitted before the pin fix; the same complete blob bytes now refuse in 2.516 seconds. An encoded-only control also refuses in 2.230 seconds.

Inspected receipts and source identities contain no matched values. This proves native source admission with a controlled prompt; it does not complete a hosted review, release its hold, run a model or authorize a merge. Hosted review must scan its own complete inputs.

Bind observed FTP findings to exact source and native identities, including every literal occurrence. Keep the young-PR age fixture relative to the current clock without changing policy.
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 29, 2026, 10:01 AM ET / 14:01 UTC (Revision 2).

ClawSweeper review

What this changes

The branch lets ClawSweeper's input scanner admit one OpenClaw cron webhook FTP test fixture when the native finding and complete committed source bytes match reviewed identities, with regression tests and proof receipts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open. Current main still refuses the known synthetic FTP fixture, while the committed native receipts support the proposed qualification and show that the previously admitted extra HTML occurrence is now refused. No actionable patch defect emerged from this review.

Priority: P2
Reviewed head: 97f30ac80111dc3db7fa1aa4dd3ec43eef659b70

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong native before-and-after evidence supports a focused patch with meaningful negative coverage.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Committed native receipts exercise scanAgentInput with the pinned TruffleHog scanner against the OpenClaw Git range: approved source blobs are admitted after the fix, while extra HTML-encoded and encoded-only sources are refused. The scanner runs before the agent; the receipts do not claim a completed hosted review. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Committed native receipts exercise scanAgentInput with the pinned TruffleHog scanner against the OpenClaw Git range: approved source blobs are admitted after the fix, while extra HTML-encoded and encoded-only sources are refused. The scanner runs before the agent; the receipts do not claim a completed hosted review. No stored-data contract changes.
Evidence reviewed 9 items Introduced qualification: The pinned branch adds FTP PLAIN and HTML attribution rows tied to two complete source SHA256 values; the current-main table has no FTP row.
Source and metadata boundary: The classifier hashes the staged FTP blob before matching attribution rows, then retains native metadata, complete-line, path, mode, and committed-role checks. This also addresses the extra HTML occurrence that plain literal counting missed.
Final-effect ordering: The native scan uses the staged bytes and its refusal throws before the agent process starts.
Findings None None.
Security None None.

How this fits together

ClawSweeper stages a review request's prompt and Git content, scans them with a pinned native scanner, and either stops the review or starts the agent. Its fixture policy can classify a precisely identified synthetic finding as non-sensitive after a complete scan.

flowchart LR
  A[Review request] --> B[Staged prompt and Git content]
  B --> C[Native secret scan]
  C --> D{Exact FTP fixture identity?}
  D -- No --> E[Refuse review]
  D -- Yes --> F[Start agent review]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Code and test delta production +31 net lines; tests +152 net lines The production growth is confined to fixture qualification and is supported by focused refusal coverage.
Pinned source versions 2 complete source hashes Both inspected Git blob versions must match before the FTP finding can be classified.

Technical review

Best possible solution:

Retain the exact-byte qualification and require a fresh source review whenever the OpenClaw fixture or pinned scanner contract changes.

Do we have a high-confidence way to reproduce the issue?

Yes. The committed native before receipt shows the existing FTP finding refused, and the same proof entry point records admission after the change and refusal of an extra HTML occurrence.

Is this the best way to solve the issue?

Yes. Pinning complete inspected source bytes within the existing attribution policy is a narrow repair for decoder ambiguity; the tested source drift fails closed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 32cd4db41a50.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The fix unblocks review of a specific OpenClaw PR without changing the general scanner workflow.
  • merge-risk: 🚨 security-boundary: The PR expands the host's secret-finding exception table, so its exact-source refusal boundary remains important merge context even though the documented tradeoff is accepted.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Committed native receipts exercise scanAgentInput with the pinned TruffleHog scanner against the OpenClaw Git range: approved source blobs are admitted after the fix, while extra HTML-encoded and encoded-only sources are refused. The scanner runs before the agent; the receipts do not claim a completed hosted review. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Committed native receipts exercise scanAgentInput with the pinned TruffleHog scanner against the OpenClaw Git range: approved source blobs are admitted after the fix, while extra HTML-encoded and encoded-only sources are refused. The scanner runs before the agent; the receipts do not claim a completed hosted review. No stored-data contract changes.

Evidence

What I checked:

  • Introduced qualification: The pinned branch adds FTP PLAIN and HTML attribution rows tied to two complete source SHA256 values; the current-main table has no FTP row. (src/agent-input-scan-fixtures.ts:250, 97f30ac80111)
  • Source and metadata boundary: The classifier hashes the staged FTP blob before matching attribution rows, then retains native metadata, complete-line, path, mode, and committed-role checks. This also addresses the extra HTML occurrence that plain literal counting missed. (src/agent-input-scan-fixtures.ts:1029, 97f30ac80111)
  • Final-effect ordering: The native scan uses the staged bytes and its refusal throws before the agent process starts. (src/agent-runner.ts:80, 97f30ac80111)
  • Real native behavior proof: The committed receipts report refusal under the original policy, admission of the refreshed committed range under production pins, and refusal of both an extra HTML-encoded occurrence and an encoded-only control. The proof is limited to source admission; it does not establish a completed hosted review. (docs/proof/cron-ftp-fixture/README.md:18, 97f30ac80111)
  • OpenClaw dependency signal: The target README identifies the OpenClaw cron webhook test fixture as the exact external source being qualified. This is a source-identity dependency, not a claim that OpenClaw's policy governs this repository. (README.md:623, 97f30ac80111)
  • Regression coverage: The focused test covers both approved decoders and rejects altered values, metadata, roles, source bytes, and added occurrences; the separate age-fixture edit makes its test date relative to the current clock. (test/agent-input-scan-fixtures.test.ts:398, 97f30ac80111)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-29T12:58:43.826Z sha 134adab :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The current head binds FTP qualification to the complete reviewed source bytes, closing the reproduced HTML extra-occurrence attribution defect. The main PR body now contains the finding disposition, native positive/negative proof, source identities, focused validation, and remaining historical test uncertainty. Please review the current head and body; this requests review only.

@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant