Last Updated: April 2026
CI/CD Integration
Yamlr acts as the ultimate deterministic gatekeeper. The engine was explicitly designed to return standard unix exit codes and output standardized reporting formats natively, making it a drop-in integration for GitHub Actions, GitLab CI, and pre-commit hooks.
1. The Safety Gate (Exit Codes)
When running locally, Yamlr prefers to guide the user. During CI pipeline evaluations, Yamlr must act ruthlessly.
You control workflow blocking via two primary flags:
--fail-on {error,warning,any}: Instructs the engine to returnExit Code 1when it uncovers an issue matching that severity level.--risk-threshold {high,medium,low}: Forces the engine to only triggerExit Code 1if the internal risk identification exceeds this threshold.
2. GitHub Action Integration
Yamlr supports execution via GitHub Actions.
yaml- name: Execute Deterministic Scan run: yamlr scan . --fail-on error --output sarif > report.sarif
(Reference the action.yml in the root of the repository for input configuration).
3. Pre-Commit Integration (Coming Soon)
Native pre-commit hook support is currently in the roadmap. For current workflows, use the CLI directly within a local git hook.
bash# Manual hook implementation yamlr scan . --fail-on error --quiet