rust-lang / rust-lang/rustwide
Add Command::env_clear method
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 198
- Forks
- 45
- Avg merge
- 18h 46m
- Merged PRs (30d)
- 7
Description
std::process:Command has an env_clear method to clear all environment variables before forking a process. As far as I can tell, it's not possible to call this on rustwide::cmd::Command. It would be nice to add it. In particular, docs.rs uses rustwide::cmd::Command to run cargo fetch in a non-containerized process; clearing the environment would be one simple way to reduce the possibility of accidentally propagating host configuration. See https://github.com/rust-lang/docs.rs/issues/1881 for an example.
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 with rustwide::cmd::Command and compare its exposed environment-management methods with std::process::Command::env_clear. Add the corresponding capability and verify that a command such as docs.rs's cargo fetch can clear inherited environment variables before execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100