security: remove hardcoded Firebase database secret from settings - #59
Merged
Merged
Conversation
The 'firebase' block in app/settings.php held a hardcoded Firebase Realtime Database URL and legacy database secret. Nothing ever read settings['firebase'] — the only consumers of the settings array are settings['logger'] (app/dependencies.php) and settings['displayErrorDetails'] (public/index.php). FirebaseTodoRepository builds its own credentials from $_SERVER['DOCUMENT_ROOT'].'/firebase-key.json' and $_ENV['DATABASE_URI'], so this was dead configuration. Deleting it does not un-leak the value: it was committed in the initial commit (3ef0f38, 2019-10-17) in a public repository, so it must be treated as compromised and rotated in the Firebase console regardless of whether the git history is rewritten. Verified: 38 tests / 72 assertions still pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hjemmel
added a commit
that referenced
this pull request
Aug 11, 2026
…ecret security: remove hardcoded Firebase database secret from settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/settings.phpcarried a hardcoded Firebase Realtime Database URL and legacy database secret. This removes them.The config was dead. Nothing ever read
settings['firebase']— the only consumers of the settings array are:settings['logger']→app/dependencies.php:16settings['displayErrorDetails']→public/index.php:49FirebaseTodoRepositorybuilds its own credentials from$_SERVER['DOCUMENT_ROOT'].'/firebase-key.json'and$_ENV['DATABASE_URI'], so nothing depended on these values.Verified: 38 tests / 72 assertions still pass.
The value was committed in the initial commit (
3ef0f38, 2019-10-17) in a public repository, and has been reachable ever since. Merging this removes it from the tip, not from history, forks, clones, or anything that scraped the repo in the last ~7 years.The key must be rotated in the Firebase console. Treat it as compromised. Rotation is the fix; deleting the line is housekeeping.
A history rewrite is possible but has real costs — see the discussion on this PR. It is a separate decision from rotation, and it is not a substitute for it.
🤖 Generated with Claude Code