Why Rustmaninoff over Checkov and Trivy
Checkov and Trivy are broader platforms. Rustmaninoff is a small IaC attribute scanner for CI when you already know the CKV ids to enforce.
- Speed. 43 ms on 1,540 resources vs 2.53 s Checkov 3.4.11 (~59×) and 5.60 s Trivy 0.76.2 (~130×) (latest history.json row). No Python interpreter, no policy-db refresh on the scan path.
- One static binary. Checkov needs a Python environment. Trivy also covers vulns, secrets, and SBOMs that an IaC-only job may not want.
- Checkov-shaped policies, Rust engine. Published CKV ids, YAML pass-conditions, and
# checkov:skip=/checkov.io/skip. Not a Python port of Checkov. - Predictable CI. Unresolved interpolations are unknown, never fail. SARIF 2.1.0, JUnit, JSON,
--fail-on. - Focused catalog. 546 checks with published fidelity (Docker 11/11 / K8s 111/113 at 98.2% of pinned Checkov ids). Opt-in Terraform plan JSON (
--framework terraform_plan). Helm, Kustomize, and secrets/vuln scanning still open.
Install
Requires Rust 1.95 or newer for source builds. Prefer the GitHub Action for CI.
cargo install rustmaninoff --locked
rustmaninoff scan .
Homebrew:
brew install jose-compu/tap/rustmaninoff
Docker (GHCR):
docker run --rm -v "$PWD":/src -w /src ghcr.io/jose-compu/rustmaninoff:0.6.8 scan .
From a checkout:
cargo build --release -p rustmaninoff
./target/release/rustmaninoff scan .
GitHub Release binaries for Linux and macOS (amd64 and arm64): v0.6.4 (alias inside an ingress snippet) · v0.6.3 (every ingress snippet) · v0.6.2 (Lua in ingress snippets) · v0.6.1 (quoted annotation keys). A snippet fails CKV_K8S_154 only when its value contains alias. A snippet annotation fails CKV_K8S_153 even when the value is plain config.
GitHub Action
Official Action on the GitHub Marketplace. Composite Action at repo root (action.yml): downloads a release binary, verifies .sha256, validates inputs, and runs rustmaninoff scan. Full reference: ACTION.md.
- uses: actions/checkout@v4
- uses: jose-compu/rustmaninoff@v0.6.8
with:
path: .
version: "0.6.8" # or "latest"
fail-on: HIGH
output: sarif
sarif-file: rustmaninoff.sarif
# args: "--framework terraform,kubernetes"
- uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: rustmaninoff.sarif
Required permissions for SARIF upload: security-events: write. Pin the Action tag (@v0.6.8) in production; optionally pin by commit SHA for supply-chain hardening.
From 0.6.5, starting_with and contains match any string item in a Kubernetes command or args array (prefix or substring inside a longer argument).
From 0.6.8, the site and README cite the latest benchmarks/history.json row (refreshed published speed figures).
From 0.6.7, CKV_K8S_151 fails a kubelet command when a cipher after --tls-cipher-suites= is outside the strong list; an unset flag still passes.
From 0.6.6, CKV_K8S_105 fails a kube-apiserver command when a cipher after --tls-cipher-suites= is outside Checkov's strong list; an unset flag still passes.
Scan
rustmaninoff scan [PATH] \
--framework terraform,cloudformation,kubernetes,docker \
--check CKV_AWS_3 \
--skip-check CKV_AWS_8 \
--output cli,json,sarif,junit \
--fail-on HIGH \
--external-checks-dir ./extra
PATHdefaults to the current directory.--outputdefaults tocli. Also:json,sarif,junit, plus--json-file,--sarif-file,--junit-file.--fail-onisLOW,MEDIUM,HIGH, orCRITICAL. DefaultHIGH.--soft-failalways exits 0.--show-unknownprints unknown results.--show-passedprints passed checks.--compactshortens the text report.
Exit codes: 0 when nothing fails the threshold, 1 when a finding is at or above --fail-on or a file fails to parse, 2 on usage errors.
Interpolations (${...}, Fn::*, !Ref, !GetAtt) are unknown. Unknown results do not fail the process.
Config
Optional .rustmaninoff.yaml in the scan path, or --config:
frameworks: [terraform, cloudformation, kubernetes, docker]
skip_checks: []
fail_on: HIGH
excluded_paths: []
external_checks_dirs: []
show_unknown: false
compact: false
Directories named .git, .terraform, .terragrunt-cache, node_modules, vendor, and target are skipped. Symbolic links are not followed.
Policies
A check definition is the pass condition. Built-in policies are rewritten YAML, attributed to Checkov (Bridgecrew / Palo Alto Networks, Apache-2.0), and reuse published CKV ids.
Operators: equals, not_equals, exists, not_exists, contains, not_contains, within, regex_match, starting_with, ending_with, numeric comparisons, is_true, is_false, is_empty, length_greater_than, length_less_than, and their negated forms. Combinators: and, or, not. Wrap a single path segment in double quotes when the key name contains dots or slashes (for example a Kubernetes annotation). On a map of strings, no_element can read each entry's key and value in the where clause.
Extensions: no_element, forbid_resource, equals_any, intersects, image_tag_pinned, connection (graph neighbors), filter (attribute alias), and missing: pass|fail|unknown. scope is ignored. Severity defaults to MEDIUM when omitted.
Example
metadata:
id: CKV_DOCKER_1
name: Ensure the base image uses a non-latest tag
category: SUPPLY_CHAIN
severity: HIGH
framework: docker
resource_types:
- dockerfile
definition:
cond_type: attribute
attribute: FROM.unpinned
operator: is_false
Drop extra YAML in --external-checks-dir. Each built-in check ships with pass and fail fixtures.
Skips
Inline: # checkov:skip=CKV_AWS_3:reason.
Kubernetes annotation value: checkov.io/skip: CKV_K8S_16=reason.
v0.4 scope
- Terraform
.tf/.tf.json/ OpenTofu.tofumanagedresourceblocks anddatasources. Vars/locals via defaults,TF_VAR_*, and--var-file. No module download yet. - CloudFormation YAML and JSON
Resources. Attribute paths are relative toProperties. - Kubernetes multi-document YAML, including
List. - Dockerfiles: FROM, USER, ADD vs COPY, HEALTHCHECK, and privileged-ish RUN patterns.
- 546 built-in checks with pass/fail fixtures. Docker 100% and Kubernetes 111/113 (98.2%) of pinned Checkov ids (fidelity.md).
- Text, JSON, SARIF 2.1.0, and JUnit reports.
S3 encryption, versioning, and logging on current Terraform target aws_s3_bucket_server_side_encryption_configuration, aws_s3_bucket_versioning, and aws_s3_bucket_logging. CKV_AWS_286 matches a static action subset, including * and *:*. CKV_K8S_14 accepts a digest or a tag other than latest; an image whose last colon is a registry port and which has no tag is treated as pinned.
0.5.0 shipped: opt-in Terraform plan JSON (--framework terraform_plan). 0.5.3: SARIF paths for GitHub code scanning. 0.5.4: default plan scan reports creates and updates; --plan-scope all scans the whole state. 0.5.5: plan scans follow depends_on and address references for companion checks. 0.5.6: plan scan coverage is published in docs/fidelity.md. 0.6.0 shipped: README and Action plan workflow (#83); milestone 0.6.0 is closed. Still open: the remaining Kubernetes ids, local HCL modules, Helm, Kustomize, and baselines. The order is the roadmap.
CI without the Action
Prefer jose-compu/rustmaninoff@v0.6.8. Manual install path:
- uses: actions/checkout@v4
- run: cargo install rustmaninoff --locked --version 0.6.8
- run: rustmaninoff scan . --fail-on HIGH --output sarif --sarif-file rustmaninoff.sarif
Crates
Workspace 0.6.8 on crates.io:
- rustmaninoff (CLI)
- rustmaninoff-ir
- rustmaninoff-engine
- rustmaninoff-report
- rustmaninoff-parser-terraform
- rustmaninoff-parser-cfn
- rustmaninoff-parser-k8s
- rustmaninoff-parser-docker
API docs: docs.rs/rustmaninoff.
Limits
Files larger than 10 MB, and files past the nesting or YAML-alias limits, are reported as diagnostics and are not parsed.
Rustmaninoff