Sign inSign up

soldevelo/infrascan

By soldevelo

โ€ขUpdated 1 day ago

Advanced Infrastructure as Code (IaC) auditor for cost optimization and security scanning.

Image
Security
Integration & delivery
Developer tools
4

7.2K

soldevelo/infrascan repository overview

โ SolDevelo InfraScan

SolDevelo InfraScan

Verified by InfraScan Docker Pulls Docker Image Size GitHub stars GitHub issues License

Open source scanner for Infrastructure as Code: cost, security and container vulnerabilities, in your terminal or CI.

InfraScan checks Terraform, CloudFormation, Kubernetes, Helm, Ansible and the container images they use. It grades the result A to F, puts a monthly price on cost findings, and runs entirely on your machine or runner.

New: InfraScan Cloud (free beta). The scanner below stays free and runs locally. If you also want to scan a live AWS account, InfraScan Cloud connects through a read-only role and grades security, reliability and cost, with a monthly price on each piece of waste and a fix for every finding. See the demoโ  ยท Get startedโ 

โ ๐Ÿš€ Quick start

docker run --rm -v $(pwd):/scan soldevelo/infrascan:latest

Scans the current directory with every scanner and prints the report in your terminal.

โ โœจ What it checks

  • ๐Ÿ’ฐ Cost: 27 Terraform rules (old instance generations, gp2 instead of gp3, idle NAT Gateways, missing S3 lifecycle rules, missing budgets, oversized Lambda memory and more), with an estimated saving in $/month per finding.
  • ๐Ÿ›ก๏ธ IaC security: Checkov's 1000+ policies for Terraform, CloudFormation, Kubernetes, Helm and Ansible.
  • ๐Ÿณ Containers: CVEs in the images referenced by Docker Compose files and Kubernetes manifests, with Grype or Docker Scout (when Docker Hub credentials are set). Handles ${VAR} in image names and Amazon ECR.
  • ๐Ÿ“Š Grades and deltas: an A to F grade per category, and with a baseline, only the findings and cost changes a pull request adds.

โ ๐Ÿ› ๏ธ Options

docker run --rm -v $(pwd):/scan soldevelo/infrascan:latest [options]
  • --scanner: comprehensive (default), regex, checkov, containers, or a comma-separated mix.
  • --format: text (default), json, html. --out saves the report, e.g. --out /scan/report.html.
  • --framework: smart (default), auto, terraform, kubernetes, cloudformation, helm, ansible, all.
  • -f, --include: scan only these files or directories.
  • -x, --exclude: leave paths out, e.g. -x docs,tests,examples (names match at any depth, like .gitignore).
  • --fail-on: exit code 1 on any, high_critical, a grade (grade_a to grade_f), a priority, or only on findings a PR adds (new_any, new_high_critical, new_critical).
  • --no-tips: leave out the one-line mention of InfraScan Cloud.

โ ๐Ÿค– CI/CD

GitHub Actions (PR comments, step summary, inline annotations, baseline per branch):

- uses: actions/checkout@v4
- uses: soldevelo/infrascan@v1
  with:
    format: html
    out: infrascan-report.html
    fail-on: new_high_critical

Bitbucket Pipelines (PR comment, Code Insights report and annotations):

- pipe: docker://soldevelo/infrascan:latest
  variables:
    FORMAT: html
    OUT: infrascan-report.html

GitLab CI and anything else that runs Docker: the docker run command above.

Full setup: GitHub Actionโ  ยท Bitbucket pipeโ  ยท READMEโ 

โ ๐Ÿท๏ธ Tags

  • latest: the newest release.
  • 1.2.5, 1.2.4, ...: a specific release. Pin one for reproducible results. The GitHub Action pins the image of its own version from 1.2.5 on.

โ ๐Ÿค Community

Tag summary

Content type

Image

Digest

sha256:35ea7c4d8โ€ฆ

Size

396.5 MB

Last updated

1 day ago

docker pull soldevelo/infrascan