OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
TypeScript ai-securityapplication-securityclicode-scanningcodexcodex-securitycybersecuritydevsecopsnodejsnpmopenaisdksecuritytypescriptvulnerability-scanning
docs: align container and completed-scan examples (#385)
mldangelo-oai64217dde2114
diff --git a/sdk/typescript/README.md b/sdk/typescript/README.mdindex 8a7f08ef2..10a0dfbe9 100644--- a/sdk/typescript/README.md+++ b/sdk/typescript/README.md@@ -657,7 +657,7 @@ from the root of the Codex Security repository:mkdir -p results statechmod 700 results stateexport CODEX_SECURITY_USER="$(id -u):$(id -g)"-export CODEX_SECURITY_IMAGE=ghcr.io/openai/codex-security:0.1.4+export CODEX_SECURITY_IMAGE=ghcr.io/openai/codex-security:latestdocker compose pull codex-securitydocker compose run --rm codex-security login --device-authdocker compose run --rm codex-securitydiff --git a/sdk/typescript/_bundled_plugin/examples/completed-scan/coverage.json b/sdk/typescript/_bundled_plugin/examples/completed-scan/coverage.jsonindex d4a062e45..deba18fa3 100644--- a/sdk/typescript/_bundled_plugin/examples/completed-scan/coverage.json+++ b/sdk/typescript/_bundled_plugin/examples/completed-scan/coverage.json@@ -6,7 +6,7 @@"completeness": "complete","inventoryStrategy": "repository","includePaths": [- "src/"+ "."],"excludePaths": [],"surfaces": [diff --git a/sdk/typescript/_bundled_plugin/examples/completed-scan/scan-manifest.json b/sdk/typescript/_bundled_plugin/examples/completed-scan/scan-manifest.jsonindex 3f80480a1..15ea22387 100644--- a/sdk/typescript/_bundled_plugin/examples/completed-scan/scan-manifest.json+++ b/sdk/typescript/_bundled_plugin/examples/completed-scan/scan-manifest.json@@ -21,7 +21,7 @@},"scope": {"includePaths": [- "src/"+ "."],"excludePaths": []},@@ -35,7 +35,7 @@},{"path": "coverage.json",- "sha256": "ca91e7a3a89a477796b912232bb3473dead1d342f8b6b37b073bda168819aaa6",+ "sha256": "d55b9b98d48323b4659dfee6531ec83ec538f2084325412b7188bf85ad68b01b","mediaType": "application/json"}]diff --git a/sdk/typescript/tests-ts/contract.test.ts b/sdk/typescript/tests-ts/contract.test.tsindex 768fe2bb2..a47dcd0b6 100644--- a/sdk/typescript/tests-ts/contract.test.ts+++ b/sdk/typescript/tests-ts/contract.test.ts@@ -911,9 +911,15 @@ describe("canonical scan contract", () => {test("binds requested path scope, mode, and plugin version", async () => {const scanDir = await copyExample();+ const manifestPath = join(scanDir, "scan-manifest.json");+ const manifest = await readJson(manifestPath);+ manifest["scan"]["scope"]["includePaths"] = ["src"];+ await writeJson(manifestPath, manifest);const coveragePath = join(scanDir, "coverage.json");const coverage = await readJson(coveragePath);coverage["mode"] = "scoped_path";+ coverage["inventoryStrategy"] = "scoped_path";+ coverage["includePaths"] = ["src"];await writeJson(coveragePath, coverage);await reseal(scanDir);