T09 · Insecure Skill Coding Practices
- Location
scripts/check_canvas.sh:29- Finding
Credential File Is Executed as Shell Code
- Content
View full analysis
- Remediation
View remediation
&2 exit 1 ;; esac done < "$CANVAS_COOKIE_FILE" if [ -z "$canvas_session" ] || [ -z "$log_session_id" ]; then echo "Required cookie fields are missing" >&2 exit 1 fi ``` Before parsing, validate the credential file: ```bash [ -f "$CANVAS_COOKIE_FILE" ] && [ ! -L "$CANVAS_COOKIE_FILE" ] || exit 1 [ "$(stat -c '%u' "$CANVAS_COOKIE_FILE")" -eq "$(id -u)" ] || exit 1 chmod 600 "$CANVAS_COOKIE_FILE" ``` Apply the same correction to `examples/check_canvas_example.sh`. ]]>
