Files
Maestro/do-housekeeping.sh
Pedram Amini 3e6ef5b66a fix: remove vulnerable execCommand method from ProcessManager
Removed the execCommand() method that used naive space-splitting for argument parsing, which could break with filenames containing spaces. Replaced its single usage in git:isRepo handler with direct call to execFileNoThrow using structured array arguments.

This change:
- Eliminates command parsing vulnerability (#2)
- Reduces attack surface by removing unnecessary abstraction
- Maintains consistency with project security patterns
- All git operations now consistently use execFileNoThrow

Fixes #2 in Housekeeping.md (CRITICAL security issue)
2025-11-23 20:49:09 -06:00

15 lines
416 B
Bash
Executable File

#!/bin/sh
TASKS_BEFORE=$(grep "\- \[ \]" ./tmp/HOUSEKEEPING.md | wc -l)
if [ "$TASKS_BEFORE" -eq 0 ]; then
echo "no tasks remaining in document, exiting..."
exit 0
fi
PROMPT=$(cat ./tmp/housekeeping.prompt)
RESPONSE=$(claude --dangerously-skip-permissions -p "$PROMPT")
echo "$RESPONSE"
TASKS_AFTER=$(grep "\- \[ \]" ./tmp/HOUSEKEEPING.md | wc -l)
echo "Tasks before $TASKS_BEFORE and after $TASKS_AFTER"