Skip to main content
Version: 0.1 · v0.1.0

CLI reference

The CLI has one command: mirops scan. Every flag has an environment-variable equivalent; flags take precedence over env vars.

mirops scan --source <report> [--enforce] [--output table|json]

Flags​

FlagEnv varDefaultPurpose
--sourceMIROPS_SOURCE—Report source: path, file://, s3://, azure://, http://
--enforceMIROPS_ENFORCEfalseFail the pipeline based on the verdict
--enforce-levelMIROPS_ENFORCE_LEVELcriticalMinimum level that fails: critical | warning
--target-versionMIROPS_TARGET_VERSION—Expected target version to validate
--outputMIROPS_OUTPUTtableOutput format: table | json
--version——Print the CLI version
-h, --help——Help

Exit codes​

CodeMeaning
0Passed (or --enforce not used)
1Gated by the verdict (blocked / below the enforce level)
2Usage or fetch error (missing source, unreadable report)

Examples​

# report only — never fails
mirops scan --source azure://acct/reports/prod.mirops

# CI gate — fail on CRITICAL
mirops scan --source s3://bucket/prod.mirops --enforce

# stricter — also fail on WARNING
mirops scan --source ./report.mirops --enforce --enforce-level warning

# JSON for another tool
mirops scan --source ./report.json --output json | jq '.decision'

Sources​

SchemeAuth
local / file://—
http://— (operator's report endpoint)
s3://bucket/keyIRSA / instance profile / env vars / static keys
azure://account/container/blobDefaultAzureCredential (Workload/Managed Identity, az login, service principal)

Cloud credentials (for remote sources)​

The CLI reads a report from the cloud (it doesn't write — that's the operator's job). To read an s3:// or azure:// source, it resolves credentials automatically. In CI, the simplest option is the provider's standard environment variables:

SourceEnvironment variables
S3AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION (and AWS_SESSION_TOKEN for temporary creds)
Azure BlobAZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET

Inside the cloud you can set nothing and rely on IRSA (S3) or Workload / Managed Identity (Azure); from a laptop, az login or an AWS profile works too.

export MIROPS_SOURCE="azure://myacct/reports/prod.mirops"
export AZURE_CLIENT_ID=... AZURE_TENANT_ID=... AZURE_CLIENT_SECRET=...
mirops scan --enforce

See gate CI/CD for a full pipeline example.