Hardcoded weak database credentials committed to the repository in docker-compose.yml #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
docker-compose.ymlhard-codes plaintext database credentials for both the application user and the MySQL root account. The same trivially guessable string is used as the database name, user, and password (onlk/onlk), and the root password is barely stronger (onlkroot).Location
docker-compose.yml, lines 8–11 (environment block for thedatabaseservice) and line 32 (DATABASE_URLenv var for theonlkservice):Risk
Anyone with read access to the repository has working credentials to the database. Because the root password is also exposed, an attacker with network access to the database port can gain full administrative control over the MySQL instance — reading, modifying, or deleting all stored links.
Suggested fix direction
Move credentials out of the compose file and into a
.envfile that is.gitignored. The deploy script already randomisesAPP_SECRETviased; apply the same treatment to database passwords.Severity
moderate
Found by
Automated audit by Claude Code