[WRONG BRANCH] tests: use private temp dir for route scanner probe to prevent symlink clobbering - #379
[WRONG BRANCH] tests: use private temp dir for route scanner probe to prevent symlink clobbering#379luvs01 wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
.tmp-scanner-probe.ts) with a plainwriteFileSync, which can follow a pre-planted workspace symlink and truncate an attacker-chosen target; this change removes that attack surface.Description
mkdtempSync(join(tmpdir(), "ocx-route-scanner-")), write it withwriteFileSync, and remove the whole temp directory withrmSync(..., { recursive: true, force: true }), and add the requirednode:fs/node:osimports totests/management-route-registry.test.ts.Testing
bun test tests/management-route-registry.test.ts(passed),bun run typecheck(passed), andbun run privacy:scan(passed), and validated the scanner assertion still fails loud when appropriate; a fullbun run testrun was not relied on here because unrelated existing suite failures/timeouts were observed when run end-to-end.Codex Task