-
Notifications
You must be signed in to change notification settings - Fork 0
security: remove hardcoded Postgres password fallback #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| POSTGRES_PASSWORD=databank | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Env example breaks setup The new .env.example only defines POSTGRES_PASSWORD, but the documented setup and Prisma schema require DATABASE_URL, so copying it to .env.local leaves migrations/app without a DB connection string. Agent Prompt
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ services: | |
| environment: | ||
| POSTGRES_DB: databank | ||
| POSTGRES_USER: databank | ||
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-databank} | ||
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1. Compose env var required docker-compose.yml now substitutes POSTGRES_PASSWORD without a default/required guard, but the README Docker instructions don't set it, so docker compose up --build can run with an empty substitution and break DB/app startup. Agent Prompt
|
||
| ports: | ||
|
Comment on lines
7
to
10
|
||
| - "5432:5432" | ||
| volumes: | ||
|
|
@@ -25,7 +25,7 @@ services: | |
| db: | ||
| condition: service_healthy | ||
| environment: | ||
| - DATABASE_URL=postgresql://databank:${POSTGRES_PASSWORD:-databank}@db:5432/databank | ||
| - DATABASE_URL=postgresql://databank:${POSTGRES_PASSWORD}@db:5432/databank | ||
| - LOG_LEVEL=info | ||
| - PERSIST_LEADS=false | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
POSTGRES_PASSWORD=databankin.env.examplereintroduces a hardcoded credential-like value in the repo (likely to keep triggering secret scanners) and also doesn’t provide theDATABASE_URLthat Prisma requires (prisma/schema.prismausesenv("DATABASE_URL"), and README.md instructscp .env.example .env.local). Consider using a non-secret placeholder (e.g.,POSTGRES_PASSWORD=changeme) and include aDATABASE_URL=...example (or a comment) so local setup works after copying the file.