luna audit
Inspect resolved pack and link state, source drift, and managed-file integrity.
Syntax
luna audit [--strict] [--fail-fast] [--format text|json]
Options
| Option | Behavior |
|---|---|
--strict | Fail for managed-target drift and active blocking project-policy findings. |
--fail-fast | Stop strict auditing after the first integrity violation. |
--format <format> | Select text or json machine-readable output. |
Exit behavior
- Text audit:
0for a completed report. - Strict audit:
2when one or more targets are missing or modified, or an unwaived blocking policy finding exists. - Strict audit:
1for invalid usage, invalid policy, or unreadable state. - JSON audit: no strict mode; JSON and text diagnostics do not share a strict JSON mode.
Machine-readable JSON is emitted on standard output; human-readable diagnostics are emitted on standard error.
Project policy
Strict audit evaluates the current top-level project policy against configured source identities and installed pack, link, and external-source lock provenance. It performs no network lookup and does not resolve symbolic refs. Git commit-pin rules therefore continue to evaluate the configured or locked ref, even when the lock also contains the resolved commit.
Report-only and exactly waived findings are displayed without changing an
otherwise clean exit. Each blocking finding contributes to the integrity
result and exit code 2. --fail-fast still stops managed-target scanning
after the first missing or modified target, but strict audit first reports the
complete deterministic policy result.
Policy-aware automation should use a LunaPack version that supports the
policy.version in lunapack.yml. Older binaries ignore the additive project
property and cannot report or enforce it.