Skip to content

secrets: recognize Firebase web-config as public-by-design — advise key restrictions, not rotation #250

Closed

Description

@sandstream

Problem (found dogfooding on a Firebase repo)

trufflehog flagged a Firebase web config apiKey as a leaked secret and kit's advice was
"rotate". A Firebase web config (apiKey + authDomain + projectId together) is public by
design — it ships in every client bundle; rotating it fixes nothing. The actionable
control is API-key restrictions (HTTP referrer / app restrictions) + Firebase Security
Rules.

Proposal

Add a classifier for the Firebase web-config shape (co-occurring apiKey +
authDomain/projectId in the same object/file, AIza… key form): downgrade from
"leaked secret — rotate" to an informational finding with specific advice — "public by
design; verify API-key restrictions in Google Cloud Console + Security Rules". Keep the
finding visible (don't silently drop it), just make the guidance truthful.

Same class likely applies to other intentionally-public client keys (e.g. PostHog/Sentry
DSNs) — design the classifier as a small allowlist of known public-by-design shapes with
per-shape advice.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions