Skip to content

fix(security): stop recommending retired install-policy bypasses - #120011

Merged
steipete merged 5 commits into
mainfrom
codex/autoqa-plugin-peer-policy-scan-20260806
Aug 7, 2026
Merged

steipete merged 5 commits into
mainfrom
codex/autoqa-plugin-peer-policy-scan-20260806

Conversation

@steipete

@steipete steipete commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #120003

AI-assisted: yes

What Problem This Solves

Operators following the install-policy reference or Windows ACL recovery text were told to set allowInsecurePath or allowSymlinkCommand, even though the current strict schema rejects both retired keys and Doctor removes them. The same contract drift made the npm-plugin E2E fixture depend on whether the host Node executable's ancestors satisfy the policy; Homebrew macOS failed 2/12 cases before the fixture could reach its intended policy-block and rollback assertions.

Why This Change Was Made

The canonical post-retirement contract stays intact: policy commands and interpreter scripts must be direct files on secure paths. This patch deletes the unreachable bypass branches and impossible guidance, updates the public reference, makes Windows ACL errors name the exact command or interpreter-script config field that failed, and gives the installer fixture a secure test-owned executable instead of weakening validation or reviving compatibility.

Production LOC: +5/-34 (net -29). Tests: +125/-37. Docs: +3/-10. Tooling: +0/-1. The max-lines suppression and baseline entry for src/security/install-policy.ts disappear now that the owner is below the limit.

Provenance: #89516 introduced both bypasses. #111527 intentionally retired them from schema and Doctor but left the internal branches, docs, diagnostics, and host-dependent fixture behind.

User Impact

Operators now get one actionable recovery contract: move the named policy executable or interpreter script to a secure verifiable path. Maintainers get deterministic plugin-install coverage across Homebrew macOS and Linux without reducing fail-closed security.

Evidence

Before:

  • Current-main npm-spec E2E: 10/12; both policy cases returned security_scan_failed on the Homebrew Node ancestry instead of the fixture's intended security_scan_blocked result.
  • Public docs advertised both schema-rejected keys, and Windows ACL diagnostics recommended allowInsecurePath=true.

After on exact head a4a930e32758a72f21d79be1dfbb77a5544aeedc:

Patch-identical pre-rebase broad proof:

The final conflict rebase dropped five unrelated baseline-test changes after #120080 landed them on main. No baseline compatibility or config surface remains in this PR.

@steipete
steipete marked this pull request as ready for review August 6, 2026 17:24
@steipete
steipete requested a review from a team as a code owner August 6, 2026 17:24
@steipete

steipete commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the codex/autoqa-plugin-peer-policy-scan-20260806 branch from 81cc7ad to b98d511 Compare August 7, 2026 00:32
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Aug 7, 2026
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 9:37 PM ET / August 7, 2026, 01:37 UTC.

ClawSweeper review

What this changes

The PR deletes retired install-policy bypass guidance and dead code, uses a secure test-owned policy executable for npm-install tests, and adds Windows ACL diagnostic coverage.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for maintainer landing: the PR cleanly repairs a current install-policy contract drift, but its exact-head hosted validation is still running and the protected maintainer label requires human handling.

Priority: P2
Reviewed head: a4a930e32758a72f21d79be1dfbb77a5544aeedc
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The patch is a focused, net-reductive repair with strong supplied targeted validation and no identified correctness defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR includes focused after-fix terminal evidence; external-contributor proof gating does not apply.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR includes focused after-fix terminal evidence; external-contributor proof gating does not apply.
Evidence reviewed 5 items Current schema contract: The strict install-policy exec schema contains neither retired bypass key.
Migration contract: Doctor removes both retired keys, confirming they are not supported runtime configuration.
Current-main defect: Current docs still advertise the retired keys and runtime retains unreachable bypass branches and impossible Windows recovery wording.
Findings None None.
Security None None.

How this fits together

Install policy validates an operator-configured executable before OpenClaw installs skills or plugins. Its path checks, error messages, documentation, and installation tests must all describe the same fail-closed contract.

flowchart LR
  A[Operator policy configuration] --> B[Install policy validation]
  C[Skill or plugin installation] --> B
  B --> D[Secure executable path checks]
  D --> E[Policy decision]
  E --> F[Install allowed or blocked]
  G[Docs and test fixture] --> B
Loading

Decision needed

Question Recommendation
After the pending exact-head checks complete, should this maintainer-owned security-contract repair be landed? Land after green exact-head CI: Merge the branch once required checks for a4a930e complete successfully.

Why: The protected maintainer label and security-path ownership require an explicit maintainer landing decision even though no patch defect was found.

Before merge

  • Resolve merge risk (P1) - Exact-head hosted CI remains in progress; complete it before landing this security-boundary repair.
Agent review details

Security

None.

PR surface

Source -29, Tests +88, Docs -7, Other -1. Total +51 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 34 -29
Tests 3 125 37 +88
Docs 1 3 10 -7
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 6 133 82 +51

Review metrics

Metric Value Why it matters
Production versus test LOC production +5/-34 (net -29); tests/support +125/-37; docs +3/-10 The repair removes unreachable security-policy logic while adding focused fixture and Windows diagnostic regression coverage.
Retired config guidance 0 schema keys changed; 2 obsolete documented keys removed The branch aligns docs and diagnostics to the already-shipped strict configuration contract without introducing a new option.

Stored data model

Persistent data-model change detected: serialized state: src/plugins/install.npm-spec.e2e.test.ts, serialized state: src/security/install-policy.windows.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #120003
Summary: This PR is the candidate fix for the linked install-policy contract drift.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Merge the canonical contract-alignment repair after exact-head CI completes cleanly, retaining direct secure policy executables with no compatibility bypass.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the canonical contract-alignment repair after exact-head CI completes cleanly, retaining direct secure policy executables with no compatibility bypass.

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

Yes—current source proves the schema/Doctor versus docs/runtime mismatch, and the affected fixture has a focused source-level reproduction path.

Is this the best way to solve the issue?

Yes—the PR repairs the owning install-policy surface by deleting unsupported bypass paths rather than adding compatibility or weakening validation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 01281ad9f860.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This corrects misleading install-policy guidance and a host-dependent test fixture while preserving fail-closed behavior.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR includes focused after-fix terminal evidence; external-contributor proof gating does not apply.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the current repair and the preceding configuration-surface retirement that established the current schema and Doctor contract. (role: recent area contributor; confidence: high; commits: edecdbd05efc, a4a930e32758; files: src/security/install-policy.ts, src/config/zod-schema.root-support.ts)
  • joshavant: Authored the original operator install-policy implementation. (role: feature owner; confidence: high; commits: 154f439c8103; files: src/security/install-policy.ts)

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-08-07T00:39:01.782Z sha b98d511e25f04e95e7a4f0331510790821bd700e :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/autoqa-plugin-peer-policy-scan-20260806 branch from b98d511 to 3e4a43d Compare August 7, 2026 01:27
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete force-pushed the codex/autoqa-plugin-peer-policy-scan-20260806 branch from 3e4a43d to a4a930e Compare August 7, 2026 01:30
@openclaw-barnacle openclaw-barnacle Bot removed app: web-ui App: web-ui agents Agent runtime and tooling extensions: qa-lab labels Aug 7, 2026
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 7, 2026
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head a4a930e32758a72f21d79be1dfbb77a5544aeedc:

Production is net -29 lines; no config, protocol, auth, migration, dependency, or persistence surface is added.

@steipete
steipete merged commit 804ae7f into main Aug 7, 2026
134 checks passed
@steipete

steipete commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the codex/autoqa-plugin-peer-policy-scan-20260806 branch August 7, 2026 01:45
vincentkoc added a commit to VACInc/openclaw that referenced this pull request Aug 7, 2026
* origin/main: (58 commits)
  fix(test): restart shared gateway after migration convergence (openclaw#120089)
  fix(ui): make active-run steering reliable (openclaw#120083)
  fix(telegram): preserve voice fallback text
  test(swift): preserve queued websocket frames (openclaw#120106)
  fix: reject missing oxlint shard selectors (openclaw#120096)
  test(channels): align prerelease fallback catalog spec (openclaw#120092)
  fix(node-cli): warn when systemd user lingering is disabled after install (openclaw#118430)
  fix(diagnostics): preserve CLI turn usage totals (openclaw#120100)
  fix(gateway): derive lock and coordinator paths from the resolved state dir (openclaw#120110)
  fix(release): isolate private Telegram QA harness (openclaw#120088)
  test(agents): exercise execution attribution ingress guard
  fix(gateway): defer attribution until admission succeeds
  refactor(agents): centralize exact execution attribution
  fix(google): accept base64url provider media (openclaw#116204)
  fix(plugins): warn when registerHook uses a typed hook event name (openclaw#118601)
  fix(canvas): serve Content-Length on A2UI HEAD responses (openclaw#117961)
  fix(gateway): make doctor dreaming timestamp comparators NaN-safe (openclaw#118749)
  fix(heartbeat): explain target-none skips (openclaw#119689)
  fix(security): stop recommending retired install-policy bypasses (openclaw#120011)
  fix(plugins): preserve startup release during repair (openclaw#120085)
  ...

# Conflicts:
#	CHANGELOG.md
#	src/config/sessions/session-accessor.sqlite-transcript-write.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 7, 2026
…nclaw#120011)

* fix(security): align install policy path contract

* test(security): align install policy wording

* style(security): format install policy test

* fix(security): identify failing install policy path

* test(security): track Windows ACL temp dirs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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.

[Bug]: Install policy still documents retired path bypasses

1 participant