Skip to content

Reference The 25 checks

Leftovers

Security check leftovers

What it reads

Env files and wp-config.php in the folders under secrets.paths and the web roots, for debug and development settings (the setting's name, never another value); each running container's image and environment; Git folders in /var/www and the other web roots; the sizes of files in /var/log and of containers' logs; and Docker's own count of images and build cache nothing uses.

Does it need root?

It needs root for part of what it reads. The Docker socket, containers' logs and other users' files can be read only by root. Without root, that part is skipped and never counted as passed. Run sudo kiyesi scan to include it.

When it passes

The report lists it as passed, in these words:

  • Nothing left over from development, and no space wasted on logs or Docker

What it can find

Critical

Container name runs tool, a development tool, open to the internet

Tools like this give whoever reaches them your data or your email, often behind a weak password or none, and they are among the first things attackers look for.

Fix, to review and run yourself
Remove the service, or publish its port on 127.0.0.1 only ("127.0.0.1:8080:80") and reach it with ssh -L 8080:localhost:8080 you@this-server
Warning

path turns on debug mode: setting

Debug mode shows visitors error pages with code, settings and sometimes secrets, and is slower. It is meant for a developer's machine, not a server the internet reaches.

Fix, to review and run yourself
Change setting to the production value in path (false, or production), then restart the app
Warning

Container name runs in debug mode: setting

Debug mode shows visitors error pages with code, settings and sometimes secrets, and is slower. It is meant for a developer's machine, not a server the internet reaches.

Fix, to review and run yourself
Change setting to the production value where the service's environment is set, then docker compose up -d
Warning

Container name runs tool, a development tool

It is not reachable from the internet now, but one port change makes it so, and it gives whoever reaches it your data. Run it on your own machine, or only when needed.

Fix, to review and run yourself
docker stop name, and remove its service from docker-compose.yml
Warning

path is a Git folder inside the web root

If the web server serves it, anyone can download the whole code and its history, with every secret ever committed. The grade from outside checks whether it is served.

Fix, to review and run yourself
Move it out (sudo mv path /root/), and deploy with git archive or rsync --exclude .git next time
Warning

path has grown to size

A log this big is not being rotated. It fills the disk, and old lines are rarely read.

Fix, to review and run yourself
Check /etc/logrotate.d has a rule for path, then sudo logrotate -f /etc/logrotate.conf (if logrotate is missing: sudo apt-get install -y logrotate)
Warning

Container name's log has grown to size, with no size limit

Docker keeps every line a container writes until its disk is full, unless told a limit.

Fix, to review and run yourself
Add to the service in docker-compose.yml: logging: { driver: json-file, options: { max-size: "20m", max-file: "3" } }, then docker compose up -d
Info

Docker keeps size that nothing uses: old images and build cache

Each deploy leaves the previous image and its build cache behind. It is disk you pay for, and a full disk stops every app on the server. Volumes are never counted.

Fix, to review and run yourself
docker image prune -a --filter until=168h && docker builder prune --filter until=168h