Rendu DevOps S8#40
Conversation
DevOps and security : PR reportAuthors : Mael Allié, Ewen Laurent and Théo Ginguené What was checked and whyWe reviewed Docker orchestration, backend configuration, reverse proxy behavior, container images, build contexts, ignore rules, and git workflow controls, because most incidents come from leaked secrets, over-exposed internal services, or unsafe defaults or configurations. Changes implementedInternal service exposure reduced by defaultWe removed host port publication for the internal DB and SMTP services, removed direct Etherpad publication in favor of routing it through the frontend Nginx proxy under /pad/, and updated the external Etherpad URL to use that reverse-proxy path. The result is a smaller direct attack surface, with internal services reachable only through controlled entry points and centralized header enforcement and logging at the proxy layer. This applies the zero-trust and least-exposure principles. Image version updating and pinning, where supportedThis change covered the docker-compose and Dockerfiles. We pinned and updated image versions to reduce CVEs. That makes builds more reproducible and improves rollback reliability. Reproducible infrastructure and deterministic environments are core CI/CD reliability practices. Prod now requires explicit secrets/configThis update only touched Frontend runtime moved to non-root containerFor the frontend, we now use nginxinc/nginx-unprivileged:1.27-alpine, and nginx listens on 8080, which is mapped to host 4200 in compose. This reduces even further the security risk by running the frontend as an unprivileged user inside the container. Docker build context hardeningWe added ignore patterns for git metadata, env files, secret artifacts, logs, and temporary or build outputs. That reduces the risk of secrets leaking into image builds or layers (and speeds up builds). Simple local pre-commit and pre-push secret checksThe local Git hooks in CI security changesWe implemented a GitHub Actions CI security workflow that includes gitleaks, trivy, npm audit, and OWASP dependency-check. Global ignore rules cover env files and potential secret files, example env and secret templates were added, and the real API key file was removed from the repo. Tutorial : How to use the new security setup1. Prepare local secrets safely
2. Enable local secret-scanning hooks
While not recommended, you can bypass hooks if needed with : SKIP_GITLEAKS=1 git commit -m "bypass"3. Start stackdocker compose up --buildWhat we would do next if we had more time
CI Result
|

DevOps et sécurité
Théo GINGUENÉ, Ewen LAURENT et Mael ALLIÉ