Validate YAML files for syntax errors, style issues, and security misconfigurations — all in one command.
Prerequisites: Docker installed on your system.
Run this once to create the ytest shortcut:
# Bash
echo 'alias ytest="docker run --rm -v \"\$(pwd):/data\" pooyanazad/yaml-checker"' >> ~/.bashrc && source ~/.bashrcUsing Zsh instead?
echo 'alias ytest="docker run --rm -v \"\$(pwd):/data\" pooyanazad/yaml-checker"' >> ~/.zshrc && source ~/.zshrcNow you can use ytest anywhere.
Note
The multiple files and directory scanning features will be available in v3, starting on June 1st.
# Single file
ytest myfile.yaml
# Multiple files
ytest config.yaml deployment.yaml secrets.yaml
# Entire directory (recursive)
ytest ./configs/
# Glob pattern
ytest ./configs/**/*.yamlWindows / without the alias
PowerShell / CMD:
docker run --rm -v "%cd%:/data" pooyanazad/yaml-checker myfile.yamlGit Bash:
MSYS_NO_PATHCONV=1 docker run --rm -v "$(pwd):/data" pooyanazad/yaml-checker myfile.yamlLinux/macOS (no alias):
docker run --rm -v "$(pwd):/data" pooyanazad/yaml-checker myfile.yaml| Layer | Tool | What it catches |
|---|---|---|
| Syntax | PyYAML | Parse errors, broken structure, invalid indentation |
| Linting | yamllint | Style issues, line length, trailing spaces, consistency |
| Security | Checkov | Hardcoded secrets, privileged containers, misconfigurations |
Issues are grouped by severity (Critical → High → Medium → Low) with colored output and a summary table. When scanning multiple files, you get a combined report showing which files have problems.
✅ Multi-file & directory scanning
✅ Glob pattern support (**/*.yaml)
✅ Cross-platform (Windows, Linux, macOS)
✅ Multi-arch Docker image (amd64/arm64)
✅ Colored severity-based reporting
✅ Zero configuration required
| Image | pooyanazad/yaml-checker |
| Tag | latest is always up to date |
| Base | python:3.12-slim |
| Platforms | linux/amd64, linux/arm64 |
Changes since last release:
- test: mock timeout handling correctly (Day 10) (6753344)
- feat: make timeout configurable (Day 9) (55bef66)
- feat: add timeout to check_dependencies() (Day 8) (913339e)
- feat: add timeouts to subprocess calls (Day 7) (7097990)
- fix: add missing stderr to test mock (0a692be)
- feat: handle yamllint edge cases gracefully (Day 6) (50d7aa1)
- test: add Day 5 verification for regex parsing colons (30ff916)
- fix: replace fragile string splitting with robust regex for yamllint parsing (fd1e0cf)
- test: add Day 2 tests for ToolAvailability and check_dependencies() (6a42995)
- refactor: replace CHECKOV_AVAILABLE global with ToolAvailability dataclass (3f6f670)
- ci: add App Tests stage with pytest report output before Docker tests and release (4a741da)
- test: add pytest app functionality tests (41 tests across 5 test classes) (b9e5032)
- test: improve Docker integration tests with real exit code and output assertions (2fcec57)
- ci: split pipeline into 7 separate jobs for clear stage visibility (0b38079)
Docker Image: pooyanazad/yaml-checker:v3.1.0-20260701