fix(security): block untrusted workspace providers in startup discovery#74302
fix(security): block untrusted workspace providers in startup discovery#74302vincentkoc wants to merge 1 commit into
Conversation
|
/clownfish automerge |
Greptile SummaryThis PR adds Confidence Score: 5/5Safe to merge — the change is a targeted, low-risk security hardening with no breaking side effects. The change is two lines of production code and one line of test assertion. It follows the exact same pattern already used in other callers (setup.ts, auth-choice.plugin-providers.ts), the flag is optional so existing callers without it are unaffected, and the test was correctly updated. No logic errors or regressions detected. No files require special attention. Reviews (1): Last reviewed commit: "fix(security): block untrusted workspace..." | Re-trigger Greptile |
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 4:13 PM ET / 20:13 UTC. Summary PR surface: Source +2, Tests +1. Total +3 across 2 files. Reproducibility: no. The original untrusted-workspace execution path is no longer reproducible from source on current main because the shared provider helper filters omitted trust flags by default. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the shipped helper-level fail-closed behavior; rebase and merge this PR only if maintainers still want the explicit startup caller contract, otherwise close it through explicit maintainer handling. Do we have a high-confidence way to reproduce the issue? No. The original untrusted-workspace execution path is no longer reproducible from source on current main because the shared provider helper filters omitted trust flags by default. Is this the best way to solve the issue? No, not as the standalone security fix anymore. The merged helper-level default is the broader owner-boundary fix; this PR is only an optional explicit caller assertion after rebase. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5361e5a0b455; fix evidence: release v2026.6.11, commit 0aabaebba172. Label changesLabel justifications:
Evidence reviewedPR surface: Source +2, Tests +1. Total +3 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
LGTM. The 4-line change at |
|
Closing as superseded by #81069 / The original security concern is valid, but current
I also checked the current Codex contract directly at Supported path: keep the shipped shared fail-closed policy and explicit plugin trust/allowlist control. A concrete bypass of |
Motivation
providerDiscoveryEntriesOnlyis enabled, closing a path that could run workspace code without explicit trust.Description
providerDiscoveryEntriesOnlyis true, forwardincludeUntrustedWorkspacePlugins: falseintoresolveRuntimePluginDiscoveryProvidersinresolveImplicitProviders(src/agents/models-config.providers.implicit.ts) to block workspace-origin plugins from being considered.includeUntrustedWorkspacePlugins: falseinsrc/agents/models-config.providers.implicit.discovery-scope.test.ts.Testing
pnpm test src/agents/models-config.providers.implicit.discovery-scope.test.ts, which passed.Codex Task