trailofbits / trailofbits/mquire
Proposal: configurable staging dir (macos $TMPDIR volatility)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 185
- Forks
- 8
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 3
Description
Context: follow-up on PR #144 (closed — thanks for the clear review @alessandrogario).
On macOS hosts with TCC/sandbox restrictions, $TMPDIR points under /var/folders/... which is per-user and can be purged by the OS mid-run if the session leader changes or the process is backgrounded. This caused intermittent failures in my environment where mquire staged packages under that tree and later couldn't read them back.
Proposal for discussion (not a PR):
- Allow
--staging-dir <path>CLI flag override. - Default precedence:
MQUIRE_STAGING_DIRenv var if set$XDG_CACHE_HOME/mquire/stagingon Linux~/Library/Caches/mquire/stagingon macOS- fallback to
$TMPDIRonly when neither writable
- Preserve existing
$TMPDIRbehavior on platforms where the new defaults don't apply, so no behavioral change for current users.
Open questions for maintainers:
- Is the macOS
$TMPDIRvolatility reproducible in trailofbits' own CI/dev environments? If not, scope could be narrower (flag-only, no default change). - Preferred env var name? Happy to follow project conventions.
- Scope — is
mquire stagethe only consumer of temp dirs, or are there others to unify?
Happy to draft a PR against whatever plan you endorse — no changes to defaults without your sign-off.
Contributor guide
No contributing guide indexed for this repository
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 by tracing the mquire stage entry point and identifying all temporary-directory consumers, then review the context from PR #144. Confirm the macOS failure mode and gather maintainer decisions on the flag, environment variable, default precedence, and scope before defining the implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100