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

chore(codex-security): sync public projection

mldangelo-oai446987439d1f
diff --git a/sdk/typescript/tests-ts/cli.test.ts b/sdk/typescript/tests-ts/cli.test.ts
index b1f762eb6..3b6c16fef 100644
--- a/sdk/typescript/tests-ts/cli.test.ts
+++ b/sdk/typescript/tests-ts/cli.test.ts
@@ -12,7 +12,7 @@ import {
writeFile,
} from "node:fs/promises";
import { tmpdir } from "node:os";
-import { join } from "node:path";
+import { join, resolve } from "node:path";
import { Writable } from "node:stream";
import { pathToFileURL } from "node:url";
import { describe, expect, test } from "bun:test";
@@ -603,19 +603,21 @@ describe("CLI", () => {
}, 30_000);
test("lists repository and scan-root history without starting Codex", async () => {
+ const repository = resolve("/current/repository");
+ const scanRoot = resolve("/tmp/history");
const cases: Array<[string[], string[]]> = [
- [["scans"], ["list-scans", "--repository", "/current/repository"]],
+ [["scans"], ["list-scans", "--repository", repository]],
[
["scans", "list"],
- ["list-scans", "--repository", "/current/repository"],
+ ["list-scans", "--repository", repository],
],
[
["scans", "list", "other"],
- ["list-scans", "--repository", "/current/repository/other"],
+ ["list-scans", "--repository", resolve(repository, "other")],
],
[
["scans", "list", "--scan-root", "/tmp/history"],
- ["list-scans", "--scan-root", "/tmp/history"],
+ ["list-scans", "--scan-root", scanRoot],
],
];
for (const [argv, expected] of cases) {