Repository navigation
fix(security): stop recommending retired install-policy bypasses - #120011
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
81cc7ad to
b98d511
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 9:37 PM ET / August 7, 2026, 01:37 UTC. ClawSweeper reviewWhat this changesThe 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 provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep 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 Review scores
Verification
How this fits togetherInstall 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
Decision needed
Why: The protected maintainer label and security-path ownership require an explicit maintainer landing decision even though no patch defect was found. Before merge
Agent review detailsSecurityNone. PR surfaceSource -29, Tests +88, Docs -7, Other -1. Total +51 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label 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)
|
b98d511 to
3e4a43d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
3e4a43d to
a4a930e
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready proof for exact head
Production is net -29 lines; no config, protocol, auth, migration, dependency, or persistence surface is added. |
|
Merged via squash.
|
* 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
…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
Closes #120003
AI-assisted: yes
What Problem This Solves
Operators following the install-policy reference or Windows ACL recovery text were told to set
allowInsecurePathorallowSymlinkCommand, 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.tsdisappear 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:
security_scan_failedon the Homebrew Node ancestry instead of the fixture's intendedsecurity_scan_blockedresult.allowInsecurePath=true.After on exact head
a4a930e32758a72f21d79be1dfbb77a5544aeedc:node scripts/run-vitest.mjs src/security/install-policy.test.ts src/security/install-policy.windows.test.ts: 24/24.node scripts/run-vitest.mjs src/plugins/install.npm-spec.e2e.test.ts: 12/12.Patch-identical pre-rebase broad proof:
check:changed: exit 0 in 32m38s at https://github.com/openclaw/openclaw/actions/runs/31135975022.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.