What ironctl scan can grade¶
One tool, one grade, many inputs. ironctl scan reads a container's real isolation posture
and returns a 0–100 score with a letter grade, from a running container down to the
infrastructure-as-code that will one day launch it. Every mode below runs read-only, needs no
account, and prints the exact flags that close the gap.
The modes are grouped by the artifact you already have — a live container, an orchestrator manifest, a cloud runtime spec, or the infrastructure-as-code that defines it. Jump to your category, then copy one command.
Containers & images¶
The container in front of you, whatever runtime launched it, and the Dockerfile that builds it.
-
Running container¶
Audits any live OCI container (Docker, Podman, nerdctl, containerd): user, capabilities, seccomp, rootfs, network, privilege, and mounts.
-
Alternate runtimes¶
Same grade for Podman, nerdctl, and containerd. Auto-detected by default; force one with
--runtimewhen a host runs several. -
Dockerfile (static)¶
Grades authoring-time posture straight from a
Dockerfile— no daemon, no build. CatchesUSER root, missing drops, and writable layers in CI.
Compose & orchestrators¶
Declared workloads, before you ever run up, apply, or job run. Multi-workload inputs
roll up to the weakest workload they produce.
-
Docker Compose¶
Grades one service in a
docker-compose.ymlfrom its declared config, before you ever runup. Point--serviceat the workload you care about. -
Kubernetes manifest¶
Grades the pod spec in a Kubernetes YAML (
securityContext, caps, host namespaces) so a weak manifest fails review, not production. -
Helm chart¶
Renders a chart with
helm template(directory or.tgz) and grades the weakest workload it produces, so a chart is safe before it is installed. -
Kustomize overlay¶
Renders an overlay with
kustomize build(orkubectl kustomize) and grades the weakest workload it produces, so a patched overlay is graded before it hits a cluster. -
Nomad job¶
Grades the docker-driver tasks in a HashiCorp Nomad job spec and rolls up to the weakest task, so a job is graded before
nomad job run. -
OpenShift manifest¶
Grades an OpenShift manifest set (DeploymentConfig, Deployment, Pod). A DeploymentConfig embeds a standard pod spec, so it reuses the k8s scorer and rolls up to the weakest workload.
Cloud runtimes¶
Managed container runtimes, graded from their service or task spec — no cloud account, no API call.
-
Google Cloud Run¶
Grades a Cloud Run service's container config straight from its Knative Service YAML (
gcloud run services describe --format=export), no Google account needed. -
Amazon ECS¶
Grades an ECS task definition's container contract from a live or registered
describe-task-definition, no AWS call needed. Rolls up to the weakest container. -
Azure Container Instances¶
Grades the
Microsoft.ContainerInstance/containerGroupsin an ARM template oraz container showJSON with the managed-runtime model, rolling up to the weakest container in the group. -
AWS App Runner¶
Grades an App Runner service from its
aws apprunner describe-serviceJSON with the managed-runtime model. App Runner exposes nosecurityContext, so it grades honestly on its Fargate/Firecracker floors.
Infrastructure-as-Code¶
The code that will one day launch the container, graded before it deploys. Container workloads roll up to the weakest one the code defines.
-
Terraform plan¶
Grades container workloads in a
terraform show -jsonplan or state (Kubernetes and ECS task resources), or point it at a directory and it runs the plan for you. -
CloudFormation template¶
Grades every
AWS::ECS::TaskDefinitionin a CloudFormation template (YAML or JSON) and rolls up to the weakest, so a template is graded before the stack deploys. -
Pulumi program¶
Grades the container workloads in a
pulumi stack exportorpulumi preview --json(Kubernetes and ECS resources) with the same scorers as--k8sand--ecs, rolling up to the weakest workload, so a program is graded beforepulumi up. -
Azure Bicep template¶
Compiles a
.bicepfile (or a directory of them) to ARM withbicep buildand grades theMicrosoft.ContainerInstance/containerGroupsit declares, reusing the--azureACI path and rolling up to the weakest container, so a template is graded beforeaz deployment. -
AWS CDK app¶
Synthesizes a CDK app with
cdk synth(or grades a pre-synthesized template /cdk.out) and grades everyAWS::ECS::TaskDefinitionit emits, reusing the--cloudformationscorer and rolling up to the weakest container, so an app is graded beforecdk deploy. -
AWS SAM template¶
Grades the
AWS::ECS::TaskDefinitionresources declared in an AWS SAM template (Transform: AWS::Serverless-*), reusing the--cloudformationscorer and rolling up to the weakest container. SAM is a CloudFormation superset, so nosambuild step is needed to grade a serverless app's ECS/Fargate task definitions.
Enforce & generate¶
The cards above answer what can I point scan at. These three answer what scan does past the grade: it becomes the gate, writes the guardrail, or fails the build. Same seven-dimension scorer, now wired into admission control instead of a scorecard.
-
Admission gate¶
Turns scan into an in-cluster enforcement gate. Grades the workload in a Kubernetes AdmissionReview through the same pod-spec scorer and gates admission on
--min-score;--admission-responseemits the allow/deny JSON a ValidatingWebhook returns. Fail-closed. -
Policy generator¶
Flips scan from grading a manifest to writing the guardrail.
--emit-policyturns every control the manifest failed into ready-to-apply Kyverno ClusterPolicy or Gatekeeper ConstraintTemplate YAML, one Enforce rule per gap, so the cluster blocks the exact delta to 100/A. -
Policy-as-code gate¶
Closes the loop:
--checkevaluates the manifest against the rules--emit-policywould generate and exits non-zero on any violation — a self-contained CI gate with no cluster and no controller. Same dim→rule map as the generator, enforced in place. Pair with--md/--sariffor PR diagnostics.
Every mode, one engine¶
Every card above feeds the same seven-dimension scorer. The input changes; the grade,
the letter, and the --fix remediation do not. That means a Compose file, a Helm chart, and
the container they eventually produce are all measured on one comparable scale.
| Category | Input | Flag | What it reads | Deep dive |
|---|---|---|---|---|
| Containers & images | Running container | (positional) | live docker inspect of any OCI container |
Scan reference |
| Containers & images | Alternate runtimes | --runtime |
Podman / nerdctl / containerd | Supported runtimes |
| Containers & images | Dockerfile | --dockerfile |
authoring-time posture, no daemon | Grade a Dockerfile statically |
| Compose & orchestrators | Docker Compose | --compose --service |
a service's declared config | Scan reference |
| Compose & orchestrators | Kubernetes manifest | --k8s |
a pod spec's securityContext |
Scan reference |
| Compose & orchestrators | Helm chart | --helm |
weakest workload from helm template |
Scan reference |
| Compose & orchestrators | Kustomize overlay | --kustomize |
weakest workload from kustomize build |
Grade a kustomization |
| Compose & orchestrators | Nomad job | --nomad |
docker-driver tasks in a job spec | Scan reference |
| Compose & orchestrators | OpenShift manifest | --openshift |
weakest workload (DeploymentConfig/Deployment/Pod) | Scan reference |
| Cloud runtimes | Cloud Run | --cloudrun |
a Knative Service's container config | Grade a Cloud Run service |
| Cloud runtimes | Amazon ECS | --ecs |
a task definition's container contract | Grade an ECS task definition |
| Cloud runtimes | Azure Container Instances | --azure |
weakest container in an ARM containerGroups |
Grade an Azure container group |
| Cloud runtimes | AWS App Runner | --app-runner |
a service's managed-runtime posture | Grade an App Runner service |
| Infrastructure-as-Code | Terraform plan | --terraform |
container workloads in a plan/state | Grade a Terraform plan |
| Infrastructure-as-Code | CloudFormation | --cloudformation |
ECS task defs in a CFN template | Grade a CloudFormation template |
| Infrastructure-as-Code | Pulumi program | --pulumi |
K8s & ECS workloads in stack-export / preview JSON | Grade a Pulumi program |
| Infrastructure-as-Code | Azure Bicep template | --bicep |
weakest containerGroups container, compiled to ARM |
Grade an Azure Bicep template |
| Infrastructure-as-Code | AWS CDK app | --cdk |
weakest ECS container, synthesized to CloudFormation | Grade an AWS CDK app |
| Infrastructure-as-Code | AWS SAM template | --sam |
ECS task defs in a SAM (Serverless) template | Grade an AWS SAM template |
| Enforce & generate | Admission gate | --k8s-admission --admission-response |
the workload in an AdmissionReview (webhook backend) | Grade a Kubernetes AdmissionReview |
| Enforce & generate | Policy generator | --k8s --emit-policy |
failed controls → Kyverno/Gatekeeper admission YAML | Generate an admission policy |
| Enforce & generate | Policy-as-code gate | --k8s --check |
the manifest against the rules --emit-policy would generate; non-zero on violation |
Gate a manifest in CI |
Every mode also emits the machine-readable outputs: a SARIF log
for GitHub code scanning, a shields.io badge, and
--fix remediation.
Start with what you have¶
# install (Homebrew)
brew install ironsecco/ironclaw/ironclaw
# grade the surface in front of you, then print the exact hardening flags
ironctl scan my-container
ironctl scan my-container --fix
Keep going¶
- Scan any container in 10 seconds →: the full
ironctl scanreference for every flag above. - Scan in CI →: the same engine as a GitHub Action that grades every pull request.
- Container hardening guides →: real before/after grades and the flags that close the gap, per image.
- Container Isolation Scores →: default-config grades for the most-pulled public images.