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(plugin): declare app connections optional (#2100)

ianw-oaiaf678d2f0391
diff --git a/AGENTS.md b/AGENTS.md
index 08333f680..c626f857a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -11,6 +11,7 @@ Codex Security is a thin wrapper around Codex and its security plugin.
- Keep credential access, storage, and configuration protections, unsafe-path
checks, and settings the user explicitly requests.
- Prefer straightforward code and tests for real behavior.
+- Declare plugin app connections with `required: false` so local scans work without them.
- Pass Codex-owned settings through existing SDK configuration interfaces.
Accept reasoning-effort values as strings and pass them through unchanged.
Do not maintain wrapper-owned model or reasoning-effort enums or allowlists;
diff --git a/docs/plugin-connectors.md b/docs/plugin-connectors.md
index 2ed1b6429..80964dd83 100644
--- a/docs/plugin-connectors.md
+++ b/docs/plugin-connectors.md
@@ -2,7 +2,8 @@
Codex Security uses optional connected apps for Cloud reads, finding intake
and tracking. The [app manifest](../plugins/codex-security/.app.json)
-declares their identities.
+declares each connection with `required: false` so users can run local scans
+without connecting an app.
| App | Workflows |
| -------------------- | --------------------------------------------------------- |
diff --git a/plugins/codex-security/.app.json b/plugins/codex-security/.app.json
index 56a05ab43..0b9416c75 100644
--- a/plugins/codex-security/.app.json
+++ b/plugins/codex-security/.app.json
@@ -2,18 +2,22 @@
"apps": {
"codex-security-cloud": {
"id": "connector_openai_defense_factory",
+ "required": false,
"category": "Code Hosting & Security Findings"
},
"linear": {
"id": "asdk_app_69a089a326dc8191b32a3f2553f5be2c",
+ "required": false,
"category": "Work Tracking & Coordination"
},
"github": {
"id": "connector_76869538009648d5b282a4bb21c3d157",
+ "required": false,
"category": "Code Hosting & Security Findings"
},
"atlassian": {
"id": "asdk_app_6a83901dde988191b3f3cefdcc19acfa",
+ "required": false,
"category": "Work Tracking & Coordination",
"capabilities": [
"read",
diff --git a/plugins/codex-security/tests/test_plugin_contract.py b/plugins/codex-security/tests/test_plugin_contract.py
index 23fb257e5..63c2c2730 100644
--- a/plugins/codex-security/tests/test_plugin_contract.py
+++ b/plugins/codex-security/tests/test_plugin_contract.py
@@ -73,7 +73,7 @@ def test_cloud_connection_is_optional_and_skill_is_shipped() -> None:
cloud = apps["codex-security-cloud"]
assert cloud["id"] == "connector_openai_defense_factory"
assert cloud["category"] == "Code Hosting & Security Findings"
- assert cloud.get("required", False) is False
+ assert cloud.get("required") is False
shipped = read_json(PLUGIN_ROOT / "plugin-files.json")["shippedExact"]
assert "skills/cloud-findings/SKILL.md" in shipped
diff --git a/plugins/codex-security/tests/test_track_findings_skill.py b/plugins/codex-security/tests/test_track_findings_skill.py
index 1e6e8d63f..36918bc93 100644
--- a/plugins/codex-security/tests/test_track_findings_skill.py
+++ b/plugins/codex-security/tests/test_track_findings_skill.py
@@ -18,6 +18,9 @@ class TrackFindingsSkillTest(unittest.TestCase):
app_ids = [apps[name].get("id") for name in ("linear", "github", "atlassian")]
self.assertTrue(all(isinstance(app_id, str) and app_id for app_id in app_ids))
self.assertEqual(len(set(app_ids)), len(app_ids))
+ for name in ("linear", "github", "atlassian"):
+ with self.subTest(app=name):
+ self.assertIs(apps[name].get("required"), False)
self.assertEqual(apps["atlassian"]["capabilities"], ["read", "write"])
self.assertEqual(apps["atlassian"]["id"], "asdk_app_6a83901dde988191b3f3cefdcc19acfa")
diff --git a/sdk/typescript/tests-ts/plugin-apps.test.ts b/sdk/typescript/tests-ts/plugin-apps.test.ts
index c5f7303bf..a7795a5d4 100644
--- a/sdk/typescript/tests-ts/plugin-apps.test.ts
+++ b/sdk/typescript/tests-ts/plugin-apps.test.ts
@@ -3,14 +3,16 @@ import { join } from "node:path";
import { expect, test } from "bun:test";
import { PLUGIN_ROOT } from "./plugin-root.js";
-test("registers Cloud as an optional hosted connection", async () => {
+test("registers hosted connections as explicitly optional", async () => {
const configuration = JSON.parse(
await readFile(join(PLUGIN_ROOT, ".app.json"), "utf8"),
) as { apps: Record<string, { id: string; required?: boolean }> };
const cloud = configuration.apps["codex-security-cloud"];
expect(cloud?.id).toBe("connector_openai_defense_factory");
- expect(cloud?.required ?? false).toBe(false);
+ for (const app of Object.values(configuration.apps)) {
+ expect(app.required).toBe(false);
+ }
});
test("registers security access through the Codex Security MCP, not a hosted app", async () => {