[sec] secret-in-fallback — deepsec#11
Open
brokk-ccl wants to merge 1 commit into
Open
Conversation
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.
Corrigir a issue de segurança Hardcoded default postgres:postgres credentials used as admin URL fallback encontrada pelo scanner deepsec.
secret-in-fallbackLocais
control-plane/src/provision.ts:67Detalhe do scanner
config.adminUrl (config.ts L14) defaults to
'postgres://postgres:postgres@localhost:5433/postgres'when HAULDR_DB_ADMIN_URL is not set. provisionDatabase() and destroyProject() both call adminClient() which connects with this URL. If an operator deploys without setting the env var—common in containerised environments where many env vars are optional—all DDL operations run as the postgres superuser with the industry's most widely known default credential. Because this is a development default that is never validated at startup, a production deployment can silently proceed with it. Any local process on the host, or any service that accidentally receives a forwarded port 5433, can authenticate as postgres with password 'postgres' and gain superuser access over all tenant databases.Remediation: Make HAULDR_DB_ADMIN_URL required: fail fast at startup with a clear error if the env var is absent. Remove the hardcoded
postgres:postgresfallback entirely. If a dev default is truly needed, document it loudly and consider detecting localhost+default-password and printing a prominent warning.confidence: medium
Critério de aceite
Aplicar a correção em todos os locais acima. Depois do fix, um novo scan
deepsecnão deve mais reportar a regrasecret-in-fallbackno alvo.Despachado pelo Svalinn (remediação automática de segurança).
Verify: ✅ passed
verify output
Acceptance (live): ❌ not met
acceptance check output
🔨 Forged by Brokk · task
717b250d-4131-4099-a4c9-1704855949f8