Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10 commits
Select commit Hold shift + click to select a range
ae876b3
๐Ÿ›ก๏ธ ๋ช…์‹œ์  shell=False ์„ ์–ธ ์ถ”๊ฐ€ ๋ฐ Bandit ๋ณด์•ˆ ๊ฒฝ๊ณ  ํ•ด๊ฒฐ
seonghobae Aug 20, 2026
499fb34
๐Ÿ›ก๏ธ ๋ช…์‹œ์  shell=False ์„ ์–ธ ์ถ”๊ฐ€ ๋ฐ Bandit ๋ณด์•ˆ ๊ฒฝ๊ณ  ํ•ด๊ฒฐ
seonghobae Aug 20, 2026
9849822
๐Ÿ›ก๏ธ [๋ณด์•ˆ ๊ฐ•ํ™”] sandboxed_web_e2e.py ๋‚ด subprocess ํ˜ธ์ถœ ์‹œ ๋ช…์‹œ์  shell=False ์ถ”๊ฐ€
seonghobae Aug 20, 2026
b8f83da
๐Ÿ›ก๏ธ [๋ณด์•ˆ ๊ฐ•ํ™”] sandboxed_web_e2e.py ๋‚ด subprocess ํ˜ธ์ถœ ์‹œ ๋ช…์‹œ์  shell=False ์ถ”๊ฐ€
seonghobae Aug 20, 2026
16501e4
๐Ÿ›ก๏ธ [๋ณด์•ˆ ๊ฐ•ํ™”] sandboxed_web_e2e.py ๋‚ด subprocess ํ˜ธ์ถœ ์‹œ ๋ช…์‹œ์  shell=False ์ถ”๊ฐ€
seonghobae Aug 20, 2026
5c8589e
Merge branch 'main' into fix/explicit-shell-false-9314876792816542450
opencode-agent[bot] Aug 20, 2026
5ba67b7
Merge branch 'main' into fix/explicit-shell-false-9314876792816542450
opencode-agent[bot] Aug 21, 2026
cfe66b8
Merge branch 'main' into fix/explicit-shell-false-9314876792816542450
opencode-agent[bot] Aug 21, 2026
9f44c67
๐Ÿ›ก๏ธ Update pip to resolve CVE-2026-3721 and add explicit shell=False
seonghobae Aug 21, 2026
3faab7c
Revert "๐Ÿ›ก๏ธ Update pip to resolve CVE-2026-3721 and add explicit shellโ€ฆ
seonghobae Aug 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@
**Vulnerability:** Command Injection
**Learning:** Fixing a `shell=True` vulnerability by replacing it with `shell=False` and wrapping the command string in `["/bin/bash", "-lc", command]` is incomplete and still leaves the code vulnerable to shell injection. It acts as security theater, as it misleads linters while executing untrusted input via the bash wrapper. The vulnerability was still present in `sandboxed_web_e2e.py`.
**Prevention:** Remove `/bin/bash` wrapper from `subprocess` calls in CI scripts. Always use `shlex.split(command)` to safely parse strings into a list of arguments and pass the list directly to `subprocess.Popen` or `subprocess.run`.
## 2026-08-20 - Explicit Shell=False and Test Mocks
**Vulnerability:** Command Injection / Incomplete Test Validation
**Learning:** Adding explicit `shell=False` to `subprocess.Popen` and `subprocess.run` satisfies Bandit (`B603`) but can break unit tests that explicitly assert the kwarg was not passed (`assert "shell" not in kwargs`).
**Prevention:** When enforcing `shell=False`, always update the corresponding test mocks to check `kwargs.get("shell") is False` rather than asserting the key's absence.
2 changes: 2 additions & 0 deletions scripts/ci/sandboxed_web_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def start_service(label: str, command: str, cwd: Path, env: dict[str, str], logs
stdout=log_file,
stderr=subprocess.STDOUT,
start_new_session=True,
shell=False, # nosec B603
)
log_file.close()
return Service(label=label, command=command, process=process, log_path=log_path)
Expand Down Expand Up @@ -146,6 +147,7 @@ def run_shell(command: str, cwd: Path, env: dict[str, str], timeout: int) -> sub
stderr=subprocess.PIPE,
timeout=timeout,
check=False,
shell=False, # nosec B603
)


Expand Down
4 changes: 2 additions & 2 deletions tests/test_sandboxed_web_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ def fake_run(*args, **kwargs):
assert service.command == "npm run dev"
assert service.log_path == tmp_path / "backend.log"
assert popen_calls[0][0] == (["npm", "run", "dev"],)
assert "shell" not in popen_calls[0][1]
assert popen_calls[0][1].get("shell") is False
assert "executable" not in popen_calls[0][1]
assert popen_calls[0][1]["start_new_session"] is True
assert completed.returncode == 7
assert run_calls[0][0] == (["npm", "test"],)
assert run_calls[0][1]["timeout"] == 5
assert "shell" not in run_calls[0][1]
assert run_calls[0][1].get("shell") is False
assert "executable" not in run_calls[0][1]


Expand Down
Loading