Skip to content

security: redact a live Cloudflare Global API Key from setup docs#36

Merged
hyperpolymath merged 1 commit into
mainfrom
security/redact-cloudflare-key
Jul 21, 2026
Merged

security: redact a live Cloudflare Global API Key from setup docs#36
hyperpolymath merged 1 commit into
mainfrom
security/redact-cloudflare-key

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

implementations/wokelang/CLOUDFLARE-SETUP.adoc published a live Cloudflare Global API Key as a literal value, in a public repository, in a document telling the reader to paste it into GitHub Actions secrets.

1. **CLOUDFLARE_API_TOKEN**: Your Cloudflare API token
   - Value: `<redacted — a live Global API Key>`

A Global Key is not scoped. Paired with the account email it grants full account access — every zone, all DNS, and billing.

Scope of the exposure

The same key was also hardcoded in cloudflare-dns-terraform/auto-add-new-sites.sh (removed in that repo's #23). GitHub code search across the account now returns this file as the last remaining copy on a default branch:

gh api -X GET search/code -f q="<key> user:hyperpolymath"  ->  total_count=1

The change

Replaced with instructions to mint a scoped token (Cloudflare Pages: Edit), an explicit warning against the Global Key, and a standing note that credentials must never be written into this file — a setup document should say where a secret goes, never what it is.

⚠️ Rotation is still required

This removes the key from the default branch, not from history. It stays readable in earlier commits of this repo and of cloudflare-dns-terraform — both public. Public repos are scraped continuously; the key must be assumed compromised regardless of this commit.

Owner actions:

  1. Roll the Global API Key — Cloudflare -> My Profile -> API Tokens -> Global API Key -> Change
  2. Audit the Cloudflare audit log for unauthorised zone/DNS changes
  3. Issue scoped tokens per project and set them as repo Actions secrets

🤖 Generated with Claude Code

CLOUDFLARE-SETUP.adoc published a live Cloudflare GLOBAL API KEY as a literal
value, in a PUBLIC repository, in a document instructing the reader to paste it
into GitHub Actions secrets.

A Global Key is not scoped. Paired with the account email it grants full
account access — every zone, all DNS, and billing. The same key was also
hardcoded in cloudflare-dns-terraform/auto-add-new-sites.sh (removed in that
repo's #23); GitHub code search across the account now returns this as the last
remaining copy on a default branch.

Replaced with instructions to mint a SCOPED token (Cloudflare Pages: Edit),
an explicit warning against using the Global Key, and a standing note that
credentials must never be written into this file — a setup document should say
where a secret goes, never what it is.

ROTATION IS STILL REQUIRED. This removes the key from the default branch, not
from history: it remains readable in earlier commits of this repo and of
cloudflare-dns-terraform, both public. Public repos are scraped continuously,
so the key must be assumed compromised regardless of this commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 5316aca into main Jul 21, 2026
12 of 15 checks passed
@hyperpolymath
hyperpolymath deleted the security/redact-cloudflare-key branch July 21, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant