Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Infrastructure as Code (IaC) scanning in CI/CD pipelines involves automatically checking the code that defines your infrastructure for security vulnerabilities, misconfigurations, and policy violations before it's deployed. This process is essential for ensuring that your infrastructure is secure, compliant, and follows best practices from the moment it's written to the time it's deployed.

Key Concepts in IaC Scanning

  1. Infrastructure as Code (IaC):
    • Definition: IaC is the practice of managing and provisioning computing infrastructure through machine-readable code, rather than through physical hardware configuration or interactive configuration tools.
    • Examples: Tools like Terraform, AWS CloudFormation, Ansible, and Kubernetes YAML files are commonly used for IaC.
  2. CI/CD Pipelines:
    • Continuous Integration (CI): The practice of automatically integrating code changes from multiple contributors into a shared repository several times a day. CI aims to detect and fix integration issues early.
    • Continuous Delivery/Deployment (CD): Automates the deployment of validated code to a staging or production environment.
  3. IaC Scanning:
    • Purpose: Automatically check IaC code for issues before it is merged, deployed, or run. This prevents misconfigurations, vulnerabilities, or non-compliance from being introduced into your infrastructure.
    • Tools: Various tools can be integrated into CI/CD pipelines to perform IaC scanning.

Steps for Implementing IaC Scanning in CI/CD

  1. Choose IaC Scanning Tools:
    • Examples:
      • Terraform: Tools like tfsec, Checkov, Terrascan, and Snyk IaC.
      • CloudFormation: cfn-lint, Checkov, Snyk IaC.
      • Kubernetes YAML: kubeval, Polaris, Checkov, Kubescape.
      • Ansible: ansible-lint, Checkov.
    • Features: Look for tools that offer integration with your version control system (VCS), CI/CD platform, and can produce reports or alerts based on findings.
  2. Integrate IaC Scanning into the CI Pipeline:
    • Triggering Scans: Set up your CI pipeline to automatically trigger IaC scans when changes are pushed to the repository (e.g., during a pull request or commit).
    • Failing Builds: Configure the pipeline to fail the build if critical issues are found, ensuring that problematic code doesn't proceed to deployment.
    • Feedback Loop: Provide feedback directly in the pull request or CI pipeline logs, helping developers fix issues quickly.
  3. Define Security and Compliance Policies:
    • Policies: Define policies that align with your organization's security, compliance, and operational standards (e.g., ensuring encryption is enabled, no hardcoded secrets).
    • Rule Customization: Customize the scanning rules based on your specific infrastructure and compliance requirements.

By ChatGPT


It seems that Checkov supports most of the environments, and also Checkov can be integrated with GitHub, Jenkins and others.

Nephio Sig Security team just started investigating Checkov.

Since both ONAP and Nephio (and also O-RAN SC SMO) are under LFN, maybe handling IaC scanning at the LFN level could be beneficial.

Tool evaluations

Checkov,



More to come...


  • No labels