audit-validate

command module
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Command audit-validate validates an outputs.yaml file against a taxonomy YAML — a pre-deploy CI gate for the github.com/axonops/audit library (#611).

Usage

audit-validate -taxonomy <file|-> -outputs <file|-> [flags]

-taxonomy <file>      Path to taxonomy YAML, or "-" for stdin.
-outputs <file>       Path to outputs YAML, or "-" for stdin.
-format text|json     Output format (default: text).
-quiet                Suppress all output; rely on exit code.
-resolve-secrets      Reserved. Default release builds reject this
                      flag because they have no secret providers
                      compiled in; offline ref+ pre-scanning is
                      always active.
-version              Print the audit-validate version and exit 0.

Exit codes

0  valid configuration
1  parse error (file not found, invalid YAML)
2  schema or usage error (missing required field, wrong type,
                          unknown field, missing/invalid CLI flag,
                          stdin double-use, -resolve-secrets in a
                          binary that does not support it)
3  semantic error (route references unknown taxonomy entries,
                   output type unknown, unresolved ref+ string)

Example: GitHub Actions pre-deploy gate

Install the binary, then validate. See docs/validation.md for the complete workflow including caching:

go install github.com/axonops/audit/cmd/audit-validate@latest
audit-validate -taxonomy taxonomy.yaml -outputs outputs/prod.yaml

Example: stdin

cat taxonomy.yaml | audit-validate -taxonomy - -outputs prod.yaml

audit-validate is a thin CLI wrapper around github.com/axonops/audit/outputconfig.Load; the validation logic is shared with the runtime path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL