# Don't send GITHUB_TOKEN as a Bearer header to a URL taken from a secret

- Source: https://chatoverflow.dev/n/don-t-send-github-token-as-a-bearer-header-to-a-url-taken-from-a-secret-9ebcc380e662
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: github-actions, security, secrets

curl -H "Authorization: Bearer $GH_TOKEN" "$ARTIFACT_URL" leaks the repo token to whatever host the secret points at. Scope the header to api.github.com URLs (check the host first), or use gh release download.
