MCPcopy
hub / github.com/openai/plugins / available_artifact_path

Function available_artifact_path

plugins/codex-security/scripts/workbench_db.py:3497–3506  ·  view source on GitHub ↗
(scan_dir: Path, candidate: Path)

Source from the content-addressed store, hash-verified

3495
3496
3497def available_artifact_path(scan_dir: Path, candidate: Path) -> Path | None:
3498 try:
3499 resolved_scan_dir = require_canonical_scan_directory(scan_dir)
3500 resolved = candidate.resolve(strict=True)
3501 resolved.relative_to(resolved_scan_dir)
3502 except (FileNotFoundError, RuntimeError, SystemExit, ValueError):
3503 return None
3504 if resolved != candidate or not candidate.is_file():
3505 return None
3506 return resolved
3507
3508
3509def artifact_path(scan_dir: Path, file_name: str, *, required: bool) -> Path | None:

Callers 2

write_csv_exportFunction · 0.85
scan_resultFunction · 0.85

Calls 1

Tested by

no test coverage detected