T09 · Insecure Skill Coding Practices
- Location
scripts/snap_verify_click.sh:12- Finding
Predictable and Insecure Temporary Screenshot Files
- Content
View full analysis
/dev/null echo "$SNAP_FILE" ;; screenshot_window) # Screenshot just the Chrome window area WIN_GEOM=$(xdotool getwindowgeometry "$WIN" 2>/dev/null) WIN_X=$(echo "$WIN_GEOM" | grep Position | awk -F'[,: ]' '{print $4}') WIN_Y=$(echo "$WIN_GEOM" | grep Position | awk -F'[,: ]' '{print $5}') WIN_W=$(echo "$WIN_GEOM" | grep Geometry | awk -F'x' '{print $1}' | awk '{print $2}') WIN_H=$(echo "$WIN_GEOM" | grep Geometry | awk -F'x' '{print $2}') scrot -a "${WIN_X},${WIN_Y},${WIN_W},${WIN_H}" "$SNAP_FILE" 2>/dev/null echo "$SNAP_FILE" ;; click) X="${ARG3:-960}" Y="${ARG4:-540}" xdotool mousemove "$X" "$Y" click 1 sleep 0.5 scrot "$SNAP_FILE" 2>/dev/null echo "clicked $X $Y — screenshot: $SNAP_FILE" ;; scroll_down) TIMES="${ARG3:-3}" for i in $(seq 1 "$TIMES"); do xdotool key Page_Down sleep 0.2 done scrot "$SNAP_FILE" 2>/dev/null echo "scrolled down ${TIMES}x — screenshot: $SNAP_FILE" ;; back) xdotool key Alt+Left sleep 1 scrot "$SNAP_FILE" 2>/dev/null echo "navigated back — screenshot: $SNAP_FILE" ;; ``` `scripts/click_extension.sh:12, 68-83`: ```bash SNAP="/tmp/xdotool_toolbar_$(date +%s).png" # Snapshot the toolbar right side for visual inspection scrot -a "$((SCREEN_W-350)),0,350,72" "$SNAP" 2>/dev/null echo "Toolbar snapshot: $SNAP" echo "Read it with Claude to identify ico ...[truncated 3879 chars]- Remediation
View remediation
