Repository navigation
fix(test): isolate native executables in private temporary directories - #37
Merged
Merged
Conversation
mremond
force-pushed
the
fm/task-8bf9d133
branch
from
November 14, 2026 14:35
8ec813f to
614b5fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Prevent another local user from redirecting native test compilation or replacing test executables.
What changed
Before and after
Before: A planted directory symlink redirected two real test executables into directories with mode 0777.
After: The adversarial regression passed 17 scenarios and observed 13 distinct mode-0700 executable directories with no leaks.
This changes temporary executable storage, not the test interface; linker-boundary transcripts verify the filesystem behavior.
Checked
Live validation: Demonstrated for this version. 4 of 4 scenarios driven live in the product.
How it was checked
Built the runtime before the compiler using cargo build --release --locked for each package.
Ran python3 scripts/test-test-storage.py with disposable fixtures, an isolated HOME and an aliased temporary parent.
Ran cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --locked --no-fail-fast.
Ran ./target/release/nera test -j 1 --timeout 30, scripts/test-allocator-config.py and scripts/test-stacktrace-order.py.
Corrected duplicate EUnit fixture sources and a macOS temporary-path comparison; the complete aliased-parent rerun passed all 17 cases.
Risk
Risk above low: Novelty, medium — Adds a storage helper using existing ancestry checks and temporary-directory guards.
Full risk assessment
Not done
Native multi-account Unix access checks and Windows ACL behavior were not exercised.
EUnit storage verification used a local framework stand-in rather than external OTP sources.
Pipeline
Updates from git push no-mistakes
Infinitary checked this version: an independent review that also judged the documents, and live validation the review accepted.