Skip to content

fix(channel): guard setup catalog lookups - #62657

Closed
eleqtrizit wants to merge 7 commits into
openclaw:mainfrom
eleqtrizit:fix/channel-setup-catalog-guards
Closed

eleqtrizit wants to merge 7 commits into
openclaw:mainfrom
eleqtrizit:fix/channel-setup-catalog-guards

Conversation

@eleqtrizit

Copy link
Copy Markdown
Contributor

Summary

  • Guards the remaining channel-setup catalog lookups so setup-scoped plugin resolution only considers non-workspace entries by default
  • Keeps bundled channel setup behavior consistent across preload, discovery, and scoped reload paths

Changes

  • Added excludeWorkspace: true to the remaining setup-flow catalog lookups in channel-setup.ts, discovery.ts, and plugin-install.ts
  • Added regression coverage for setup discovery, scoped registry reload/snapshot resolution, and setup preload behavior

Validation

  • Ran corepack pnpm test src/commands/channel-setup/discovery.test.ts src/commands/channel-setup/plugin-install.test.ts src/flows/channel-setup.test.ts
  • Ran the commit gate via scripts/committer, which passed pnpm check
  • Ran claude -p "/review" locally; it did not complete a diff review because it requested PR-list access instead

Notes

  • This keeps trusted workspace plugin resolution on the existing trust-aware path and only removes the remaining implicit workspace shadow lookups from setup flows
  • Co-author credit from the earlier private draft was preserved in the commit trailer

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S maintainer Maintainer-authored PR labels Apr 7, 2026
@greptile-apps

greptile-apps Bot commented Apr 7, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR guards the remaining channel-setup catalog lookups against untrusted workspace plugin shadows. It extracts trust-check logic into a new shared workspace-trust.ts module, applies excludeWorkspace: true (or an explicit trust-guard + fallback) across the discovery, plugin-install, and setup-flow preload paths, and adds regression tests for each path. The approach is consistent with the existing pattern in channel-plugin-resolution.ts and matches the stated goal of GHSA-82qx-6vj7-p8m2 mitigation.

Confidence Score: 5/5

Safe to merge; all findings are P2 or lower.

The refactoring is logically correct, the trust-check extraction to workspace-trust.ts is clean, and the fallback paths in discovery, plugin-install, and the flow preload are consistent with each other. Tests cover the new trust-guard branches. No P0 or P1 issues found.

No files require special attention.

Vulnerabilities

No security concerns identified. The PR closes workspace-plugin shadowing gaps in setup-scoped catalog lookups by consistently applying trust checks and falling back to excludeWorkspace: true; this is a net improvement to the existing GHSA-82qx-6vj7-p8m2 guard surface.

Reviews (4): Last reviewed commit: "fix(channel): preload safe fallback entr..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 815a12923a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/channel-setup/discovery.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ca72a487b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/channel-setup/discovery.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8bfc69b88d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/flows/channel-setup.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8bfc69b88d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/channel-setup/discovery.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8bfc69b88d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/channel-setup/discovery.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8bfc69b88d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/channel-setup/discovery.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c4853c8b2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/flows/channel-setup.ts Resolved
Comment thread src/flows/channel-setup.test.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c4853c8b2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/flows/channel-setup.test.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c4853c8b2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/flows/channel-setup.ts Resolved
Comment thread src/flows/channel-setup.test.ts Resolved
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@greptile review

@clawsweeper clawsweeper Bot added the rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. label Jun 14, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jun 14, 2026
@clawsweeper

clawsweeper Bot commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Keep open for maintainer handling because this PR has the protected maintainer label and is now conflicting, while current main already carries the broader trusted-catalog implementation from #92175. The branch still has useful historical context, but it should not be merged as-is against current main.

Root-cause cluster
Relationship: superseded
Canonical: #92175
Summary: This PR's setup catalog trust hardening is superseded by the merged broader local-origin trusted-catalog implementation in #92175; #81158 remains an adjacent open fix for unscoped auto-enable snapshot trust.

Members:

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

Canonical path: Close this PR as superseded by #92175.

So I’m closing this here and keeping the remaining discussion on #92175.

Review details

Best possible solution:

Close this PR as superseded by #92175.

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

No high-confidence current-main reproduction is established. Current main already routes the relevant setup paths through trusted-catalog, while the original workspace-shadow problem is only source-supported from the stale branch and prior reviews.

Is this the best way to solve the issue?

No, this PR is no longer the best fix as-is. The better current solution is the merged trusted-catalog boundary from #92175, with this branch either closed or rebuilt around that helper if maintainers find a unique gap.

Security review:

Security review needs attention: The stale patch touches setup plugin trust and would need rework before merge because its workspace-only helper is narrower than the current local-origin security boundary.

  • [medium] Workspace-only setup trust guard — src/commands/channel-setup/workspace-trust.ts:14
    The added helper treats non-workspace origins as trusted, but current main's setup trust boundary also treats config and global local plugin origins as security-sensitive. Reintroducing this helper during conflict resolution could weaken setup-time local plugin loading guards.
    Confidence: 0.86

AGENTS.md: found and applied where relevant.

What I checked:

  • linked superseding PR: fix(channel): harden local setup trust #92175 (fix(channel): harden local setup trust) is merged at 2026-06-11T13:48:42Z.
  • cluster evidence: the durable review links that PR in the work cluster or recommended risk path.
  • no human follow-up: live comments and timeline hydrated by apply contain no non-automation activity after the ClawSweeper review.

Likely related people:

  • hxy91819: Authored the source branch for the broader local setup trust hardening that ClawSweeper carried into merged fix(channel): harden local setup trust #92175. (role: feature owner; confidence: high; commits: 3a74e7d31281, 2bec2caf0c69; files: src/commands/channel-setup/trusted-catalog.ts, src/plugins/loader.ts, scripts/e2e/channel-plugin-trust-docker.sh)
  • zsxsoft: Git history shows the earlier workspace-shadow setup catalog fix that introduced the trusted catalog helper on the same channel setup surface. (role: introduced adjacent behavior; confidence: high; commits: 1fede43b948d; files: src/commands/channel-setup/discovery.ts, src/commands/channel-setup/plugin-install.ts, src/commands/channel-setup/trusted-catalog.ts)
  • Peter Steinberger: Recent history and blame show refactors around the current trusted catalog and setup/preload paths after the initial trust work. (role: recent adjacent contributor; confidence: medium; commits: a86c43e1fd88, 072d3ed7b5e; files: src/commands/channel-setup/trusted-catalog.ts, src/flows/channel-setup.ts)

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

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 28, 2026
@eleqtrizit eleqtrizit closed this Jun 30, 2026
@eleqtrizit eleqtrizit self-assigned this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant