trifectatechfoundation / trifectatechfoundation/sudo-rs
test_traverse_secure_open_positive() makes assumptions about current directory
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.5k
- Forks
- 179
- Avg merge
- 16h 45m
- Merged PRs (30d)
- 4
Description
The test test_traverse_secure_open_positive() at https://github.com/trifectatechfoundation/sudo-rs/blob/main/src/system/audit.rs#L359 makes assumptions about the current directory and its parents. These don't hold in Debian's CI, which runs cargo test from outside the (read-only) directory containing the crate source code.
Another variant where this breaks is running cargo test in the crate dir if any of its parents are world-writable.
I've disable the test for now in Debian (pending review and upload), but ideally this would not rely on the test environment, but create the required directory hierarchy or detect if it is not suitable and skip the test instead of failing int..
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test_traverse_secure_open_positive() in src/system/audit.rs around line 359, then run cargo test from outside the crate source directory and from a crate directory with world-writable parents. Done means the test no longer assumes those environments, either by creating the required hierarchy or skipping when it is unsuitable, without failing Debian CI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100