Description
Runs all validation checks on a container image at once. By default, runs all 10 checks (age, size, ports, registry, root-user, secrets, healthcheck, labels, entrypoint, platform) with default parameters.Command Syntax
Flags
Check Selection
| Flag | Short | Type | Description |
|---|---|---|---|
--config | -c | string | Configuration file (JSON or YAML) (optional) |
--include | - | string | Comma-separated list of checks to run (optional) |
--skip | - | string | Comma-separated list of checks to skip (optional) |
--fail-fast | - | bool | Stop on first check failure (default: false) |
--include and --skip are mutually exclusive.
Check-Specific Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--max-age | -a | uint | 90 | Maximum age in days (optional) |
--max-size | -m | uint | 500 | Maximum size in megabytes (optional) |
--max-layers | -y | uint | 20 | Maximum number of layers (optional) |
--allowed-ports | -p | string | - | Comma-separated list of allowed ports or @<file> (optional) |
--allowed-platforms | - | string | - | Comma-separated list of allowed platforms or @<file> |
--registry-policy | -r | string | - | Registry policy file (JSON or YAML) |
--labels-policy | - | string | - | Labels policy file (JSON or YAML) |
--secrets-policy | -s | string | - | Secrets policy file (JSON or YAML) (optional) |
--skip-env-vars | - | bool | false | Skip environment variable checks in secrets detection (optional) |
--skip-files | - | bool | false | Skip file system checks in secrets detection (optional) |
--allow-shell-form | - | bool | false | Allow shell form for entrypoint or cmd (optional) |
Global Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--output | -o | string | text | Output format: text or json |
--log-level | - | string | info | Log level (trace, debug, info, warn, error, fatal, panic) |
Precedence Rules
- Without
--config: all 10 checks run with defaults, except those in--skip - With
--config: only checks present in the config file run, except those in--skip --includeoverrides config file check selection (runs only specified checks)- CLI flags override config file values
--includeand--skipalways take precedence over the config file
Check Names
Valid check names for--include and --skip:
agesizeportsregistryroot-usersecretshealthchecklabelsentrypointplatform
Required Configuration
Some checks require additional configuration:| Check | Required Flag | Can Be Provided Via |
|---|---|---|
registry | --registry-policy | CLI flag or config file |
labels | --labels-policy | CLI flag or config file |
platform | --allowed-platforms | CLI flag or config file |
Usage Examples
Run All Checks with Defaults
Include Only Specific Checks
Skip Specific Checks
With Config File
Config File with CLI Overrides
With Fail-Fast
Config from stdin
JSON Output
OCI Layout
OCI Archive
Example Output
Text Format (Multiple Checks)
JSON Format (All Checks)
Configuration File Format
YAML Example
JSON Example
Inline Policy Example
Policies can be embedded directly in the config file:Fail-Fast Behavior
By default, theall command runs all checks and reports all failures (continue-on-error mode).
With --fail-fast:
- Execution stops on the first check that fails (validation failure or execution error)
- Remaining checks are not executed
- The exit code reflects the first failure encountered
Exit Codes
| Exit Code | Meaning | Example | |-----------|---------|---------|----------| | 0 | All checks passed | All validations succeeded | | 1 | One or more checks failed | Image too old, runs as root, etc. | | 2 | Execution error | Invalid config file, image not found, missing required flags | Note: If some checks fail validation and others have execution errors, exit code 2 (execution error) takes precedence over exit code 1 (validation failure).Related Configuration Files
config/config.yaml- Sample all-checks configuration in YAML formatconfig/config.json- Sample all-checks configuration in JSON formatconfig/config-inline.yaml- Sample with inline policies in YAML formatconfig/config-inline.json- Sample with inline policies in JSON format
Notes
- Only checks present in the config file are executed (when using
--config). - Empty check objects (e.g.,
root-user: {}) enable the check with defaults. - CLI flags always override config file values.
--includeand--skipoverride config file check selection.- Policy files support both file paths (strings) and inline objects.
- Inline objects are converted to temporary JSON files internally.
- All file arguments support stdin input using
-.