IntegrationsPre-commit Hook
Pre-commit Hook
Catch infrastructure issues before they leave your machine.
Pre-commit Hook
The Valqore pre-commit hook evaluates Kubernetes and IaC manifests locally before you commit.
Setup
# .pre-commit-config.yaml
repos:
- repo: https://github.com/valqore/valqore-engine
rev: v1.0.0
hooks:
- id: valqore
name: Valqore
args: ["--fail-on", "block", "--score"]
types_or: [yaml, json, hcl, tf]pre-commit installOptions
| Flag | Default | Description |
|---|---|---|
--fail-on | block | Verdict level that fails the hook: block, warn, or info. |
--score | off | Print overall Valqore score. |
--fix | off | Auto-apply fixes and stage the changes. |
Example Output
$ git commit -m "deploy api-gateway"
Valqore.................................................................Failed
- hook id: valqore
- exit code: 1
╭──────────────────────────────────────────────╮
│ BLOCK — 3 findings in 2 files │
╰──────────────────────────────────────────────╯
Score: 54 / 100
k8s/api-gateway/deployment.yaml
✗ [critical] Container runs as root
✗ [high] No resource limits defined
k8s/api-gateway/service.yaml
✗ [high] No network policy for namespace "api"
Run with --fix to auto-resolve fixable issues.Tips
- Use
--fail-on warnduring early development, switch to--fail-on blockonce stable. - Combine with CI integration for defence in depth.
- Run
pre-commit run valqore --all-filesto evaluate the entire repository.
Was this helpful?
Prev