Validate policy yaml with unittest and pydantic

This commit is contained in:
2026-09-27 17:55:44 +10:00
parent 733d1211b4
commit b944c61e7e
6 changed files with 142 additions and 125 deletions
+6 -5
View File
@@ -24,9 +24,10 @@ repos:
]
- repo: local
hooks:
- id: policy-path-scope
name: policy rule paths stay within their own directory
entry: python3 scripts/check_policy_paths.py
- id: vault-yaml-tests
name: vault yaml definitions pass their unit tests
entry: python3 -m unittest discover -s tests -t .
language: python
additional_dependencies: [pyyaml]
files: ^policies/.*\.yaml$
additional_dependencies: [pyyaml, pydantic]
pass_filenames: false
always_run: true