oracle / oracle/macaron

Restrict invokig `subprocess.run` via an internal API

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

Nobody has claimed this yet.

code quality
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

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.