π Fix command injection vulnerability in plugin hooks#12
Conversation
Co-authored-by: sstklen <90471971+sstklen@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. |
π― What: Fixed a command injection vulnerability in the Claude plugin configuration where raw user input (
$TOOL_INPUT) was directly interpolated into shell command strings."; rm -rf /;"), the plugin runner could execute arbitrary shell commands on the host machine.π‘οΈ Solution: Removed the direct string interpolation from
.claude-plugin/plugin.json. Instead, the three hook scripts (pre-bash-guard.sh,post-edit-check.sh,post-deploy-health.sh) were modified to read theTOOL_INPUTvalue safely from the environment variables by defaulting to${1:-$TOOL_INPUT}. This relies on the OS environment passing mechanism, completely bypassing the shell string interpolation vulnerability while maintaining backward compatibility for positional arguments.PR created automatically by Jules for task 4443877766165372816 started by @sstklen