You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Redaction misses passwords in connection-string URLs (DATABASE_URL, REDIS_URL, ...) #168
The redaction pass (docksec/redact.py) that masks secrets before file content is sent to the LLM does not mask passwords embedded in connection-string URLs (scheme://user:password@host). Because keys like DATABASE_URL, REDIS_URL, MONGO_URI, AMQP_URL, and SMTP_URL do not match the secret-key list, and the password inside the URL matches none of the value-shaped patterns, the password is sent to the configured LLM provider in clear text.
URLs with embedded credentials are one of the most common ways secrets appear in Dockerfiles and compose files, so this is a meaningful leak for a tool whose stated purpose is to keep those secrets from leaving the machine.
The password is masked, e.g. postgres://admin:[REDACTED-BY-DOCKSEC]@db:5432/app, so it never reaches the LLM. The scheme, user, and host can stay visible so the model can still flag that a credential is present.
The value is returned unchanged with a redaction count of 0. The password s3cr3tPass would be sent to the provider. Same result for redis://:pw@, mongodb://root:pw@, amqp://user:pw@, and smtp://user:pw@.
Environment
OS: macOS 26.3
Python: 3.14
DockSec: current main
I have a fix and tests ready and would like to be assigned.
Activity
fix(redact): mask passwords embedded in connection-string URLs