Skip to content

fix(plugins): reject external public-artifact hardlinks - #118689

Merged
steipete merged 1 commit into
mainfrom
codex/qa0803-plugin-public-hardlink-boundary
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa0803-plugin-public-hardlink-boundary

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer compatibility decision

Maintainer explicitly accepts the intentional upgrade-time fail-closed behavior: an externally installed plugin whose mutable public artifact is hardlinked outside its plugin root must be repaired or reinstalled before it loads. The installed discovery/runtime/SDK-facade owners already enforce this same security invariant; allowing the public surface to remain an exception would preserve arbitrary outside-root code execution. Legitimate bundled plugins and immutable Nix-store hardlinks remain supported, and the regression suite proves both. No migration, unsafe compatibility alias, or credentialed fallback is appropriate for this boundary.

ClawSweeper rank-up disposition: this compatibility tradeoff is accepted and documented; exact-head required checks must finish before landing. Merely being behind current main is not itself a reason to rebase; the native maintainer merge workflow will verify the actual merge result and current required checks.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 9:57 AM ET / 13:57 UTC.

ClawSweeper review

What this changes

Reject hardlinked provider-policy-api.js, api.js, and runtime-api.js files from externally installed plugin roots before OpenClaw loads them, while retaining bundled and immutable Nix-store exceptions.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this PR open for explicit maintainer security-boundary review. The patch makes the public-artifact loader follow the existing external-plugin hardlink policy, preserves the bundled and Nix exceptions, and adds focused real filesystem regressions; the protected maintainer label prevents automated cleanup or landing.

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

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused boundary repair with real owner-path proof and targeted exception coverage; remaining work is protected maintainer acceptance and normal required-check completion.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides before/after same-inode execution evidence through the actual loader and provider-policy owner, and the repository's Real behavior proof check reports success.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides before/after same-inode execution evidence through the actual loader and provider-policy owner, and the repository's Real behavior proof check reports success.
Evidence reviewed 6 items Current-main gap: Current main still passes rejectHardlinks: false when opening a validated public surface, leaving this loader inconsistent with the shared plugin hardlink policy.
Canonical policy reuse: The proposed loader calls the existing policy, which rejects non-bundled roots but retains bundled and immutable Nix-store exceptions.
Changed owner boundary: The patch supplies bundled for bundled artifacts and global for installed plugin artifacts at the single validated-open boundary, without adding a public API, configuration, or fallback path.
Findings None None.
Security None None.

How this fits together

Plugin discovery records an installed plugin root and provider ownership before the public-artifact loader opens lightweight JavaScript surfaces. Those surfaces feed trusted provider-policy and SDK-facing resolution, so the loader must enforce the same filesystem boundary policy as the rest of plugin discovery.

flowchart LR
  A[Installed plugin root] --> B[Public artifact loader]
  B --> C[Hardlink policy]
  C --> D[Root-boundary file open]
  D --> E[Provider policy and SDK surfaces]
  E --> F[Trusted plugin runtime resolution]
Loading

Decision needed

Question Recommendation
Should OpenClaw enforce the existing external-plugin hardlink rejection at the public-artifact loader even though installations relying on hardlinked api.js-style artifacts will stop loading? Accept canonical hardlink enforcement: Merge after required checks complete, accepting that externally installed public artifacts must no longer be hardlinked outside their plugin root.

Why: The implementation is narrowly aligned with existing policy, but accepting the resulting upgrade behavior is a security-boundary decision reserved for the protected maintainer review path.

Before merge

  • Resolve merge risk (P1) - An existing externally installed plugin that intentionally uses hardlinked public artifacts will now fail to load after upgrade; the intended security tradeoff needs maintainer acceptance before merge.
  • Resolve merge risk (P1) - The branch is cleanly mergeable but behind current main; refresh the merge result and let required checks finish before landing.
Agent review details

Security

None.

PR surface

Source +9, Tests +69. Total +78 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 10 1 +9
Tests 2 69 0 +69
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 79 1 +78

Review metrics

Metric Value Why it matters
Production vs test delta production +9, tests +69 The small production increase carries origin-owned policy into the sole loader boundary; the larger test delta exercises all public artifact names and the provider-policy caller.

Merge-risk options

Maintainer options:

  1. Land with the explicit security tradeoff (recommended)
    Accept rejection of legacy external hardlinked artifacts, retain the bundled and Nix exceptions, and merge only after the current merge result passes required checks.
  2. Pause for a compatibility policy decision
    Do not merge until maintainers decide that failing legacy external hardlinked artifacts is acceptable for installed official plugins.

Technical review

Best possible solution:

Adopt one canonical hardlink rule for externally installed public artifacts, retain only the existing bundled and immutable Nix exceptions, and land after the maintainer accepts the upgrade tradeoff and the exact head has completed required checks.

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

Yes. The deterministic same-inode fixture in the changed tests targets current-main's public-artifact loader and provider-policy caller; the PR body also reports before/after execution through those real owners.

Is this the best way to solve the issue?

Yes. Reusing shouldRejectHardlinkedPluginFiles at the single validated-open boundary is narrower and safer than introducing another loader-specific filesystem rule or a new configuration path.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P1: This closes a plugin-code trust-boundary gap in a loader that feeds trusted provider behavior.
  • add merge-risk: 🚨 compatibility: Existing externally installed plugins whose public artifacts are hardlinked outside their root will fail to load after upgrade.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before/after same-inode execution evidence through the actual loader and provider-policy owner, and the repository's Real behavior proof check reports success.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides before/after same-inode execution evidence through the actual loader and provider-policy owner, and the repository's Real behavior proof check reports success.

Label justifications:

  • P1: This closes a plugin-code trust-boundary gap in a loader that feeds trusted provider behavior.
  • merge-risk: 🚨 compatibility: Existing externally installed plugins whose public artifacts are hardlinked outside their root will fail to load after upgrade.
  • 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 (live_output): The PR body provides before/after same-inode execution evidence through the actual loader and provider-policy owner, and the repository's Real behavior proof check reports success.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before/after same-inode execution evidence through the actual loader and provider-policy owner, and the repository's Real behavior proof check reports success.

Evidence

What I checked:

  • Current-main gap: Current main still passes rejectHardlinks: false when opening a validated public surface, leaving this loader inconsistent with the shared plugin hardlink policy. (src/plugins/public-surface-loader.ts:141, cad499d7ca06)
  • Canonical policy reuse: The proposed loader calls the existing policy, which rejects non-bundled roots but retains bundled and immutable Nix-store exceptions. (src/plugins/hardlink-policy.ts:25, 6dac1af8773e)
  • Changed owner boundary: The patch supplies bundled for bundled artifacts and global for installed plugin artifacts at the single validated-open boundary, without adding a public API, configuration, or fallback path. (src/plugins/public-surface-loader.ts:144, 6dac1af8773e)
  • Focused regression coverage: The branch proves same-inode hardlinks are rejected for all three installed public artifact names and verifies the provider-policy caller fails before accepting an outside-root artifact; existing tests retain the bundled hardlink allowance. (src/plugins/public-surface-loader.test.ts:332, 6dac1af8773e)
  • Policy provenance: The Nix-store exception dates to the dedicated hardlink policy history, so routing the loader through that helper preserves an established exception rather than introducing a parallel rule. (src/plugins/hardlink-policy.ts:31, 954d20ece2de)
  • Release and current-main status: The proposed head is not contained by current main and no release tag contains it; this remains an unmerged security hardening change rather than an already-implemented fix. (src/plugins/public-surface-loader.ts:144, 6dac1af8773e)

Likely related people:

  • Peter Steinberger: Current loader lines and the recent hardlink-policy history trace primarily to Peter Steinberger, including the current loader revision and policy-maintenance commits. (role: recent loader and policy contributor; confidence: high; commits: f6540b0a1f6c, 2d2ddc43d0dc; files: src/plugins/public-surface-loader.ts, src/plugins/hardlink-policy.ts)
  • the sun gif man: The immutable Nix-store hardlink exception that this patch deliberately preserves appears in the policy history from this contributor. (role: Nix exception contributor; confidence: medium; commits: 954d20ece2de; files: src/plugins/hardlink-policy.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh the merge result against current main and wait for the in-progress required checks before landing.

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
steipete merged commit 8d263b4 into main Aug 3, 2026
137 of 145 checks passed
@steipete
steipete deleted the codex/qa0803-plugin-public-hardlink-boundary branch August 3, 2026 14:22
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
* origin/main:
  fix(onboard): keep referenced provider secrets out of plaintext (#118702)
  docs: show canonical agent roster configuration (#118722)
  fix(channels): generate catalog from package manifests (#118097)
  fix(zalouser): distinguish probe timeout from auth failure (#111336)
  improve(ui): cut E2E shard runtime by reusing the bundle (#118697)
  fix(cli): publish completion caches atomically (#118715)
  fix(whatsapp): honor disabled self-chat without widening group access (#118711)
  fix(voice-call): terminate carrier calls after realtime startup failures (#118699)
  fix(slack): isolate GovSlack media trust and delivery (#118695)
  fix(browser): wrap page-controlled action results (#118691)
  fix(security): sanitize JSON-escaped forged content boundaries (#118698)
  test(qa): prove real yielded-child completion and channel delivery (#118707)
  fix(doctor): honor explicit plugin-only migration authority (#118700)
  fix(security): detect child_process calls through aliases and computed members (#116304)
  test(gateway): avoid async facade mock race (#118708)
  fix(gateway): preserve final speech during transcription shutdown (#118693)
  fix(gateway): resume durable outbound delivery retries (#118694)
  fix(plugins): reject external public-artifact hardlinks (#118689)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
* origin/main:
  fix(onboard): keep referenced provider secrets out of plaintext (openclaw#118702)
  docs: show canonical agent roster configuration (openclaw#118722)
  fix(channels): generate catalog from package manifests (openclaw#118097)
  fix(zalouser): distinguish probe timeout from auth failure (openclaw#111336)
  improve(ui): cut E2E shard runtime by reusing the bundle (openclaw#118697)
  fix(cli): publish completion caches atomically (openclaw#118715)
  fix(whatsapp): honor disabled self-chat without widening group access (openclaw#118711)
  fix(voice-call): terminate carrier calls after realtime startup failures (openclaw#118699)
  fix(slack): isolate GovSlack media trust and delivery (openclaw#118695)
  fix(browser): wrap page-controlled action results (openclaw#118691)
  fix(security): sanitize JSON-escaped forged content boundaries (openclaw#118698)
  test(qa): prove real yielded-child completion and channel delivery (openclaw#118707)
  fix(doctor): honor explicit plugin-only migration authority (openclaw#118700)
  fix(security): detect child_process calls through aliases and computed members (openclaw#116304)
  test(gateway): avoid async facade mock race (openclaw#118708)
  fix(gateway): preserve final speech during transcription shutdown (openclaw#118693)
  fix(gateway): resume durable outbound delivery retries (openclaw#118694)
  fix(plugins): reject external public-artifact hardlinks (openclaw#118689)
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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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