Restrict invokig `subprocess.run` via an internal API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 210
- Forks
- 36
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Description
We need to manage and restrict the environment passed to the subprocess.run invocation by creating an internal API. We need to create an allow list for the env argument to prevent the subprocess from accessing sensitive data, such as GitHub tokens. We can also make sure that the dangerous argument shell=True is never used.
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 by locating every subprocess.run invocation in the repository and inspect how each currently builds its environment and arguments. Define the internal API around the requested environment allow list and shell restriction, then verify that all relevant callers use it and that sensitive variables cannot be passed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100