Skip to content

chore(skills): sync autoreview to TruffleHog-based canonical - #130122

Merged
steipete merged 1 commit into
mainfrom
claude/lucid-sammet-fad886
Aug 26, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/lucid-sammet-fad886

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The mirrored autoreview skill (.agents/skills/autoreview/) was frozen at agent-skills 7ae9260, the last pre-TruffleHog version of the script. Its heuristic secret scanner refused any branch diff that deletes a Swift file containing benign status-string cases like case "ok-empty", "ok-token": near value returns — reproduced with apps/macos/Sources/OpenClaw/MenuContentView.swift:467: secret_text_risk flags the "ok-token" key shape, and the deletion-only redaction pass can never clear it (the post-redaction risk re-check fires even after value redaction), so refuse_secret_like_review_patch kills the whole review. Any autoreview bundle containing that deletion is unreviewable.

Why This Change Was Made

Canonical openclaw/agent-skills already replaced the entire heuristic layer with fail-closed TruffleHog pack scanning (agent-skills #145 through ca100e6), which fixes this false-positive class. Per the skill's own sync policy (validate in canonical first, then sync the complete directory), this syncs .agents/skills/autoreview/ to current canonical main plus the new regression fixture landing upstream as openclaw/agent-skills#192.

Every replaced mirror file was byte-identical to upstream 7ae9260 (verified with git log --find-object per file), so no repo-local variants existed or were lost.

User Impact

Maintainers/agents running $autoreview from this repo can again review branches that delete Swift files with status-string switch cases; previously the review refused the entire bundle. Note the synced script hard-requires a trufflehog binary and refuses to send the review pack without it (fail closed, as designed upstream).

Evidence

  • Repro (pre-sync script): deletion diff of MenuContentView.swift → refusing to include a known secret-like value in branch diff.
  • Post-sync, verified in place from this checkout: the same deletion bundle passes validate_review_patch byte-identical and a live TruffleHog scan accepts it; both new regression tests pass (python3 skills/autoreview/tests/test_autoreview_hardening.py -k swift_status → 2 OK, including the live-scanner test).
  • The new bundle regression test fails on the pre-sync script with the exact historical refusal.
  • Upstream full suite green at the synced content (exit 0); Codex autoreview of the upstream fixture/test diff: clean.

The mirrored autoreview script was frozen at agent-skills 7ae9260, before
the heuristic secret scanner was replaced by TruffleHog pack scanning
(agent-skills #145 and follow-ups through ca100e6). The old heuristics
refused any branch diff deleting a Swift file with benign status-string
cases like `case "ok-empty", "ok-token":` near value returns
(reproduced with apps/macos/Sources/OpenClaw/MenuContentView.swift): the
"ok-token" key shape stayed risky even after value redaction, so the
deletion could never be redacted and the whole review was refused.

Sync the complete skill directory from canonical agent-skills main
(0f71fd2), which replaces the heuristics with a fail-closed TruffleHog
scan and adds a regression fixture for this exact pattern. Every replaced
mirror file was byte-identical to upstream 7ae9260, so no repo-local
variants existed. Verified in place: the deletion bundle passes
validate_review_patch byte-identical and a live TruffleHog pack scan.
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 26, 2026 13:05
@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 26, 2026, 9:11 AM ET / 13:11 UTC.

ClawSweeper review

What this changes

This sync replaces the mirrored autoreview skill with its TruffleHog-based canonical version and adds Amp and Kimi review-engine support.

Merge readiness

⛔ Blocked by patch quality or review findings - 8 items remain

Keep open: the new Kimi engine places the complete review pack in process arguments, exposing reviewed source and datasets to local process inspection before Kimi runs.

Priority: P1
Reviewed head: b9148814543e37482dd5c1f35280082d295ccc87
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The sync has useful regression coverage, but the newly added Kimi transport has a blocking confidentiality defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external contributor proof gate; its stated live scanner evidence was not independently runnable here because TruffleHog is absent.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external contributor proof gate; its stated live scanner evidence was not independently runnable here because TruffleHog is absent.
Evidence reviewed 6 items Kimi receives the full pack as an argument: The new Kimi runner passes the complete prompt as the value of --prompt, making the pack part of the child process command line.
Credential scanning does not make process arguments private: The pack is scanned before engine invocation, but the scan only refuses detected credentials; it does not protect other private source or dataset content exposed through argv.
The behavior is intentionally asserted by tests: The Kimi unit test expects the review prompt to be the literal value following --prompt, so this is not incidental command construction.
Findings 1 actionable finding [P1] Keep the Kimi review pack out of process arguments
Security Needs attention Kimi review content is exposed through argv: Passing the full review prompt as a command-line argument makes private reviewed content observable through process inspection on applicable hosts; TruffleHog only blocks detected credentials.

How this fits together

Autoreview turns a repository diff and optional evidence files into a review pack, scans it for credentials, then sends it to an isolated model CLI. Its result is structured findings used by developers and automation.

flowchart LR
A[Repository diff and evidence] --> B[Review pack]
B --> C[TruffleHog scan]
C -->|clean| D[Selected review engine]
C -->|finding or error| E[Refuse review]
D --> F[Structured findings]
Loading

Decision needed

Question Recommendation
Should Kimi support be withheld from the canonical autoreview skill until review packs can be passed without exposing them in process arguments? Repair canonical Kimi transport: Use a Kimi-supported private stdin or file input path, then re-sync the canonical skill.

Why: The correct remedy changes the supported Kimi integration boundary and must be made upstream before downstream synchronization.

Before merge

  • Keep the Kimi review pack out of process arguments (P1) - The new Kimi path passes the entire validated review pack as --prompt <contents>. Command lines can be visible to other local processes or users, exposing every diff and dataset byte that is not a detected credential before Kimi runs. Use a private stdin/file input supported by Kimi, or omit Kimi until one exists.
  • Resolve security concern: Kimi review content is exposed through argv - Passing the full review prompt as a command-line argument makes private reviewed content observable through process inspection on applicable hosts; TruffleHog only blocks detected credentials.
  • Resolve merge risk (P1) - Kimi currently exposes every non-secret-scanner-protected diff and evidence byte through the local process command line.
  • Resolve merge risk (P1) - The required sibling Codex source checkout was unavailable, so the changed Codex isolation path has only CLI-help syntax confirmation, not direct runtime-contract proof.
  • Complete next step (P2) - A maintainer must choose the canonical Kimi integration boundary before any downstream sync repair can be safely made.
  • Improve patch quality - Repair or defer Kimi support in canonical agent-skills, then re-sync the complete directory.
  • Improve patch quality - Validate the repaired private-input path and inspect the required sibling Codex source contract before merge.

Findings

  • [P1] Keep the Kimi review pack out of process arguments — .agents/skills/autoreview/scripts/autoreview:4773-4775
  • [high] Kimi review content is exposed through argv — .agents/skills/autoreview/scripts/autoreview:4774
Agent review details

Security

Needs attention: The Kimi adapter introduces a concrete local review-pack disclosure boundary.

PR surface

Docs -113, Other -8968. Total -9081 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 59 172 -113
Config 0 0 0 0
Generated 0 0 0 0
Other 6 4602 13570 -8968
Total 7 4661 13742 -9081

Review metrics

Metric Value Why it matters
Production versus test delta tooling −6,592; tests/test support −2,376; skill docs −113 The sync removes the large heuristic scanner while adding replacement engine and scanner coverage; the substantive concern is the new Kimi boundary, not code growth.

Merge-risk options

Maintainer options:

  1. Fix the canonical Kimi transport first (recommended)
    Repair the upstream skill so review content never enters argv, then sync that complete canonical change here.

Technical review

Best possible solution:

Repair the canonical agent-skills Kimi adapter to use a private file or stdin prompt transport, or omit Kimi until that interface exists, then re-sync the complete canonical directory and validate the Codex isolation contract from source.

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

No: the reported Swift false-positive path was not executed here because TruffleHog is unavailable, although the Kimi command-line exposure is directly established from source.

Is this the best way to solve the issue?

No: the canonical sync should not expose review packs through Kimi argv; use a private input channel upstream or defer that engine.

Full review comments:

  • [P1] Keep the Kimi review pack out of process arguments — .agents/skills/autoreview/scripts/autoreview:4773-4775
    The new Kimi path passes the entire validated review pack as --prompt <contents>. Command lines can be visible to other local processes or users, exposing every diff and dataset byte that is not a detected credential before Kimi runs. Use a private stdin/file input supported by Kimi, or omit Kimi until one exists.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 776986f942dc.

Labels

Label changes:

  • add P1: The new optional reviewer can expose complete review packs on hosts where other local processes can inspect command arguments.
  • add merge-risk: 🚨 security-boundary: Merging introduces a new external-review path that exposes review-pack contents outside the intended private-file boundary.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored PR is exempt from the external contributor proof gate; its stated live scanner evidence was not independently runnable here because TruffleHog is absent.

Label justifications:

  • P1: The new optional reviewer can expose complete review packs on hosts where other local processes can inspect command arguments.
  • merge-risk: 🚨 security-boundary: Merging introduces a new external-review path that exposes review-pack contents outside the intended private-file boundary.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored PR is exempt from the external contributor proof gate; its stated live scanner evidence was not independently runnable here because TruffleHog is absent.

Evidence

Security concerns:

  • [high] Kimi review content is exposed through argv — .agents/skills/autoreview/scripts/autoreview:4774
    Passing the full review prompt as a command-line argument makes private reviewed content observable through process inspection on applicable hosts; TruffleHog only blocks detected credentials.
    Confidence: 0.96

What I checked:

Likely related people:

  • steipete: Authored the current sync and appears repeatedly in autoreview synchronization and secret-scanning history. (role: recent skill contributor; confidence: high; commits: b9148814543e, 45270a02c83f, ccbbd8b08cd7; files: .agents/skills/autoreview/scripts/autoreview, .agents/skills/autoreview/SKILL.md)

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Addressing the ClawSweeper review (b9148814543), item by item:

Kimi review pack in argv (P1 + security concern + merge risk) — skip stated, follow-up filed. The recommended remedy ("use a Kimi-supported private stdin or file input path") does not exist in the Kimi CLI contract: installed Kimi Code CLI 0.31.1 --help exposes only -p, --prompt <prompt> for non-interactive runs — no stdin mode and no prompt-file flag. --agent-file is the trusted agent definition, not a user-prompt channel; routing the untrusted pack through it would blur the trust boundary the isolation design depends on. Upstream documents this tradeoff explicitly (SKILL.md: the prompt travels as the --prompt argument with a platform argv budget of 120 KiB POSIX / 30 KiB Windows). The exposure is bounded to same-host process inspection during the run, and credentials remain blocked by the pre-send TruffleHog scan. Withholding Kimi downstream is not available either: the skill's sync contract forbids repo-local behavior variants, and blocking the sync keeps the mirror on the pre-TruffleHog version with the actual reviewability defect this PR fixes. Canonical follow-up filed upstream to adopt a private prompt path the moment the CLI grows one: openclaw/agent-skills#193.

Sibling Codex source proof (P1) — resolved. Inspected current ../codex at f5420174da: codex-rs/exec/src/cli.rs:32-45 defines --skip-git-repo-check, --ephemeral (no session persistence), --ignore-user-config ("Do not load $CODEX_HOME/config.toml; auth still uses CODEX_HOME"), --ignore-rules (no user/project execpolicy .rules), and --output-schema; codex-rs/exec/src/lib.rs:530 shows ignore_user_config switching the environment manager to env-only construction instead of from_codex_home. The permission profile the script sets (default_permissions="autoreview" with {":minimal"="read", ":workspace_roots"="read"}) matches codex-rs/core/src/config/permissions.rs:276,784 (FileSystemSpecialPath::Minimal, :workspace_roots) and the profile-selection behavior in codex-rs/core/src/config/permission_profile_selection_tests.rs. The reconstructed auth keys (cli_auth_credentials_store, forced_login_method, forced_chatgpt_workspace_id) are real auth config surface (codex-rs/core/src/config/auth_keyring_tests.rs:69-137).

Maintainer decision on the Kimi boundary (P2). Decision: keep Kimi with the documented argv transport, tracked by openclaw/agent-skills#193; the canonical integration boundary changes upstream when the CLI provides a private input, then re-syncs here.

Live scanner evidence. TruffleHog is installed on the verifying host (/opt/homebrew/bin/trufflehog); the stated proof ran for real: the deletion bundle of apps/macos/Sources/OpenClaw/MenuContentView.swift passes validate_review_patch byte-identical and a live TruffleHog pack scan accepts it, and both regression tests pass from this checkout (python3 skills/autoreview/tests/test_autoreview_hardening.py -k swift_status → 2 OK). The regression fixture landed upstream as openclaw/agent-skills#192 (52b1a0a); this PR's mirror content is identical to that landed tree.

@steipete
steipete merged commit ba7b912 into main Aug 26, 2026
231 of 232 checks passed
@steipete
steipete deleted the claude/lucid-sammet-fad886 branch August 26, 2026 13:37
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…w#130122)

The mirrored autoreview script was frozen at agent-skills 7ae9260, before
the heuristic secret scanner was replaced by TruffleHog pack scanning
(agent-skills openclaw#145 and follow-ups through ca100e6). The old heuristics
refused any branch diff deleting a Swift file with benign status-string
cases like `case "ok-empty", "ok-token":` near value returns
(reproduced with apps/macos/Sources/OpenClaw/MenuContentView.swift): the
"ok-token" key shape stayed risky even after value redaction, so the
deletion could never be redacted and the whole review was refused.

Sync the complete skill directory from canonical agent-skills main
(0f71fd2), which replaces the heuristics with a fail-closed TruffleHog
scan and adds a regression fixture for this exact pattern. Every replaced
mirror file was byte-identical to upstream 7ae9260, so no repo-local
variants existed. Verified in place: the deletion bundle passes
validate_review_patch byte-identical and a live TruffleHog pack scan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant