Skip to content

security: [HIGH] API tokens visible in process list via curl command-line arguments #2464

@louisgv

Description

@louisgv

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    in-progressIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions