Repository navigation
Add Codex Computer Use setup for Codex mode - #71842
Conversation
c93b9ea to
6fac760
Compare
🔒 Aisle Security AnalysisWe found 3 potential security issue(s) in this PR:
1. 🟠 Automatic marketplace plugin installation (potential untrusted code execution) triggered by configuration at attempt startup
Description
Because the decision is driven by configuration/env inputs and happens automatically at attempt start, a configuration that is influenced by an untrusted source (e.g., a checked-in project config used to run OpenClaw) can cause installation of a marketplace plugin without an explicit user/guardian confirmation step. Marketplace selection also includes a Vulnerable flow (auto-install + plugin install): // run-attempt.ts
await ensureCodexComputerUse({ client: startupClient, pluginConfig: options.pluginConfig, ... });
// computer-use.ts
if (config.autoInstall) {
const installedStatus = await inspectCodexComputerUse({ installPlugin: true, ... });
}
...
await request("experimentalFeature/enablement/set", { enablement: { plugins: true } });
...
await request("plugin/install", pluginRequestParams(marketplace, params.config.pluginName));If a malicious or compromised marketplace entry can satisfy the RecommendationRequire an explicit authorization/confirmation gate before enabling plugins and performing Concrete options:
Example (fail closed unless explicitly opted-in to install from non-curated sources): const allowed = new Set(["openai-bundled", "openai-curated"]);
if (config.autoInstall && marketplace.name && !allowed.has(marketplace.name)) {
throw new CodexComputerUseSetupError(
unavailableStatus(config, "Auto-install is only allowed from curated marketplaces.")
);
}Also consider treating 2. 🟡 Environment variables can implicitly enable Computer Use and trigger plugin enablement/installation at startup
Description
This expands the attack surface at runtime start and makes a security-sensitive capability controllable via ambient environment state rather than explicit, reviewed configuration. Vulnerable behavior: const autoInstall = ... readBooleanEnv(env.OPENCLAW_CODEX_COMPUTER_USE_AUTO_INSTALL) ?? false;
const enabled = ... readBooleanEnv(env.OPENCLAW_CODEX_COMPUTER_USE) ??
Boolean(autoInstall || marketplaceSource || marketplacePath || marketplaceName);And at startup: await ensureCodexComputerUse({ client: startupClient, pluginConfig: options.pluginConfig, ... });RecommendationTreat Computer Use enablement and installation as explicit opt-in rather than implicitly derived from environment state. Suggested mitigations (choose according to product needs):
const enabled =
params.overrides?.enabled ??
config.enabled ??
readBooleanEnv(env.OPENCLAW_CODEX_COMPUTER_USE) ??
false;
3. 🟡 Policy bypass: `/codex computer-use status` can force-enable Computer Use when overrides are provided
Description
However, Impact:
Vulnerable code: forceEnable: parsed.action === "install" || parsed.hasOverrides,RecommendationDo not implicitly force-enable Computer Use for Options:
const params: CodexComputerUseSetupParams = {
pluginConfig,
forceEnable: parsed.action === "install",
...(Object.keys(parsed.overrides).length > 0 ? { overrides: parsed.overrides } : {}),
};
Also consider ensuring Analyzed PR: #71842 at commit Last updated on: 2026-04-26T03:48:35Z |
Greptile SummaryThis PR adds a Computer Use setup path to the bundled Codex plugin, including Confidence Score: 4/5Safe to merge; all findings are non-blocking P2 quality concerns with no functional regressions. No P0 or P1 defects found. The only notable concern is that extensions/codex/src/app-server/computer-use.ts — the per-turn write-operation pattern in
|
728ba3b to
603a00b
Compare
95cbacf to
29079db
Compare
8108784 to
f9e0742
Compare
c560645 to
bf99f86
Compare
40a4dac to
b043ec0
Compare
* Add Codex Computer Use setup * Tighten Codex Computer Use setup checks * Handle fresh Codex Computer Use marketplace setup * Fix channel setup manifest fixture * Match Codex Computer Use marketplace loading * Harden plugin manifest test fixtures * Isolate auth choice legacy manifest test * Update aggregate shard test expectation * Improve Codex Computer Use first-run setup * Harden Codex Computer Use auto-install * Fix plugin auto-enable test fixture roots
* Add Codex Computer Use setup * Tighten Codex Computer Use setup checks * Handle fresh Codex Computer Use marketplace setup * Fix channel setup manifest fixture * Match Codex Computer Use marketplace loading * Harden plugin manifest test fixtures * Isolate auth choice legacy manifest test * Update aggregate shard test expectation * Improve Codex Computer Use first-run setup * Harden Codex Computer Use auto-install * Fix plugin auto-enable test fixture roots
* Add Codex Computer Use setup * Tighten Codex Computer Use setup checks * Handle fresh Codex Computer Use marketplace setup * Fix channel setup manifest fixture * Match Codex Computer Use marketplace loading * Harden plugin manifest test fixtures * Isolate auth choice legacy manifest test * Update aggregate shard test expectation * Improve Codex Computer Use first-run setup * Harden Codex Computer Use auto-install * Fix plugin auto-enable test fixture roots
* Add Codex Computer Use setup * Tighten Codex Computer Use setup checks * Handle fresh Codex Computer Use marketplace setup * Fix channel setup manifest fixture * Match Codex Computer Use marketplace loading * Harden plugin manifest test fixtures * Isolate auth choice legacy manifest test * Update aggregate shard test expectation * Improve Codex Computer Use first-run setup * Harden Codex Computer Use auto-install * Fix plugin auto-enable test fixture roots
* Add Codex Computer Use setup * Tighten Codex Computer Use setup checks * Handle fresh Codex Computer Use marketplace setup * Fix channel setup manifest fixture * Match Codex Computer Use marketplace loading * Harden plugin manifest test fixtures * Isolate auth choice legacy manifest test * Update aggregate shard test expectation * Improve Codex Computer Use first-run setup * Harden Codex Computer Use auto-install * Fix plugin auto-enable test fixture roots
* Add Codex Computer Use setup * Tighten Codex Computer Use setup checks * Handle fresh Codex Computer Use marketplace setup * Fix channel setup manifest fixture * Match Codex Computer Use marketplace loading * Harden plugin manifest test fixtures * Isolate auth choice legacy manifest test * Update aggregate shard test expectation * Improve Codex Computer Use first-run setup * Harden Codex Computer Use auto-install * Fix plugin auto-enable test fixture roots
This adds a Computer Use setup path to the bundled Codex plugin. OpenClaw can now ask Codex app-server to enable plugin support, discover the Codex marketplaces app-server already knows about, install the configured
computer-useplugin when requested, reload MCP servers, and verify that thecomputer-useMCP server is ready before a Codex-mode turn starts.It also adds
/codex computer-use statusand/codex computer-use install, configuration fields underplugins.entries.codex.config.computerUse, and docs for the default app-server marketplace flow plus the explicitmarketplaceSource,marketplacePath, andmarketplaceNameoverrides.The first-time path is intentionally owned by Codex app-server rather than by OpenClaw. With no marketplace override, OpenClaw calls
plugin/list, waits for app-server's marketplace startup sync for up tomarketplaceDiscoveryTimeoutMsduring install, chooses the known Computer Use marketplace when there are multiple matches, then installs through app-server. Turn-start auto-install only uses marketplaces app-server has already discovered; installing from a configured source or local path requires the explicit/codex computer-use installcommand. If app-server cannot surface a Computer Use marketplace, OpenClaw reports that directly instead of inventing or vendoring a registry path.The boundary stays narrow: OpenClaw does not vendor or implement desktop control. Codex owns the native MCP plugin and tool calls; OpenClaw only configures and checks the app-server side.
I proved this with a live smoke against OpenClaw running this branch: the Codex harness was forced, fallback was disabled, and the Codex app-server command was left unmanaged so OpenClaw had to use its managed
@openai/codexruntime dependency. The agent then operated macOS Calculator through Computer Use and completed withagentHarnessId: "codex",fallbackUsed: false, a Computer Use tool summary containingcomputer-use.get_app_stateandcomputer-use.click, and the final result42. That gives me confidence this is wired through OpenClaw -> Codex app-server -> Computer Use MCP, rather than a mocked path or a fallback runner.