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

feat(plugin): add hosted cyber access advisory (#444)

Kyle Brown613469a79f6d
diff --git a/sdk/typescript/_bundled_plugin/.app.json b/sdk/typescript/_bundled_plugin/.app.json
index 97b2cdb35..2dae6a9cb 100644
--- a/sdk/typescript/_bundled_plugin/.app.json
+++ b/sdk/typescript/_bundled_plugin/.app.json
@@ -1,5 +1,10 @@
{
"apps": {
+ "codex-security-access": {
+ "id": "connector_openai_codex_security_access",
+ "category": "Security",
+ "required": true
+ },
"linear": {
"id": "asdk_app_69a089a326dc8191b32a3f2553f5be2c",
"category": "Work Tracking & Coordination"
diff --git a/sdk/typescript/_bundled_plugin/references/config-preflight.md b/sdk/typescript/_bundled_plugin/references/config-preflight.md
index d93938581..f6f66a739 100644
--- a/sdk/typescript/_bundled_plugin/references/config-preflight.md
+++ b/sdk/typescript/_bundled_plugin/references/config-preflight.md
@@ -111,3 +111,7 @@ For any non-ready result, do not fail automatically. If an interactive chat fall
Present applicable remediation in the Codex thread. Ask before editing persistent user configuration in interactive sessions; use the narrow automatic-remediation path above in non-interactive sessions.
Codex CLI and other hosts use the same prompt-based preflight before substantive work. Explain the exact reasons and remediation in chat. Interactive CLI sessions ask before editing persistent config; non-interactive CLI sessions use the narrow automatic-remediation path above and continue only after a `ready` rerun.
+
+## TAC Status Advisory
+
+After capability preflight is `ready` and immediately before the workflow's first substantive scan action, use the hosted Codex Security Access app [$codex-security-access](app://connector_openai_codex_security_access) to call its `get_tac_status` action exactly once as the automatic pre-scan advisory. For Deep Security Scan, make this call immediately before `start_codex_security_deep_scan`. If this scan already performed the automatic advisory in an earlier continuation, reuse that result instead of calling it again. Report its exact `status` and TAC grant levels. When `status` is `not_granted`, before any other scan-start progress, present a separate, prominent warning that TAC access is not granted for this account and protected scan outputs may not be displayable. Include the returned `enrollmentUrl` as a clickable application link; if that field is absent, use `https://chatgpt.com/cyber`. Do not bury this warning in a routine status summary. When `status` is `unknown`, or the app or action is unavailable, instead warn that TAC access could not be verified and protected scan outputs may not be displayable. Then continue regardless. This result is advisory and must never authorize or gate the scan. Do not poll it or repeat it between scan phases. If the user explicitly asks to re-check after an account or TAC access change, call the action again for a fresh result; this user-requested refresh is the only repeat.
diff --git a/sdk/typescript/_bundled_plugin/skills/deep-security-scan/SKILL.md b/sdk/typescript/_bundled_plugin/skills/deep-security-scan/SKILL.md
index 858d34d26..6904af9a2 100644
--- a/sdk/typescript/_bundled_plugin/skills/deep-security-scan/SKILL.md
+++ b/sdk/typescript/_bundled_plugin/skills/deep-security-scan/SKILL.md
@@ -35,6 +35,10 @@ Do not repeat this guard after it passes, on later context loads, or after the s
After preserving any native continuation's scan context and applying its one-time concurrent-scan guard, read `../../references/scan-prologue.md` once. Deep scans do not run a capability helper, inspect runtime tools, request configuration remediation, or publish preflight checks. The coordinator validates its own ownership, target, scope, and sandbox and manages its workers independently of this thread's delegation runtime and subagent allowance.
+## TAC Status Advisory
+
+Immediately before the first `start_codex_security_deep_scan` call, the top-level parent uses the hosted Codex Security Access app [$codex-security-access](app://connector_openai_codex_security_access) to call `get_tac_status` once; workers never perform this advisory. Reuse an existing result when continuing the same scan. Report the exact `status` and TAC grant levels. If `status` is `not_granted`, prominently warn before scan-start progress that TAC access is not granted and protected outputs may not be displayable, and include the returned `enrollmentUrl` as a clickable application link, falling back to `https://chatgpt.com/cyber` when it is absent. If `status` is `unknown` or the app or action is unavailable, warn that access could not be verified and protected outputs may not be displayable. Then continue regardless: the advisory never authorizes, gates, or becomes a capability preflight for the scan. Do not poll or repeat it between phases; recheck only when the user explicitly requests a fresh result after an account or TAC access change.
+
## Run Independent Standard Scans
Use the same coordinator tool in every host:
diff --git a/sdk/typescript/tests-ts/plugin-apps.test.ts b/sdk/typescript/tests-ts/plugin-apps.test.ts
new file mode 100644
index 000000000..9eeaa2341
--- /dev/null
+++ b/sdk/typescript/tests-ts/plugin-apps.test.ts
@@ -0,0 +1,24 @@
+import { readFile } from "node:fs/promises";
+import { join } from "node:path";
+import { expect, test } from "bun:test";
+import { PLUGIN_ROOT } from "./plugin-root.js";
+
+test("registers security access as a required hosted app, not a local MCP server", async () => {
+ const [appConfiguration, mcpConfiguration] = await Promise.all([
+ readFile(join(PLUGIN_ROOT, ".app.json"), "utf8"),
+ readFile(join(PLUGIN_ROOT, ".mcp.json"), "utf8"),
+ ]);
+ const apps = (JSON.parse(appConfiguration) as Record<string, unknown>)[
+ "apps"
+ ] as Record<string, unknown>;
+ const mcpServers = (JSON.parse(mcpConfiguration) as Record<string, unknown>)[
+ "mcpServers"
+ ] as Record<string, unknown>;
+
+ expect(apps["codex-security-access"]).toEqual({
+ id: "connector_openai_codex_security_access",
+ category: "Security",
+ required: true,
+ });
+ expect(mcpServers).not.toHaveProperty("codex-security-access");
+});