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

refactor(plugin): share bundled severity grading with the SDK (#2260)

Aismitfa117a22277c
diff --git a/plugins/codex-security/plugin-files.json b/plugins/codex-security/plugin-files.json
index 68a42d38d..8f3f31885 100644
--- a/plugins/codex-security/plugin-files.json
+++ b/plugins/codex-security/plugin-files.json
@@ -36,6 +36,7 @@
"references/access-advisory.md",
"references/artifact-storage.md",
"references/core-scan.md",
+ "references/default-severity-rubric.md",
"references/final-report.md",
"references/finding-detail-fields.md",
"references/investigation-time-budget.md",
diff --git a/plugins/codex-security/references/core-scan.md b/plugins/codex-security/references/core-scan.md
index fbf77233a..c22526831 100644
--- a/plugins/codex-security/references/core-scan.md
+++ b/plugins/codex-security/references/core-scan.md
@@ -33,9 +33,7 @@ Establish purpose from format and usage. Distinguish credential material from pu
## Finding Severity
-Grade reportable findings with the scan's supplied severity rubric when present. Otherwise use the following grading criteria.
-
-Use the supplied threat model, applicable policy, actual privilege gain, impact, likelihood, and prerequisites. Reserve `critical` for clear, immediately actionable severe compromise. Otherwise: high impact and high likelihood is `high`; high impact and medium or unknown likelihood is `medium`; high impact and low likelihood is `low`. Medium or unknown impact is `medium` only with high likelihood and otherwise `low`; low impact stays `low`. Downgrade internal, same-tenant, localhost, or constrained paths according to the supported impact. Ignore self-only or privileged-only behavior without a meaningful boundary crossing or capability gain. Missing runtime reproduction or deployment evidence affects confidence; it does not alone defeat a source-backed vulnerability.
+Grade findings with the rubric supplied for this scan. When none is supplied, use the [default severity rubric](default-severity-rubric.md). Apply it to the actual privilege gained, impact, likelihood, and prerequisites in the supplied threat model and applicable policy. Exclude self-only or privileged-only behavior without meaningful additional security impact. Keep missing runtime reproduction or deployment evidence visible in the confidence assessment.
## Shared Worker Instructions
diff --git a/plugins/codex-security/references/default-severity-rubric.md b/plugins/codex-security/references/default-severity-rubric.md
new file mode 100644
index 000000000..3f31bb6dd
--- /dev/null
+++ b/plugins/codex-security/references/default-severity-rubric.md
@@ -0,0 +1,28 @@
+# Severity guidance
+
+Judge the attacker's actual starting access, the security boundary crossed, and the additional unauthorized harm. Keep confidence separate from severity and identify the missing fact that could change the assessment. Missing proof alone does not establish that a broader attack is impossible; do not invent an attack path or downgrade merely because exploitation was not demonstrated.
+
+## Critical
+
+Reserve Critical for consequential, strongly supported compromise meeting all three conditions:
+- Access: an unauthenticated internet attacker, ordinary external user, or publicly admitted untrusted workload can exploit the interface without employee-only access, an invitation, an approved business relationship, or compromise of a trusted supplier.
+- Impact: crossing an important security boundary enables consequential access to protected data, privileged actions, meaningful code execution, workload escape, or comparable compromise of the affected system.
+- Evidence: demonstrated exploitation or strong source-backed validation establishes the complete attack path.
+
+Second-order attacks can qualify: an external attacker plants data that a trusted user or system later processes, causing consequential unauthorized access or privileged actions.
+
+## High
+
+Assign High when a realistic, evidenced path gives a lower-trust attacker a substantial unauthorized capability they did not already possess. Internal users, partners, invited collaborators, and admitted untrusted workloads can qualify; unauthenticated internet access is not required. Consequences include sensitive customer or business data or reusable credentials, account takeover, meaningful cross-tenant access or actions as another user, control of production workloads or deployments, privileged identities, encryption keys or important isolation boundaries, or significant repeatable disruption of a critical or shared service. A dangerous function, production label, internal access, or the existence of a privileged credential alone is insufficient: identify the lower-trust actor, boundary crossing, and consequential new capability.
+
+## Medium
+
+Assign Medium to a credible vulnerability with concretely bounded impact, such as nonsecret operational information, narrow unauthorized changes, contained disruption of a noncritical service, or isolated development or staging systems without a consequential pivot. A fully demonstrated vulnerability can still be Medium. Base a downgrade on verified constraints, not on an assumption that missing evidence rules out broader harm.
+
+## Low
+
+Assign Low to a supported security weakness with minor additional unauthorized harm and verified limits on its scope, sensitivity, or duration, such as a small information exposure with little security value or a narrowly contained nuisance. Do not use Low as a substitute for uncertainty about a potentially serious path.
+
+## Informational
+
+Assign Informational to a hardening opportunity or observation for which the supplied evidence establishes no additional unauthorized capability or security impact. Explain why it is informational rather than treating missing proof of exploitation as proof of safety. Administrative records that do not describe a security finding may be excluded; exclusion is distinct from severity.
diff --git a/plugins/codex-security/skills/attack-path-analysis/references/severity-policy.md b/plugins/codex-security/skills/attack-path-analysis/references/severity-policy.md
index e8905a438..0da8faabb 100644
--- a/plugins/codex-security/skills/attack-path-analysis/references/severity-policy.md
+++ b/plugins/codex-security/skills/attack-path-analysis/references/severity-policy.md
@@ -2,43 +2,10 @@
Apply this policy after establishing the attack path, scope, and counterevidence. Start from the candidate's severity hypothesis and adjust it using repository-supported impact, likelihood, prerequisites, and mitigations. Do not reopen discovery during calibration.
-## Severity criteria
-
-Reserve `critical` for a realistic in-scope path to severe compromise that requires immediate attention. Use `high` for a realistic attacker path with major security impact. A bug class, dangerous sink, unusual configuration, or scanner label alone does not establish either level.
-
-Evidence that can support `critical` includes:
-
-- arbitrary code execution or readily exploitable memory corruption;
-- account takeover, strong authentication bypass, or XSS that enables account compromise or privileged actions;
-- broad authorization or tenant-boundary failure;
-- access to highly sensitive data, signing keys, private keys, credential stores, or similarly valuable secrets;
-- query injection that exposes sensitive data or creates dangerous records;
-- sandbox, container, VM, browser, or interpreter escape;
-- server-side template execution that enables code execution or secret access;
-- arbitrary file writes with a realistic path to persistence or execution;
-- irreversible or broad integrity compromise, such as cross-tenant deletion or unauthorized changes to security-critical configuration.
-
-These examples require evidence of attacker control, an in-scope reachable path, and the claimed impact. Unauthenticated reachability, low-friction exploitation, cross-tenant effects, identity or signing compromise, persistence, and mass exploitation can support raising an otherwise plausible `high` to `critical`.
-
-Evidence that can support `high` includes:
-
-- SSRF with attacker-controlled destinations and meaningful internal, metadata, file-backed, or side-effecting access;
-- exploitable memory corruption with major impact;
-- unauthorized reads of meaningful user data or source code, with highly sensitive secret exposure considered for `critical`;
-- file writes with a realistic execution or persistence path;
-- CSRF that enables sensitive state changes with realistic victim interaction;
-- valid, reachable hardcoded or default credentials granting meaningful access;
-- practical cryptographic failures enabling forgery, secure-channel bypass, or sensitive-data decryption;
-- update or supply-chain compromise delivering malicious code or trusted artifacts;
-- authorization or privilege failures with meaningful but narrower object or same-tenant impact;
-- exploitable XXE;
-- uploads enabling stored active content, trusted-origin script execution, or consequential content-type confusion;
-- reachable deserialization, template, plugin, macro, or interpreter primitives with demonstrated impact but without the proof needed for `critical`.
+Grade reportable findings with the scan's rubric or, when none is supplied, the [default severity rubric](../../../references/default-severity-rubric.md).
For SSRF, a documented outbound-request feature or optional operator filter does not defeat a demonstrated destination-control bypass. For CSRF, evaluate browser credential attachment, cookie policy, preflight, request parsing, and effective controls; method or JSON content type alone is not a categorical defense. For XSS, distinguish self-only effects from victim impact; an `alert` reproduction proves script execution but does not alone establish the severity.
-Constrained, same-tenant, internal, localhost, self-only, or already-privileged paths generally reduce severity unless the threat model or privilege gained supports greater impact. Ordinary correctness bugs, low-impact information leaks, speculative injection or memory-corruption claims, security-header or crypto-hygiene observations, and transient or self-targeting denial of service do not warrant `high` or `critical` without a demonstrated severe consequence. Evaluate the actual privilege delta and boundary crossing.
-
## Reportability
- Set `ignore` for a disproved finding or a bug without a meaningful security impact.
@@ -56,44 +23,13 @@ Weight likelihood using the established attacker position and exposure:
- `localhost` usually supports low likelihood unless a lower-privileged attacker can realistically reach the listener;
- `none` does not increase likelihood based on exposure.
-## Calibration matrix
-
-Severity calibration and final policy-adjustment matrix:
+## Priority
-- `impact=high`:
- - `likelihood=high` -> `critical` only when the critical criteria above are satisfied; otherwise `high`
- - `likelihood=medium` -> `medium`
- - `likelihood=low` -> `low`
- - `likelihood=ignore` -> `ignore`
- - `likelihood=unknown` -> `medium`
-- `impact=medium`:
- - `likelihood=high` -> `medium`
- - `likelihood=medium` -> `low`
- - `likelihood=low` -> `low`
- - `likelihood=ignore` -> `ignore`
- - `likelihood=unknown` -> `low`
-- `impact=low`:
- - `likelihood=high` -> `low`
- - `likelihood=medium` -> `low`
- - `likelihood=low` -> `low`
- - `likelihood=ignore` -> `ignore`
- - `likelihood=unknown` -> `low`
-- `impact=ignore`:
- - all likelihoods -> `ignore`
-- `impact=unknown`:
- - `likelihood=high` -> `medium`
- - `likelihood=medium` -> `low`
- - `likelihood=low` -> `low`
- - `likelihood=ignore` -> `ignore`
- - `likelihood=unknown` -> `low`
-
-Priority mapping after final severity:
+Map the final reportable severity to a priority.
- `critical` -> `P0`
- `high` -> `P1`
- `medium` -> `P2`
- `low` -> `P3`
-Use this mapping after the final policy-adjustment pass determines the final reportable severity. Do not assign a priority to findings whose final policy decision is `ignore`.
-
-Once the facts are set, use the severity calibration and final policy-adjustment matrix mechanically. Do not re-argue severity from scratch afterward.
+An ignored finding receives an `ignore` decision and severity, with no priority.
diff --git a/sdk/typescript/docs/classify-severity-records.md b/sdk/typescript/docs/classify-severity-records.md
index 20be477a2..01426b2bf 100644
--- a/sdk/typescript/docs/classify-severity-records.md
+++ b/sdk/typescript/docs/classify-severity-records.md
@@ -25,7 +25,7 @@ Send one newline-delimited JSON-RPC request with `method: "run"` and these param
```
The `rubric` field is optional. Omit it to classify with the
-[built-in severity rubric](https://github.com/openai/codex-security/blob/main/sdk/typescript/src/default-severity-rubric.ts), using the same configured
+[built-in severity rubric](https://github.com/openai/codex-security/blob/main/plugins/codex-security/references/default-severity-rubric.md), using the same configured
independent host reviews and usage accounting. The result echoes its built-in
revision (currently `1`) and exact Markdown SHA-256. Supplying a custom rubric
replaces the default completely and preserves the supplied revision/hash binding.
diff --git a/sdk/typescript/docs/cli.md b/sdk/typescript/docs/cli.md
index a501f709f..3c28d4dd7 100644
--- a/sdk/typescript/docs/cli.md
+++ b/sdk/typescript/docs/cli.md
@@ -1762,7 +1762,7 @@ The [records protocol](classify-severity-records.md) accepts immutable Markdown
report snapshots and delegates model execution to the host.
For saved findings, use exactly one of `--scan` (ID, prefix, or `latest`) and `--scan-dir`.
-By default, saved findings are classified with the [built-in severity rubric](https://github.com/openai/codex-security/blob/main/sdk/typescript/src/default-severity-rubric.ts).
+By default, saved findings are classified with the [built-in severity rubric](https://github.com/openai/codex-security/blob/main/plugins/codex-security/references/default-severity-rubric.md).
It evaluates attacker access, boundary crossing, additional harm, and evidence for
Critical, High, Medium, Low, and Informational findings. Confidence remains separate
from severity; missing proof alone does not justify a downgrade.
diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json
index a97b00433..711dfce63 100644
--- a/sdk/typescript/package.json
+++ b/sdk/typescript/package.json
@@ -59,7 +59,7 @@
"scripts": {
"audit:prod": "pnpm audit --prod --audit-level high",
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
- "build": "node --run clean && node scripts/generate-deep-defaults.mjs && tsc -p tsconfig.build.json && node scripts/generate-project-config-schema.mjs",
+ "build": "node --run clean && node scripts/generate-plugin-defaults.mjs && tsc -p tsconfig.build.json && node scripts/generate-project-config-schema.mjs",
"build:ci": "tsc -p tsconfig.ci.json",
"build:evals": "node --run build && tsc -p ../../evals/tsconfig.json",
"build:examples": "tsc -p tsconfig.examples.json",
@@ -78,7 +78,7 @@
"test:mcp": "node --run build:plugin && pnpm --dir ../../plugins/codex-security/mcp-app run test:mcp",
"test:mutation": "stryker run",
"test:package": "node scripts/smoke-package.mjs",
- "types": "node scripts/generate-deep-defaults.mjs --check && node scripts/generate-project-config-schema.mjs --check && pnpm run generate:models:check && pnpm run generate:external-import-models:check && pnpm --dir ../../plugins/codex-security/mcp-app run typecheck && tsc --noEmit"
+ "types": "node scripts/generate-plugin-defaults.mjs --check && node scripts/generate-project-config-schema.mjs --check && pnpm run generate:models:check && pnpm run generate:external-import-models:check && pnpm --dir ../../plugins/codex-security/mcp-app run typecheck && tsc --noEmit"
},
"dependencies": {
"@inquirer/prompts": "8.7.4",
diff --git a/sdk/typescript/scripts/generate-deep-defaults.mjs b/sdk/typescript/scripts/generate-deep-defaults.mjs
deleted file mode 100644
index 8b86e9b97..000000000
--- a/sdk/typescript/scripts/generate-deep-defaults.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-import { readFile, writeFile } from "node:fs/promises";
-import { format } from "prettier";
-
-const defaults = JSON.parse(
- await readFile(
- new URL(
- "../../../plugins/codex-security/scripts/deep_scan_defaults.json",
- import.meta.url,
- ),
- "utf8",
- ),
-);
-const contents = await format(
- `// Generated from the plugin deep_scan_defaults.json. Run pnpm build.\nexport const DEFAULT_DEEP_SCAN_SETTINGS = ${JSON.stringify(defaults)} as const;\n`,
- { parser: "typescript" },
-);
-const output = new URL("../src/deep-scan-defaults.ts", import.meta.url);
-if (process.argv.includes("--check")) {
- if ((await readFile(output, "utf8")).replaceAll("\r\n", "\n") !== contents) {
- throw new Error("Deep scan defaults are out of date. Run pnpm build.");
- }
-} else {
- await writeFile(output, contents);
-}
diff --git a/sdk/typescript/scripts/generate-plugin-defaults.mjs b/sdk/typescript/scripts/generate-plugin-defaults.mjs
new file mode 100644
index 000000000..1a35defd5
--- /dev/null
+++ b/sdk/typescript/scripts/generate-plugin-defaults.mjs
@@ -0,0 +1,29 @@
+import { readFile, writeFile } from "node:fs/promises";
+import { format } from "prettier";
+
+const plugin = new URL("../../../plugins/codex-security/", import.meta.url);
+const deepDefaults = JSON.parse(
+ await readFile(new URL("scripts/deep_scan_defaults.json", plugin), "utf8"),
+);
+const rubricPath = "references/default-severity-rubric.md";
+const rubric = await readFile(new URL(rubricPath, plugin), "utf8");
+
+for (const [filename, source] of [
+ [
+ "deep-scan-defaults.ts",
+ `// Generated from the plugin deep_scan_defaults.json. Run pnpm build.\nexport const DEFAULT_DEEP_SCAN_SETTINGS = ${JSON.stringify(deepDefaults)} as const;\n`,
+ ],
+ [
+ "default-severity-rubric.ts",
+ `// Generated from the plugin ${rubricPath}. Run pnpm build.\nexport const defaultSeverityRubric = ${JSON.stringify(rubric)};\n`,
+ ],
+]) {
+ const contents = await format(source, { parser: "typescript" });
+ const output = new URL(`../src/${filename}`, import.meta.url);
+ if (process.argv.includes("--check")) {
+ if ((await readFile(output, "utf8")).replaceAll("\r\n", "\n") !== contents)
+ throw new Error(`${filename} is out of date. Run pnpm build.`);
+ } else {
+ await writeFile(output, contents);
+ }
+}
diff --git a/sdk/typescript/src/custom-validation-prompt.ts b/sdk/typescript/src/custom-validation-prompt.ts
index d52c303fd..30a7d547b 100644
--- a/sdk/typescript/src/custom-validation-prompt.ts
+++ b/sdk/typescript/src/custom-validation-prompt.ts
@@ -9,6 +9,7 @@ import { PLUGIN_NAME } from "./runtime.js";
// the ordinary validation sequence with a custom-validation request.
const SOURCES = {
"references/core-scan.md": [
+ "0e301a70d9f20acbb797f5eafcac84c09dd0513991714812d5c4f7b1f64a4a89",
"7690b6c854de07ff15984f6d2c25ddfa1f6ae65f65876cadf2f904054b4f0679",
"83bafdc4089803e631eaaa86ec57167c7da3f51794514d0dcdb62c5afdced8a7",
"848eb40d42b0bf9cf21748b9927d031b0461a4443f63e3954139f9801f41c3f6",
diff --git a/sdk/typescript/src/default-severity-rubric.ts b/sdk/typescript/src/default-severity-rubric.ts
index 6c1c5bb20..f3ef62680 100644
--- a/sdk/typescript/src/default-severity-rubric.ts
+++ b/sdk/typescript/src/default-severity-rubric.ts
@@ -1,66 +1,3 @@
-/** Built into the CLI and SDK so classification needs no external policy file. */
-export const defaultSeverityRubric = `# Severity guidance
-
-Judge the attacker's actual starting access, the security boundary crossed, and
-the additional unauthorized harm. Use the supplied report and evidence; do not
-perform new validation. Keep confidence separate from severity and identify the
-missing fact that could change the assessment. Missing proof alone does not
-establish that a broader attack is impossible; do not invent an attack path or
-downgrade merely because exploitation was not demonstrated.
-
-## Critical
-
-Reserve Critical for consequential, strongly supported compromise meeting all
-three conditions:
-- Access: an unauthenticated internet attacker, ordinary external user, or
- publicly admitted untrusted workload can exploit the interface without
- employee-only access, an invitation, an approved business relationship, or
- compromise of a trusted supplier.
-- Impact: crossing an important security boundary enables consequential access
- to protected data, privileged actions, meaningful code execution, workload
- escape, or comparable compromise of the affected system.
-- Evidence: demonstrated exploitation or strong source-backed validation
- establishes the complete attack path.
-
-Second-order attacks can qualify: an external attacker plants data that a trusted
-user or system later processes, causing consequential unauthorized access or
-privileged actions.
-
-## High
-
-Assign High when a realistic, evidenced path gives a lower-trust attacker a
-substantial unauthorized capability they did not already possess. Internal
-users, partners, invited collaborators, and admitted untrusted workloads can
-qualify; unauthenticated internet access is not required. Consequences include
-sensitive customer or business data or reusable credentials, account takeover,
-meaningful cross-tenant access or actions as another user, control of production
-workloads or deployments, privileged identities, encryption keys or important
-isolation boundaries, or significant repeatable disruption of a critical or
-shared service. A dangerous function, production label, internal access, or the
-existence of a privileged credential alone is insufficient: identify the
-lower-trust actor, boundary crossing, and consequential new capability.
-
-## Medium
-
-Assign Medium to a credible vulnerability with concretely bounded impact, such
-as nonsecret operational information, narrow unauthorized changes, contained
-disruption of a noncritical service, or isolated development or staging systems
-without a consequential pivot. A fully demonstrated vulnerability can still be
-Medium. Base a downgrade on verified constraints, not on an assumption that
-missing evidence rules out broader harm.
-
-## Low
-
-Assign Low to a supported security weakness with minor additional unauthorized
-harm and verified limits on its scope, sensitivity, or duration, such as a small
-information exposure with little security value or a narrowly contained nuisance.
-Do not use Low as a substitute for uncertainty about a potentially serious path.
-
-## Informational
-
-Assign Informational to a hardening opportunity or observation for which the
-supplied evidence establishes no additional unauthorized capability or security
-impact. Explain why it is informational rather than treating missing proof of
-exploitation as proof of safety. Administrative records that do not describe a
-security finding may be excluded; exclusion is distinct from severity.
-`;
+// Generated from the plugin references/default-severity-rubric.md. Run pnpm build.
+export const defaultSeverityRubric =
+ "# Severity guidance\n\nJudge the attacker's actual starting access, the security boundary crossed, and the additional unauthorized harm. Keep confidence separate from severity and identify the missing fact that could change the assessment. Missing proof alone does not establish that a broader attack is impossible; do not invent an attack path or downgrade merely because exploitation was not demonstrated.\n\n## Critical\n\nReserve Critical for consequential, strongly supported compromise meeting all three conditions:\n- Access: an unauthenticated internet attacker, ordinary external user, or publicly admitted untrusted workload can exploit the interface without employee-only access, an invitation, an approved business relationship, or compromise of a trusted supplier.\n- Impact: crossing an important security boundary enables consequential access to protected data, privileged actions, meaningful code execution, workload escape, or comparable compromise of the affected system.\n- Evidence: demonstrated exploitation or strong source-backed validation establishes the complete attack path.\n\nSecond-order attacks can qualify: an external attacker plants data that a trusted user or system later processes, causing consequential unauthorized access or privileged actions.\n\n## High\n\nAssign High when a realistic, evidenced path gives a lower-trust attacker a substantial unauthorized capability they did not already possess. Internal users, partners, invited collaborators, and admitted untrusted workloads can qualify; unauthenticated internet access is not required. Consequences include sensitive customer or business data or reusable credentials, account takeover, meaningful cross-tenant access or actions as another user, control of production workloads or deployments, privileged identities, encryption keys or important isolation boundaries, or significant repeatable disruption of a critical or shared service. A dangerous function, production label, internal access, or the existence of a privileged credential alone is insufficient: identify the lower-trust actor, boundary crossing, and consequential new capability.\n\n## Medium\n\nAssign Medium to a credible vulnerability with concretely bounded impact, such as nonsecret operational information, narrow unauthorized changes, contained disruption of a noncritical service, or isolated development or staging systems without a consequential pivot. A fully demonstrated vulnerability can still be Medium. Base a downgrade on verified constraints, not on an assumption that missing evidence rules out broader harm.\n\n## Low\n\nAssign Low to a supported security weakness with minor additional unauthorized harm and verified limits on its scope, sensitivity, or duration, such as a small information exposure with little security value or a narrowly contained nuisance. Do not use Low as a substitute for uncertainty about a potentially serious path.\n\n## Informational\n\nAssign Informational to a hardening opportunity or observation for which the supplied evidence establishes no additional unauthorized capability or security impact. Explain why it is informational rather than treating missing proof of exploitation as proof of safety. Administrative records that do not describe a security finding may be excluded; exclusion is distinct from severity.\n";
diff --git a/sdk/typescript/tests-ts/build-plugin.test.ts b/sdk/typescript/tests-ts/build-plugin.test.ts
index 4f744a897..8a8130ff7 100644
--- a/sdk/typescript/tests-ts/build-plugin.test.ts
+++ b/sdk/typescript/tests-ts/build-plugin.test.ts
@@ -16,6 +16,7 @@ import { brotliDecompressSync } from "node:zlib";
import { promisify } from "node:util";
import { afterEach, describe, expect, test } from "bun:test";
import { buildBundledPlugin } from "../scripts/build-plugin.mjs";
+import { defaultSeverityRubric } from "../src/default-severity-rubric.js";
import { assertGeneratedPluginUntracked } from "../scripts/check-plugin-source.mjs";
import { PLUGIN_ROOT } from "./plugin-root.js";
@@ -78,6 +79,15 @@ describe("bundled plugin build", () => {
}
});
+ test("ships the same default severity rubric in the plugin and SDK", async () => {
+ const path = "references/default-severity-rubric.md";
+ const source = await readFile(
+ new URL(`../../../plugins/codex-security/${path}`, import.meta.url),
+ );
+ expect(await readFile(join(PLUGIN_ROOT, path))).toEqual(source);
+ expect(Buffer.from(defaultSeverityRubric)).toEqual(source);
+ });
+
test("copies Python contracts and completed examples unchanged from source", async () => {
const source = fileURLToPath(
new URL("../../../plugins/codex-security/", import.meta.url),