rust-lang / rust-lang/rustwide

Add Command::env_clear method

Open
#74 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.