openedx / openedx/codejail

not_safe_exec should use a subprocess

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

Nobody has claimed this yet.

Dominant language
Python
Stars
479
Forks
84
Avg merge
16h 34m
Merged PRs (30d)
2

Description

not_safe_exec is for running tests that use CodeJail but don't want to require an actual CodeJail configured. Now, it runs the code directly in the current process. This is bad because it monkey-patches random without attempting to clean it up. To better emulate CodeJail, it should run the code in a subprocess.

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

Locate the not_safe_exec implementation and inspect how CodeJail executes code in a subprocess. Run the existing tests that exercise not_safe_exec; done means the helper uses a subprocess and no longer changes the current process's random behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.