Skip to content

harden: detected non-static command inside ` in extsources.rb... - #4021

Open
anupamme wants to merge 1 commit into
ggml-org:masterfrom
anupamme:fix-repo-whisper-cpp-ruby-dangerous-subshell-extsources
Open

harden: detected non-static command inside ` in extsources.rb...#4021
anupamme wants to merge 1 commit into
ggml-org:masterfrom
anupamme:fix-repo-whisper-cpp-ruby-dangerous-subshell-extsources

Conversation

@anupamme

Copy link
Copy Markdown

Summary

Harden input handling in bindings/ruby/extsources.rb (flagged by semgrep).

Vulnerability

Field Value
ID ruby.lang.security.dangerous-subshell.dangerous-subshell
Severity HIGH
Scanner semgrep
Rule ruby.lang.security.dangerous-subshell.dangerous-subshell
File bindings/ruby/extsources.rb:49
Assessment Defensive hardening

Description: Detected non-static command inside .... If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.

Threat Model Context

This is a local CLI tool - exploitation requires the attacker to control command-line arguments or input files.

Changes

  • bindings/ruby/extsources.rb

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.


Automated security fix by OrbisAI Security

…y vulnerability

Automated security fix generated by OrbisAI Security
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