SiteShadow
Back to vulnerability library

CRED-URL Hardcoded Credentials in URLs

What this means

SiteShadow found credentials embedded directly in a URL (common examples: postgres://user:pass@host, https://user:pass@…).

Why it matters

Safer examples

1) Use env vars + a URL without inline creds

DB_HOST=db.example.com
DB_USER=app_user
DB_PASSWORD=...
import os

dsn = f"postgres://{os.environ['DB_USER']}:{os.environ['DB_PASSWORD']}@{os.environ['DB_HOST']}/app"

2) Prefer a secret manager in production

Inject credentials at runtime from a secret manager rather than storing them in code or in a committed URL.

3) If it ever leaked: rotate

If the URL (with creds) was committed or shared, assume compromise and rotate immediately.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage