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