Sign inSign up

soldevelo/infrascan

By soldevelo

•Updated 3 days ago

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

Image
Security
Integration & delivery
Developer tools
4

7.3K

soldevelo/infrascan repository overview

⁠InfraScan

Docker Pulls Docker Image Size GitHub stars License

Open-source scanner for infrastructure code: cost, security and container vulnerabilities, in your terminal or CI.

InfraScan checks Terraform, CloudFormation, Kubernetes, Helm and Ansible code and the container images it references. It grades the result from A to F, estimates the monthly cost of each cost finding, and runs entirely on your machine or CI runner.

InfraScan Cloud (free beta). This image stays free and runs locally. 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

This scans the current directory with all scanners and prints the results to the terminal.

⁠What it checks

AreaDetails
Cost27 Terraform rules (old instance generations, gp2 instead of gp3, NAT Gateways, missing S3 lifecycle rules, missing budgets, oversized Lambda memory and more), each with an estimated monthly saving.
IaC securityCheckov policies for Terraform, CloudFormation, Kubernetes, Helm and Ansible.
ContainersCVEs in images referenced by Docker Compose files and Kubernetes manifests, scanned with Grype, or Docker Scout when Docker Hub credentials are set. Supports ${VAR} in image names and Amazon ECR.
Grades and deltasAn A–F grade per category; with a baseline, only the findings and cost changes introduced by a pull request.

⁠Options

docker run --rm -v $(pwd):/scan soldevelo/infrascan:latest [options]
OptionDescription
--scannercomprehensive (default), regex, checkov, containers, or a comma-separated combination.
--formattext (default), json or html.
--outReport file path, e.g. /scan/report.html.
--frameworksmart (default), auto, terraform, kubernetes, cloudformation, helm, ansible, all.
-f, --includeScan only the given files or directories.
-x, --excludeLeave paths out, e.g. -x docs,tests,examples. Names without a slash match at any depth, as in .gitignore.
--fail-onExit with code 1 on any, high_critical, a grade (grade_a–grade_f), a priority, or only on findings a PR adds (new_any, new_high_critical, new_critical).
--no-tipsOmit the one-line InfraScan Cloud note.

⁠CI/CD

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

- 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, annotations):

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

GitLab CI and other Docker-based CI systems: use the docker run command above.

Full documentation: GitHub Action⁠ · Bitbucket pipe⁠ · README⁠

⁠Tags

TagDescription
latestThe newest release.
1.2.5, 1.2.4, …A specific release. Pin one for reproducible results. Since 1.2.5, the GitHub Action runs the image matching its own version.

Tag summary

Content type

Image

Digest

sha256:35ea7c4d8…

Size

396.5 MB

Last updated

3 days ago

docker pull soldevelo/infrascan