Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

fix(deep-scan): forward external provider credentials (#376)

ianw-oai2c724a0e66f0
diff --git a/sdk/typescript/_bundled_plugin/.mcp.json b/sdk/typescript/_bundled_plugin/.mcp.json
index 77967d2c3..8545d3821 100644
--- a/sdk/typescript/_bundled_plugin/.mcp.json
+++ b/sdk/typescript/_bundled_plugin/.mcp.json
@@ -9,6 +9,8 @@
"CODEX_SQLITE_HOME",
"CODEX_API_KEY",
"CODEX_CLI_PATH",
+ "OPENROUTER_API_KEY",
+ "FIREWORKS_API_KEY",
"AWS_BEARER_TOKEN_BEDROCK",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
diff --git a/sdk/typescript/tests-ts/runtime.test.ts b/sdk/typescript/tests-ts/runtime.test.ts
index 9d9c149be..4f12e7af6 100644
--- a/sdk/typescript/tests-ts/runtime.test.ts
+++ b/sdk/typescript/tests-ts/runtime.test.ts
@@ -124,8 +124,10 @@ describe("plugin runtime preparation", () => {
).toBe(true);
});
- test("forwards bundled Bedrock credentials through the MCP worker environment", async () => {
- const awsKeys = [
+ test("forwards configured provider credentials through the MCP worker environment", async () => {
+ const providerKeys = [
+ "OPENROUTER_API_KEY",
+ "FIREWORKS_API_KEY",
"AWS_BEARER_TOKEN_BEDROCK",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
@@ -149,7 +151,7 @@ describe("plugin runtime preparation", () => {
mcpServers: Record<string, { env_vars: string[] }>;
};
const parentEnvironment = Object.fromEntries(
- awsKeys.map((name) => [name, `synthetic-${name.toLowerCase()}`]),
+ providerKeys.map((name) => [name, `synthetic-${name.toLowerCase()}`]),
);
const allowed = new Set(
configuration.mcpServers["codex-security"]!.env_vars,