How do you run OPA policies against Kubernetes manifests in CI?
IntermediateProductionRapid-Fire Tool Questions
Answer
conftest test k8s/*.yaml --policy policy/ --output table
helm template ./chart | conftest test - --policy policy/
The - reads from stdin, which lets you test rendered Helm output.
More on Rapid-Fire Tool Questions
Gitleaks command to scan only staged changes before a commit?BeginnerTrivy command to fail a build only on fixable critical vulnerabilities?BeginnerGenerate a CycloneDX SBOM for an image with Syft and scan it with Grype?BeginnerCosign keyless verify command that pins the GitHub Actions workflow identity?IntermediateRun Checkov against a Terraform plan instead of raw HCL?BeginnerSemgrep command to scan with OWASP rules and fail on findings?Beginner