I got tired of production incidents caused by bad config, so I built a scanner
Описание и применение
StackGuard — это инструмент, который сканирует конфигурации инфраструктуры и выдаёт оценку готовности к продакшн‑среде, помогая выявлять ошибки в Kubernetes, Terraform, Dockerfile и других файлах до развертывания.
Задача
Production incidents were repeatedly caused by overlooked configuration mistakes in Kubernetes, Terraform, Dockerfiles, and other infra files, leading to outages and security risks.
Результат
StackGuard reduced the need for multiple tools, provided a single numeric score to track infra health, and enabled CI gating and PR annotations, helping teams catch misconfigurations before deployment.
Рабочий процесс
- Point StackGuard at a repository root (e.g.,
stackguard scan .), Configure minimum score and failure conditions (e.g.,--min-score 80 --fail-on error), Generate SARIF output for PR annotations, and Upload SARIF to GitHub Actions for inline review. - The tool automatically discovers file types, parses them into resource trees, evaluates compiled rules, and reports findings in console, JSON, SARIF, HTML, or CSV formats.
Доказательства
Our API pods were getting OOMKilled in a loop. Users were seeing 502s. The Slack channel was lighting up.
Adding resources.limits.memory: 512Mi to the deployment manifest. The incident took four hours.
I looked at what was out there. There are great tools, don't get me wrong. But here's what I kept running into: Scattered coverage. No single number.
StackGuard is a single Go binary that scans your infrastructure config, Dockerfiles, Compose files, Kubernetes manifests, Helm charts, Terraform, GitHub Actions, Jenkinsfiles, Ansible playbooks, and nginx configs against a set of rules and gives you a production-readiness score out of 100.
A score, not a wall of text. Every error costs 10 points, every warning costs 3, every info costs 1. Your score is 100 minus the deductions.
Rules are YAML, not code. Drop a YAML file in a directory and it loads on the next scan.
- Дата записи: 2026-11-02T05:29:09.884Z