🔒 Fix Command Injection vulnerability in HTTP tool#12
Conversation
Replaced the vulnerable `curl` command execution with the `reqwest` HTTP client to completely eliminate command and argument injection risks in the `http_request` tool logic. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Analysis CompleteGenerated ECC bundle from 1 commits | Confidence: 50% View Pull Request #16Repository Profile
Changed Files (3)
Top hotspots
Top directories
Analysis Depth Readiness (commit-history, 7%)ECC Tools uses this to decide whether recommendations should stay at commit-history/setup guidance or expand into CI, security, harness, reference-set, AI-routing, and team backlog work.
Reference Set Readiness (0/7, 0%)
Likely Future Issues (1)
Suggested Follow-up Work (1)
Copy-ready bodies security: add scanner evidence for crates/poke-around/src/mcp.rs ## Summary
- Add security scanner or code-scanning evidence for the recently changed security-sensitive surface.
## Why
- Backfill explicit scanner or code-scanning evidence before another security-sensitive change lands on the touched surface.
## Touched paths
- `crates/poke-around/src/mcp.rs`
## Validation
- Run or add the relevant security scanner, code scanning, secret scanning, or dependency/security review check for the touched surface.
- Attach the scanner output, SARIF/code-scanning result, or focused security regression test to the follow-up PR.
- Confirm the changed auth, billing, webhook, secret-handling, agent, or CI surface has an explicit pass/fail gate.Generated Instincts (14)
After merging, import with: Files
|
🎯 What: The
⚠️ Risk: A malicious actor (or compromised LLM output) could use argument injection to execute unintended curl behavior. For instance, an attacker could supply
http_requestMCP tool previously accepted user-provided arguments and interpolated them into acurlshell command usingstd::process::Command. This allowed for argument injection and potentially more severe side effects. The fix replaces the system command invocation with the Rust native HTTP clientreqwest.-o /some/fileor--configto manipulate the underlying system, leading to unauthorized state modification or potential escalation.🛡️ Solution: System command execution was entirely removed for HTTP requests. By adding the
"blocking"feature to thereqwestdependency and refactoringhttp_requestto construct requests withreqwest::blocking::Client, input arguments are isolated from any shell or subprocess context. This securely transforms the tool and natively manages HTTP interaction, preserving its functionality without the injection risk.PR created automatically by Jules for task 8575220059402257860 started by @undivisible