Skip to content

🛡️ Sentinel: [security improvement] Add explicit shell=False to Subprocess in CI Python Scripts - #1067

Closed
seonghobae wants to merge 7 commits into
mainfrom
sentinel/explicit-shell-false-subprocess-1270564884955014082
Closed

🛡️ Sentinel: [security improvement] Add explicit shell=False to Subprocess in CI Python Scripts#1067
seonghobae wants to merge 7 commits into
mainfrom
sentinel/explicit-shell-false-subprocess-1270564884955014082

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

🚨 Severity: MEDIUM
💡 Vulnerability: subprocess.run and subprocess.Popen without explicit shell=False arguments fail security linting checks and leave ambiguity about shell execution intentions.
🎯 Impact: Linters like bandit require shell=False for validation even if the default behavior is safe. Explicit definition clarifies security posture and maintains strict CI validation.
🔧 Fix: Added shell=False explicitly to subprocess.run and subprocess.Popen in scripts/ci/agent_mention_router.py and scripts/ci/sandboxed_web_e2e.py. Updated tests/test_sandboxed_web_e2e.py to match. Updated .jules/sentinel.md journal.
Verification: Verified by running bandit which no longer flags warnings, and pytest tests/test_sandboxed_web_e2e.py tests/test_agent_mention_router.py passes.


PR created automatically by Jules for task 1270564884955014082 started by @seonghobae

…ocess in CI Python Scripts

* Adds `shell=False` to `subprocess.run` and `subprocess.Popen` in `scripts/ci/agent_mention_router.py` and `scripts/ci/sandboxed_web_e2e.py`.
* Updates tests in `tests/test_sandboxed_web_e2e.py` to assert the updated arguments.
* Updates `.jules/sentinel.md` with learnings regarding linter requirements for explicit `shell=False`.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c3e9774c-8315-466e-a95c-b12c47281c44

📥 Commits

Reviewing files that changed from the base of the PR and between d91a4dd and e3b673f.

📒 Files selected for processing (51)
  • .github/workflows/accounting-information-platform-hourly-review-repair.yml
  • .github/workflows/bandscope-hourly-review-repair.yml
  • .github/workflows/governance-risk-compliance-hourly-review-repair.yml
  • .github/workflows/hourly-nvidia-nim-review-repair.yml
  • .github/workflows/organization-commercial-readiness-loop-quality-ci.yml
  • .github/workflows/organization-commercial-readiness-loop.yml
  • .github/workflows/originweave-hourly-review-repair.yml
  • .gitignore
  • .jules/bolt.md
  • .jules/sentinel.md
  • AGENTS.md
  • ARCHITECTURE.md
  • CHANGELOG.md
  • CLAUDE.md
  • docs/doctoring/bandscope-hourly-review-caller.md
  • docs/doctoring/governance-risk-compliance-hourly-review-caller.md
  • docs/doctoring/organization-commercial-readiness-loop.md
  • docs/doctoring/originweave-hourly-review-caller.md
  • docs/doctoring/trusted-uv-lock-materialization.md
  • opencode.jsonc
  • organization_commercial_readiness_fixtures.py
  • scripts/ci/agent_mention_router.py
  • scripts/ci/assert_opencode_reasoning_effort.py
  • scripts/ci/materialize_base_python_requirements.py
  • scripts/ci/organization_commercial_readiness_loop.py
  • scripts/ci/r_coverage_peer_gate.py
  • scripts/ci/sandboxed_web_e2e.py
  • tests/test_assert_opencode_reasoning_effort.py
  • tests/test_bandscope_hourly_review_caller.py
  • tests/test_governance_risk_compliance_hourly_review_caller.py
  • tests/test_materialize_base_python_requirements.py
  • tests/test_opencode_agent_contract.py
  • tests/test_organization_commercial_readiness_loop_coordinator.py
  • tests/test_organization_commercial_readiness_loop_credential_contract.py
  • tests/test_organization_commercial_readiness_loop_github.py
  • tests/test_organization_commercial_readiness_loop_import_contract.py
  • tests/test_organization_commercial_readiness_loop_operational_failures.py
  • tests/test_organization_commercial_readiness_loop_organization_scope.py
  • tests/test_organization_commercial_readiness_loop_policy.py
  • tests/test_organization_commercial_readiness_loop_receipt_contract.py
  • tests/test_organization_commercial_readiness_loop_resource_limits.py
  • tests/test_organization_commercial_readiness_loop_run_pagination.py
  • tests/test_organization_commercial_readiness_loop_secret_scope.py
  • tests/test_organization_commercial_readiness_loop_workflow_source_scope.py
  • tests/test_organization_commercial_readiness_token_redaction.py
  • tests/test_originweave_hourly_review_caller.py
  • tests/test_r_coverage_peer_gate.py
  • tests/test_sandboxed_web_e2e.py
  • tests/test_trusted_uv_download_contract.py
  • tests/test_uv_redirect_and_coverage_contract.py
  • tests/test_uv_redirect_boundary.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

opencode-agent Bot and others added 6 commits August 18, 2026 14:51
* Adds hostname validation using `urllib.parse` to `wait_for_url` in `scripts/ci/sandboxed_web_e2e.py` to ensure only `localhost` or `127.0.0.1` are accessible, mitigating SSRF risks as flagged by the Strix security scanner.
* Updates `tests/test_sandboxed_web_e2e.py` with tests asserting rejection of external hostnames.
* Updates `.jules/sentinel.md` with new learnings regarding hostname validation for SSRF prevention.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e3b673f8a302d24acb88d35ab25abaaeaa325c1a.

  • Head SHA: e3b673f8a302d24acb88d35ab25abaaeaa325c1a

  • Workflow run: 32190682607

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (7 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (9 files)"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs (5 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["CI script (6 files)"]
  S4 --> I4["review and security gate shell path"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (24 files)"]
  S5 --> I5["regression suite"]
  I5 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V5["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: e3b673f8a302d24acb88d35ab25abaaeaa325c1a
  • Workflow run: 32193040239
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e3b673f8a302d24acb88d35ab25abaaeaa325c1a.

  • Head SHA: e3b673f8a302d24acb88d35ab25abaaeaa325c1a

  • Workflow run: 32193040239

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (7 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (9 files)"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs (5 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["CI script (6 files)"]
  S4 --> I4["review and security gate shell path"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (24 files)"]
  S5 --> I5["regression suite"]
  I5 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V5["targeted test run"]
Loading

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: main
  • Head branch: sentinel/explicit-shell-false-subprocess-1270564884955014082
  • Fix direction: merge or rebase origin/main into sentinel/explicit-shell-false-subprocess-1270564884955014082, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 1067 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:sentinel/explicit-shell-false-subprocess-1270564884955014082
# rebase path only: git push --force-with-lease origin HEAD:sentinel/explicit-shell-false-subprocess-1270564884955014082

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head e3b673f8a302d24acb88d35ab25abaaeaa325c1a.

  • Head SHA: e3b673f8a302d24acb88d35ab25abaaeaa325c1a

  • Workflow run: 32193040239

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (7 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (9 files)"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs (5 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["CI script (6 files)"]
  S4 --> I4["review and security gate shell path"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (24 files)"]
  S5 --> I5["regression suite"]
  I5 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V5["targeted test run"]
Loading

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head triage for e3b673f: the branch is DIRTY with current-head REQUEST_CHANGES, and the diff deletes multiple required workflows, doctoring documents, the commercial-readiness coordinator, and its tests while changing unrelated controls. I did not push, approve, or merge this branch. The safe focused shell=False/concurrency work is available in current-main successor PR #1144; this PR still requires a new focused successor or explicit scope repair.

@google-labs-jules

Copy link
Copy Markdown

Current-head triage for e3b673f: the branch is DIRTY with current-head REQUEST_CHANGES, and the diff deletes multiple required workflows, doctoring documents, the commercial-readiness coordinator, and its tests while changing unrelated controls. I did not push, approve, or merge this branch. The safe focused shell=False/concurrency work is available in current-main successor PR #1144; this PR still requires a new focused successor or explicit scope repair.

Understood. Acknowledging that this work is now obsolete and stopping work on this task. The PR is dirty and the work is already available in PR #1144.

@seonghobae seonghobae closed this Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant