forked from mtusi2026/mtusi2026lab2
scripts/limits.py states which secrets, volumes and networks each service needs and that only lb publishes ports, on loopback. It compares that policy with docker compose config (with the bench profile, so k6 is covered) and with docker inspect of the running containers: CPU and memory limits declared and applied, no container_name, no published port on any API replica, a read-only root filesystem for the API, and which networks are internal. It prints both tables and every violation and exits non-zero on any. The stack evidence script no longer reaches replicas through docker compose exec or port, which assume container number 1 and break after a rolling update renumbers the replicas. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>