Skip to content

fix(paths): delete the dead tmpdir bypass entry, and pin what the list is - #111

Merged
kridaydave merged 1 commit into
mainfrom
k5/debt-tmpdir-bypass
Oct 13, 2026
Merged

kridaydave merged 1 commit into
mainfrom
k5/debt-tmpdir-bypass

Conversation

@kridaydave

Copy link
Copy Markdown
Owner

Removes stale tmpdir bypass entry and pins allowed list. Adds default-allowed test coverage.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 93aaee0e-b3b5-4363-832e-fda620c4f847
📥 Commits

Reviewing files that changed from the base of the PR and between 480c332 and 3657c2d.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/core/config/paths.ts
  • tests/unit/core/config/default-allowed.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…t is

`getDefaultAllowedDirs` carries a test-mode bypass for directories that may
be absent on a CI runner, and `os.tmpdir()` was one of its entries. A bypass
only spares a directory the existence filter would drop, so it cannot add
one that was never a candidate. `os.tmpdir()` was not a candidate: it was
never in the allow-list on any machine, while reading as always-allowed.

I tried the other fix first, pushing it onto the candidate list so the
bypass earned its entry. That makes every `mkdtemp` fixture legal without a
`customAllowed` widening, and it is what the comment always claimed. It also
breaks four suites that used `os.tmpdir()` as the thing outside the
whitelist, because it stops being outside: `security_suite`'s blocked dir,
`adversarial-tool-gates`' outside dir, a hardcoded `/tmp/...` in
`v5-regressions`, and `once-single-pass`' "exits 1 when a directory is
refused by the path gate". The only portable replacement is a fresh dir
directly in the home directory, which is what AGENTS.md rule 1 refuses. A
test-mode allow-list is the last thing to widen casually.

So the dead entry is gone and the comment states what a bypass can and
cannot do. Nothing about the allow-list changes. The new suite pins the
result: cwd is there, the bypassed home dirs are there even when absent,
the temp directory is not, a non-bypassed missing dir is still dropped, and
no directory is listed twice. Mutation-checked by making `os.tmpdir()` a
real candidate; the pin goes red.

Commit made by Step 5 Preview Free in OpenCode on behalf of Kriday.
@kridaydave
kridaydave force-pushed the k5/debt-tmpdir-bypass branch from e47582c to 3657c2d Compare October 13, 2026 16:58
@kridaydave
kridaydave merged commit 4a9bde6 into main Oct 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant