Skip to content

chore(subprocess): make shell=False explicit for scanner policy - #544

Draft
seonghobae wants to merge 1 commit into
mainfrom
sentinel-fix-subprocess-shell-audio-library-14820787635839259142
Draft

chore(subprocess): make shell=False explicit for scanner policy#544
seonghobae wants to merge 1 commit into
mainfrom
sentinel-fix-subprocess-shell-audio-library-14820787635839259142

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Current exact boundary

  • protected/base: main@47c6fd27de13b0da37a7db64697b869941909351
  • exact head: 7e6d209b7a1fbd41fccf440aef1eeeb5d3b4736a
  • effective delta: one line in audio_library.py
  • lifecycle: Draft / repository CI-security GREEN / central CodeQL RED / independent approval absent

Finding classification

This is not a MEDIUM command-injection vulnerability repair. Python subprocess.run() already defaults shell=False, and this call passes an argument vector rather than a shell command. Adding the explicit keyword therefore does not change runtime shell-execution semantics.

The delta is nevertheless retained because this repository already documents a scanner/tooling policy in .jules/sentinel.md: some CI analyzers report false-positive command-injection findings when the default is implicit, so subprocess calls use explicit shell=False for machine-readable intent. The change should be judged as static-analysis clarity / repository-policy conformance, not as evidence that the predecessor executed through a shell or that a command-injection exploit was fixed.

The command itself remains a fixed interpreter invocation with -I -c, bounded timeout, trusted child environment, fixed working directory, and no caller-controlled shell interpolation. Argument-injection and child-process resource/security boundaries remain separate concerns and are not upgraded by this keyword.

Exact-head evidence

Repository CI 34256074457, Security Scan 34256074603, SAST Semgrep 34256074614, and fuzz 34256074443 are terminal SUCCESS on exact 7e6d209.... CI executed Python 3.10/3.11/3.12 tests and the Rust jobs on this SHA.

CodeQL PR 34256074516 is terminal FAILURE outside the leaf source-analysis path. Language detection succeeded. Actions compatibility failed current-head enforcement at 17:21:58Z and Python compatibility at 17:22:27Z; the same generation's Dispatch current-head CodeQL scan job did not start until 17:23:09Z and then succeeded. This is another exact consumer specimen of the central receipt sequencing/settlement defect; do not add a codec-carver no-op commit, synthetic status, substitute scanner, or gate waiver.

OpenCode's exact-head review is COMMENTED and reports no source-backed product finding, but separately reports its coverage gate as failing. There are no inline review threads and no qualifying current-head independent APPROVED review.

Acceptance

Keep Draft until one unchanged exact head has every then-required repository/central gate terminal-success and qualifying independent review. If the explicit-default scanner convention is later removed from canonical repository policy, this one-line delta should be re-evaluated as semantics-neutral rather than preserved as a security fix.

No force push, destructive rebase, self-approval, gate weakening, predecessor-GREEN transfer, source-neutral retrigger, protected merge, tag or release is claimed.

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

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5abf20f4-4d44-4076-a858-658a8895ce8b

📥 Commits

Reviewing files that changed from the base of the PR and between 47c6fd2 and 7e6d209.

📒 Files selected for processing (1)
  • audio_library.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

preflight_mlx_vlm_import의 MLX-VLM 초기화 서브프로세스 호출에 shell=False를 추가한다. 이 설정은 셸을 통한 실행을 명시적으로 차단한다.

Changes

MLX-VLM 초기화

Layer / File(s) Summary
서브프로세스 셸 실행 차단
audio_library.py
preflight_mlx_vlm_importsubprocess.run 호출에 shell=False를 추가한다.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 7e6d2

The MLX-VLM preflight subprocess now explicitly avoids shell execution without changing its intended invocation behavior. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 audio_library.py의 subprocess 호출에 shell=False를 명시적으로 추가한 변경과 직접 관련됩니다. 정적 분석 정책 대응이라는 주요 목적도 명확히 전달합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel-fix-subprocess-shell-audio-library-14820787635839259142

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 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 reviewed the current-head product diff. Coverage is a separate gate.

Changed files

  • audio_library.py — Python module behavior

Changed behavior

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Python: audio_library.py"]
  S1 --> I1["Python module behavior"]
  I1 --> R1["Review risk: Python: audio_library.py"]
  R1 --> V1["pytest plus coverage"]
Loading

Findings

No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.

  • Head SHA: 7e6d209b7a1fbd41fccf440aef1eeeb5d3b4736a
  • Workflow run: 34256504463
  • Workflow attempt: 1
  • Coverage gate: failure

Review outcome

Coverage is a gate, not the review. This body reviews the changed product files.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Python: audio_library.py"]
  S1 --> I1["Python module behavior"]
  I1 --> R1["Review risk: Python: audio_library.py"]
  R1 --> V1["pytest plus coverage"]
Loading

@opencode-agent

opencode-agent Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment.

@seonghobae seonghobae changed the title 🛡️ Sentinel: [MEDIUM] Fix missing shell=False in subprocess.run chore(subprocess): make shell=False explicit for scanner policy Sep 8, 2026
@seonghobae
seonghobae marked this pull request as draft September 8, 2026 17:34
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