T09 · Insecure Skill Coding Practices
- Location
scripts/booking-api.sh:47- Finding
Sensitive Patient Data Exposed Through Command-Line Arguments
- Content
View full analysis
'" url="${BASE_URL}/api/v1/book" [ "$command" = "book-dry" ] && url="${url}?mode=dry_run" curl -s -X POST \ -H "Content-Type: application/json" \ -d "$json" \ "$url" | python3 -m json.tool ``` The documented invocation explicitly places the complete patient record in a command-line argument: ```bash scripts/booking-api.sh book '{"provider_id":"...","session_id":"...","service":"...","slot":"...","patient_first_name":"...","patient_last_name":"...","patient_email":"...","patient_phone":"...","patient_dob":"...","patient_state":"...","insurance_carrier":"...","insurance_member_id":"..."}' ``` ### Technical Analysis The booking payload contains sensitive identity, contact, insurance, and healthcare information, including: - Patient name - Date of birth - Email address - Telephone number - State - Requested mental-health service - Insurance carrier - Insurance member or subscriber ID The script accepts this complete JSON document through `$1`. Consequently, it appears in the argument list of the shell script process. The script then supplies the same value to `curl` using `-d "$json"`, exposing the payload in the `curl` process argument list as well. Depending on the execution environment, command arguments may be captured by: - Agent tool-call or execution telemetry - Shell command history when invoked interactively - Process-monitoring and endpoint-observability systems - Debug traces such as `set -x` - Audit logging or error-reporting infrastructure - Local users or services permitted to inspect same-user processes This beh ...[truncated 1927 chars]- Remediation
View remediation
