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

test(windows): make canonical plugin path fixtures portable (#684)

faizan-oai18236ee695f6
diff --git a/plugins/codex-security/tests/test_generate_rank_input.py b/plugins/codex-security/tests/test_generate_rank_input.py
index e4101e7dc..359c85c18 100644
--- a/plugins/codex-security/tests/test_generate_rank_input.py
+++ b/plugins/codex-security/tests/test_generate_rank_input.py
@@ -227,6 +227,7 @@ def test_make_repo_rank_input_preserves_legacy_tilde_scope(
(repo / "src").mkdir(parents=True)
(repo / "src" / "runtime.py").write_text("runtime = True", encoding="utf-8")
monkeypatch.setenv("HOME", str(home))
+ monkeypatch.setenv("USERPROFILE", str(home))
output = tmp_path / "rank_input.jsonl"
run_cli(
diff --git a/plugins/codex-security/tests/test_workbench_target.py b/plugins/codex-security/tests/test_workbench_target.py
index 315f8dfce..a4e37753c 100644
--- a/plugins/codex-security/tests/test_workbench_target.py
+++ b/plugins/codex-security/tests/test_workbench_target.py
@@ -57,9 +57,8 @@ def test_git_output_decodes_repository_paths_as_utf8(
initialize_git_repository(target)
monkeypatch.setattr(subprocess, "_text_encoding", lambda: encoding)
- assert WORKBENCH_TARGET["git_output"](target, "rev-parse", "--show-toplevel") == str(
- target
- )
+ output = WORKBENCH_TARGET["git_output"](target, "rev-parse", "--show-toplevel")
+ assert Path(output) == target
def test_directory_content_digest_uses_git_file_set(tmp_path: Path) -> None: