-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing
Description
Issue
Cloud API tokens are passed to curl via -H "Authorization: Bearer ${TOKEN}" command-line arguments, making them visible in process listings (ps, top, /proc/*/cmdline).
Affected Files
- sh/e2e/lib/clouds/aws.sh (multiple curl calls)
- sh/e2e/lib/clouds/digitalocean.sh (multiple curl calls)
- sh/e2e/lib/clouds/gcp.sh (multiple curl calls)
- sh/e2e/lib/clouds/hetzner.sh (multiple curl calls)
Impact
API tokens can be exposed to:
- Other users on the same system via ps/top
- Log files that capture command history
- Process monitoring tools
This allows privilege escalation or unauthorized cloud resource access.
Recommendation
Use curl's -K/--config flag with a temp file for headers:
local config_file=$(mktemp)
trap 'rm -f "$config_file"' EXIT
printf 'header = "Authorization: Bearer %s"\n' "${TOKEN}" > "$config_file"
chmod 600 "$config_file"
curl -K "$config_file" "${url}"This keeps tokens out of the process argument list.
-- security/shell-scanner
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing