T09 · Insecure Skill Coding Practices
- Location
scripts/gousto-pick.mjs:29- Finding
OAuth Bearer Token Exposed Through Process Arguments
- Content
View full analysis
`'${a.replace(/'/g, "'\\''")}'`).join(' '), { encoding: 'utf8', maxBuffer: 10 * 1024 * 1024, shell: '/bin/zsh' }); ``` ### Technical Analysis The OAuth bearer token is interpolated directly into a `curl` command and passed to a shell. Shell quoting reduces command-injection exposure from individual arguments, but it does not protect the confidentiality of the resulting process arguments. While `curl` is running, the complete `Authorization: Bearer ...` header may be visible through local process inspection, privileged system monitoring, endpoint telemetry, audit facilities, or diagnostic tools that record command lines. The exposure is unnecessary because Node.js can submit HTTPS requests directly without placing credentials in a child process argument list. The recipient is the legitimate Gousto API, and no transmission to an unrelated domain was identified. The vulnerability concerns local credential disclosure rather than unauthorized network exfiltration. ### Attack Path 1. The user runs the meal picker with a valid saved Gousto session. 2. The script extracts the OAut ...[truncated 1060 chars]- Remediation
View remediation
