Checkov
This image ships Checkov on Ubuntu 24.04 LTS, ready to scan your infrastructure as code for security and compliance policy violations from the first boot of every deployed virtual machine. Checkov is installed from PyPI, pinned to a known release inside an isolated virtualenv, with a simple checkov command on the path.
Checkov is an open source static analysis scanner for infrastructure as code. It parses Terraform, CloudFormation, Kubernetes, Helm, ARM, Bicep, Serverless and Dockerfiles and evaluates them against thousands of built in policies, reporting exactly where the declared infrastructure would violate a security or compliance rule, and naming the policy, the file and the line for every finding.
What this appliance does and does not do
Read this section before you deploy. It explains what this appliance does, and what it does not do, so you know exactly what you are getting.
What Checkov is good at. Checkov answers one question with authority: does my infrastructure as code break a security or compliance policy before I deploy it?
It catches an object store with no encryption, a security group open to the whole internet, a container that runs as root, a database with no backups, and thousands of similar misconfigurations. It finds them in the code, in review or in a pipeline, rather than after the infrastructure is live. It is a foundational shift-left control and maps to common compliance regimes.
What Checkov is not. Checkov is a local, on-demand static scanner. This image does not include, and Checkov itself is not:
- A runtime scanner. It reads your declared infrastructure as code, and it does not inspect running cloud resources or a live account.
- A central console, a SIEM or an agent that reports to a server.
- A secrets vault or a remediation engine. It reports findings, and the fix is yours to make.
- A web interface of any kind.
Checkov tells you that a configuration breaks a policy. Deciding whether to fix the code or accept the finding is your judgment, and this guide shows you the workflow for exactly that.
What makes this image different
It is ready to run, with no credential to manage. Checkov has no user database, no network service and no credential of any kind. There is nothing here to rotate and nothing to leak. Administration is over SSH with your own key.
The release is pinned in an isolated virtualenv. Checkov and its Python dependencies are installed into a dedicated virtualenv. The release is pinned and scanned clean of fixable vulnerabilities before the image is sealed. What you run is reproducible, rather than whatever floated to the top of an index on build day.
A scheduled scan is already wired. A systemd timer runs a daily scan of a drop-in directory and logs its findings. You get continuous coverage of the infrastructure as code you keep on the instance without configuring anything.
The image fails closed. The scheduled scan will not run unless first boot has completed and the scanner actually executes. Two independent safeguards enforce that on every run, not merely the first.
1. Deploy the virtual machine
Deploy the image from the Azure Marketplace. This guide assumes the following defaults.
- Size:
Standard_B2s(2 vCPU, 4 GB) is sufficient and is what this image is validated on. Checkov is a command-line tool, so size up only for very large infrastructure-as-code repositories. - Inbound ports: SSH (22) only. Checkov opens no network port of its own, so nothing else needs to be open.
- Authentication: your own SSH public key.
2. Connect to the virtual machine
ssh azureuser@<vm-ip>On first boot, the machine verifies the scanner itself and records an instance note. This takes a moment. If you connect immediately and first boot is not finished, it is still working. Section 9 shows how to watch it.
3. Confirm Checkov is installed
checkov --version sudo test -f /var/lib/sac/data/checkov-firstboot.done && echo "firstboot sentinel present" systemctl is-active checkov-firstboot.serviceYou should see the pinned Checkov version, the first-boot sentinel present, and a first-boot service that is active.
Checkov lives in an isolated virtualenv at /opt/checkov/venv. The checkov command on your path is a thin wrapper around it.
4. See the policy set it loads
Checkov ships thousands of built-in policies, each keyed CKV_* or CKV2_*, across every supported framework. List them to confirm that the policy set loads.
checkov --list 2>/dev/null | grep -c CKV checkov --list 2>/dev/null | grep -E 'CKV_AWS_' | head -8The first number is how many built-in checks are available. The second shows a sample of the AWS Terraform checks by name. There is nothing to download, because the policy set is bundled with the pinned release.
5. Prove it actually detects a misconfiguration
Do not take "the scanner ran" as proof that detection works. Prove it. This step writes a deliberately insecure Terraform file, a security group that allows all traffic from anywhere. It then scans the file and confirms that Checkov fails the scan and names the policy.
mkdir -p ~/demo-insecure cat > ~/demo-insecure/main.tf <<'EOF' resource "aws_security_group" "open" { name = "open" ingress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } } EOF checkov -d ~/demo-insecure --compact --quiet; echo "checkov exit code: $? (non-zero = policy failed)"You should see one or more failed checks, each naming a CKV_AWS_* policy and the resource it applies to, and a non-zero exit code. A non-zero exit is not an error. It is a finding: Checkov caught infrastructure that would have shipped an open security group.
6. A clean configuration passes
Now scan a configuration with nothing to flag, and confirm that the scan passes with exit code zero.
mkdir -p ~/demo-clean cat > ~/demo-clean/main.tf <<'EOF' output "ok" { value = "ok" } EOF checkov -d ~/demo-clean --compact --quiet; echo "checkov exit code: $? (0 = all checks passed)"That is the whole product in two directories. An insecure config fails, a clean config passes, and a pipeline reads the exit code to block or allow a change.
7. The scheduled scan
A systemd timer runs a daily scan of the drop-in directory /opt/checkov/scan-targets and appends its report to /var/log/checkov/scan.log. You get continuous coverage of the infrastructure as code you keep on the instance, with nothing to configure.
systemctl is-active checkov-scan.timer
systemctl list-timers checkov-scan.timer --no-pager | sed -n '1,3p' echo "drop your IaC into /opt/checkov/scan-targets; reports append to /var/log/checkov/scan.log"To scan your own infrastructure as code on the schedule, copy it into the target directory.
To run the scheduled scan immediately instead of waiting for the timer, and then read the tail of its log, use the commands below.
sudo cp -r ~/demo-insecure/* /opt/checkov/scan-targets/
sudo systemctl start checkov-scan.service
sudo tail -n 20 /var/log/checkov/scan.log8. Suppress a finding or run in CI
When a finding is a deliberate, reviewed exception, suppress it inline with a skip comment rather than turning the check off everywhere. This example accepts the open ingress with a documented reason.
resource "aws_security_group" "open" {
# checkov:skip=CKV_AWS_24:public ingress is intentional for this bastion, reviewed 2026-07 name = "open" ingress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] } }In a pipeline, run Checkov against your infrastructure directory and let its exit code gate the job. A non-zero exit fails the build on a policy violation.
# Point Checkov at your own infrastructure directory in CI; a non-zero exit fails the build. checkov -d /path/to/your/iac --compactTo scan a single file, or to restrict to one framework, use checkov -f main.tf or checkov -d . --framework terraform. Central policy, custom checks and output formats (JSON, SARIF, JUnit) are all configured with flags or a .checkov.yaml file. Run checkov --help for the full set.
9. First boot and troubleshooting
First boot is handled by checkov-firstboot.service, which verifies the scanner on this machine and writes the instance note at /root/checkov-instance.txt. To watch or re-run it, use the commands below.
systemctl status checkov-firstboot.service --no-pager | sed -n '1,8p'
sudo sed -n '1,12p' /root/checkov-instance.txtIf first boot did not complete (for example, the machine lost power during first boot), re-run it.
# Re-run first boot if it did not complete.
sudo systemctl restart checkov-firstboot.serviceThe scheduled scan refuses to run until first boot has completed and the scanner executes. A machine that has not finished first boot will therefore never present a scan that silently ran nothing.
10. Licensing
Checkov is licensed under the Apache License 2.0, a permissive license, and is installed unmodified from PyPI. The license text is shipped on the image at /usr/share/doc/sac/CHECKOV-LICENSE.txt. The exact resolved dependency set is recorded at /usr/share/doc/sac/checkov-pip-freeze.txt.
The underlying Ubuntu operating system and its system Python are installed from Ubuntu's public apt archive. They stay patchable through the normal unattended-upgrades path for the life of the release.
Support
Every SecureAnyCloud deployment is backed by 24/7 support. If you have questions about this image, contact us at sales@secureanycloud.com.
Deploy on Azure
Launch Checkov on Ubuntu 24.04 LTS by SecureAnyCloud with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
Checkov is an open-source static analysis and policy-as-code scanner. It finds security and compliance misconfigurations in infrastructure-as-code before the code is ever deployed. It parses Terraform, CloudFormation, Kubernetes, Helm, Serverless, Bicep, ARM and Dockerfiles, and it reports where the declared infrastructure violates a policy, such as a storage bucket with no encryption, a security group open to the world, or a container running as root.
This SecureAnyCloud image is ready to use. Checkov is installed in an isolated Python virtual environment with a wrapper on the system path, so the moment you connect over SSH you can run a real scan against thousands of built-in policies with no setup.
What you get:
- A headless command-line tool, with no web interface, no daemon, no network port and no credential of any kind
- A management surface that is the
checkovCLI plus SSH with your own key, so there is nothing to rotate and nothing to leak - Checkov 3.3.8 in a dedicated virtual environment at
/opt/checkov/venv, with a wrapper at/usr/local/bin/checkovthat putscheckovon the system path - An instance security group that opens port 22 only
- A daily systemd timer,
checkov-scan.timer, that scans a drop-in target directory at/opt/checkov/scan-targetsand appends its report to/var/log/checkov/scan.log. You can leave infrastructure code in one place and have it re-checked automatically. - Findings that are Checkov working as designed. Review each one, fix the code, or suppress it with an inline skip comment or a policy file.
- 24/7 SecureAnyCloud support
Prerequisites
Before you deploy this image, make sure you have:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups, and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line
Launch the Instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for Checkov. Select the SecureAnyCloud listing and choose Select, then choose Continue on the subscription summary.
Pick an instance type of m5.large or larger. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Then create or select a security group that opens port 22 from your management network. Leave the root volume at the default size or larger.
Select Launch instance. First-boot initialization takes a few seconds after the instance state becomes Running and the status checks pass. The Checkov toolchain is ready by the time you can connect.
Launch the Instance from the AWS CLI
The following command launches an instance from the SecureAnyCloud Checkov Marketplace AMI into an existing subnet and security group.
Replace <ami-id> with the AMI ID shown on the Marketplace listing, <key-name> with your EC2 key pair name, and <subnet-id> with your subnet ID. Replace <security-group-id> with a security group that opens port 22 from your management network.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=checkov}]'When the instance reaches the Running state and its status checks pass, note its public IP address or DNS name. You can find it in the EC2 console or with aws ec2 describe-instances.
Connect to Your Instance
Connect over SSH using your key pair and the login user for your operating system variant.
- OS variant: Ubuntu 24.04
- SSH login user: ubuntu
ssh -i <key-name>.pem ubuntu@<public-ip>There is no login credential to fetch, because Checkov has none. The per-instance welcome note at /root/checkov-instance.txt records the installed version and the most useful commands. Read it with sudo cat /root/checkov-instance.txt.
Verify Checkov and Its Policy Set
Checkov is installed in a virtual environment at /opt/checkov/venv, and the checkov wrapper on the system path runs it. Confirm the installed version, which is pinned to Checkov 3.3.8 on this image.
checkov --versionCheckov ships thousands of built-in policies keyed CKV_* and CKV2_*. Count the built-in checks that the shipped scanner loads.
checkov --list | grep -c CKVYou should see 3.3.8 for the version and several thousand policies listed. This confirms that the scanner and its policy set are loaded and ready.
Prove Real Misconfiguration Detection
The best way to confirm that the scanner works is to run it against a deliberately insecure configuration and watch it report the failed checks. The command below writes a small Terraform file with an S3 bucket that has no hardening and a security group open to the world. It then scans the file and prints the findings.
Checkov exits non-zero when a policy fails, which is the signal a CI pipeline gates on. The command ends cleanly after showing the report.
D=$(mktemp -d)
cat > "$D/insecure.tf" <<'EOF' resource "aws_s3_bucket" "data" { bucket = "sac-demo-data" } resource "aws_security_group" "open" { name = "open-to-world" ingress { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } } EOF checkov -d "$D" --compact --quiet || echo "checkov exited non-zero: the failing checks above are the expected result" rm -rf "$D"Each failed check names the policy id (for example CKV_AWS_24, the rule that a security group must not allow ingress from 0.0.0.0/0 to port 22), the resource it applies to, and the file and line. This is exactly the report you would fix or suppress before you deploy the infrastructure.
Scan a Clean Configuration
A configuration with no failing checks passes clean, and Checkov exits zero. The command below writes an S3 bucket with versioning enabled and runs the versioning policy against it.
D=$(mktemp -d)
cat > "$D/main.tf" <<'EOF' resource "aws_s3_bucket" "logs" { bucket = "sac-secure-logs" } resource "aws_s3_bucket_versioning" "logs" { bucket = aws_s3_bucket.logs.id versioning_configuration { status = "Enabled" } } EOF checkov -d "$D" --check CKV_AWS_21 --compact --quiet echo "exit code: $?" rm -rf "$D"You should see Passed checks: 1, Failed checks: 0 and exit code: 0. Scanning your own code follows the same pattern. Use checkov -d /path/to/your/iac for a directory, or checkov -f main.tf for a single file.
The Daily Scheduled Scan
The image ships a daily scheduled scan. The checkov-scan.timer systemd timer runs checkov -d /opt/checkov/scan-targets once a day and appends the report to /var/log/checkov/scan.log. Confirm that the timer is active.
systemctl status checkov-scan.timer --no-pagerDrop your infrastructure code into /opt/checkov/scan-targets to have it scanned automatically, or run Checkov by hand against any path whenever you like.
A finding is the scanner working as designed. Review the report, fix the code, or suppress a reviewed finding with an inline # checkov:skip=CKV_...:reason comment or a .checkov.yaml policy file.
Wire Checkov into CI
Checkov's non-zero exit on a policy failure is what makes it a merge gate. In a CI pipeline, run checkov -d . (or point it at a plan file with checkov -f plan.json) as a build step. Let the non-zero exit fail the build when a policy is violated.
Use --check to run only specific policies, and --skip-check to exclude ones you have accepted. Add a .checkov.yaml file in your repository to codify the policy set for the whole team. Because the scanner and its policies are pinned on this image, every run is reproducible.
Support
This image is published and supported by SecureAnyCloud. Support covers:
- Running scans
- Interpreting findings
- Writing suppressions and custom policies
- Wiring Checkov into CI
- Keeping your infrastructure code compliant
Contact SecureAnyCloud through the support channel listed on the AWS Marketplace listing.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on AWS
Launch Checkov on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com