Compliance as Code
Building IaC Programs
Compliance as Code
Tool |
Description |
Open Policy Agent |
Policy-based control for cloud native environments |
Semgrep |
Semgrep is a fast, open-source, static analysis tool for finding bugs and enforcing code standards at editor, commit, and CI time |
pre-commit |
A framework for managing and maintaining multi-language pre-commit hooks |
OPA
|
|
Documentation |
|
Conftest |
- Tutorials:
- Policies:
- Helpers:
- Integrations:
|
Gatekeeper |
- Tutorials:
- Policies:
- Integrations:
- konstraint: assist with the creation and management of constraints when using Gatekeeper
- opa-image-scanner: Admission Controller for Image Scanning using OPA, to check if the image you scan is the image you deploy in your K8S cluster
- gatekeeper-policy-manager: Web-based policies manager
|
Open Policy Registry |
- A Docker-inspired workflow for OPA policies
|
OPAL |
- Administration layer for OPA, detecting changes to both policy and policy data in realtime and pushing live updates to your agents.
- As your application state changes (whether it's via your APIs, DBs, git, S3 or 3rd-party SaaS services), OPAL will make sure your services are always in sync with the authorization data and policy they need.
|
kube-mgmt |
- Sidecar for managing OPA on top of Kubernetes
|
Static Analysis
Exploration
For an experimentation with Semgrep to eradicate classes of (cloud) vulnerabilities from Infrastructure as Code,
please refer to:
Tool comparison
This repo provides a comparison of the capabilities of the main scanners currently available:
Tool |
Description |
HashiCorp Sentinel |
|
tfsec |
- Static analysis of TF templates to spot potential security issues
- tfsec-pr-commenter-action: add comments to pull requests where tfsec checks have failed
|
checkov |
|
terrascan |
- Collection of security and best practice test for static code analysis of terraform templates
|
tf-parliament |
- Run Parliament AWS IAM Checker on Terraform Files
|
regula |
- Checks Terraform for AWS, Azure and GCP security and CIS compliance using Open Policy Agent/Rego
|
yor |
- Helps add informative and consistent tags across infrastructure-as-code frameworks such as Terraform, CloudFormation, and Serverless
- Can be run as a GitHub Action, pre-commit hook, standalone CLI
- Guides
|
GCP Terraform Policy validation |
gcloud beta terraform vet provides guardrails and governance for Terraform configurations to help reduce misconfigurations of Google Cloud resources that violate any of your organization's policies- policy library
|
Tool |
Description |
cfripper |
- Library and CLI tool for analysing CloudFormation templates and check them for security compliance
- Guides
|
checkov |
|
Docker
Tool |
Description |
trivy |
- A Simple and Comprehensive Vulnerability Scanner for Containers, Suitable for CI
|
clair |
- Scan docker images for security vulnerabilities
|
tern |
- Software package inspection tool for containers
|
grype |
- Vulnerability scanner for container images and filesystems
|
dockle |
- Container Image Linter for Security, Helping build the Best-Practice Docker Image
|
container-scan |
- A GitHub action to help you scan your docker image for vulnerabilities, leveraging Trivy and Dockle
|
dagda |
- Static analysis of known vulnerabilities, malware & other malicious threats in docker images/containers and to monitor the docker daemon and running docker containers for detecting anomalous activities
|
fossa-action |
- Scan images and finds license compliance and security issues
|
copacetic |
- CLI tool for directly patching container images using reports from vulnerability scanners
|
Kubernetes
Tool |
Description |
Whorf |
|
kube-score |
- Performs static code analysis of your Kubernetes object definitions
- The output is a list of recommendations
|
Kubei |
- Vulnerabilities scanning tool that allows to get a risk assessment of a cluster
- Kubei scans all images that are being used in a Kubernetes cluster, including images of application pods and system pods
|
version-checker |
- Utility for observing the current versions of images running in the cluster, as well as the latest available upstream
|
chart-testing |
- CLI tool for linting and testing Helm charts
|
helm-scanner |
- Open source IaC security scanner for public Helm charts
|
kyverno |
- Kyverno is a policy engine designed for Kubernetes. It can validate, mutate, and generate configurations using admission controls and background scans
- Exploring Kyverno: multi-part series exploring Kyverno
|
kubeval |
- Validates Kubernetes YAML/JSON configuration files
- It uses schemas generated from the Kubernetes OpenAPI specification, and therefore can validate schemas for multiple versions of Kubernetes
|
kube-linter |
- Analyzes Kubernetes YAML files and Helm charts, and checks them against a variety of best practices, with a focus on production readiness and security
|
Applications
Tool |
Description |
OSV-Scanner |
Vulnerability scanner to find existing vulnerabilities affecting your project's dependencies |
Pipeline / Supply Chain
Tool |
Description |
TUF |
- TUF
- The CI/CD system uses TUF to sign new integrations
- Provides with a compromise-resilient mechanism by adding a higher layer of signed metadata to the repository
- Using The Update Framework in Sigstore: how Sigstore is integrating TUF into the Sigstore projects and infrastructure
|
in-toto |
- in-toto
- Provides end-to-end verification of a software supply chain
- Guarantees that the CI/CD system packaged exactly the source code that one of the developers signed
|
Providence |
- Providence is a system for code commit & bug system monitoring
- It is deployed within an organization to monitor code commits for security (or other) concerns, via customizable plugins
|
rode |
- Rode provides the collection, attestation and enforcement of policies in your software supply chain with Grafeas and OPA
|