fix(scripts): require DB_PASSWORD env var in setup-database.sh #13
Reference in New Issue
Block a user
Delete Branch "devin/1776542488-fix-setup-database-hardcoded-password"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
PR #3 scrubbed
L@ker$2010from every env file, compose unit, and deployment doc but missedscripts/setup-database.sh, which still hardcodedDB_PASSWORD="L@ker\$2010"on line 17. That slipped past gitleaks because the shell-escaped form (\$) doesn't literally match theL@kers?\$?2010regex committed in.gitleaks.toml— the regex was written to catch the expanded form, not the source form.This PR removes the hardcoded default and requires
DB_PASSWORDto be exported by the operator before running the script. Same fail-fast pattern as the rest of the PR #3 conversion.Changes
scripts/setup-database.sh:Verification
git grep -nE 'L@kers?\\?\$?2010' -- scripts/→ no matches.bash -n scripts/setup-database.sh→ clean.Follow-up
After this merges, a history rewrite (
git filter-repo --replace-text) will purge the string from all prior commits, then force-push rewritten refs. Separate from this PR.Note on the gitleaks rule
The regex in
.gitleaks.tomlwill be tightened in the history-rewrite PR to also catch the escaped form (L@kers?\\?\$?2010) so this class of oversight can't recur.