1+ # Priority tiers (lower = runs first, same priority = concurrent):
2+ # P0 — fast file fixers
3+ # P10 — validators and guards
4+ # P20 — auto-formatters
5+ # P30 — linters
6+ # P40 — security scanners
7+ # P50 — dependency validation
8+
9+ default_install_hook_types : [pre-commit, pre-push]
10+
111repos :
212 # # GENERAL (prek built-in — no external repo needed)
313 - repo : builtin
414 hooks :
515 - id : check-merge-conflict
16+ priority : 10
617 - id : check-yaml
718 args : ["--allow-multiple-documents"]
819 exclude : (prowler/config/llm_config.yaml|contrib/)
20+ priority : 10
921 - id : check-json
22+ priority : 10
1023 - id : end-of-file-fixer
24+ priority : 0
1125 - id : trailing-whitespace
26+ priority : 0
1227 - id : no-commit-to-branch
28+ priority : 10
1329 - id : pretty-format-json
1430 args : ["--autofix", --no-sort-keys, --no-ensure-ascii]
31+ priority : 10
1532
1633 # # TOML
1734 - repo : https://github.com/macisamuele/language-formatters-pre-commit-hooks
@@ -20,20 +37,23 @@ repos:
2037 - id : pretty-format-toml
2138 args : [--autofix]
2239 files : pyproject.toml
40+ priority : 20
2341
2442 # # GITHUB ACTIONS
2543 - repo : https://github.com/zizmorcore/zizmor-pre-commit
2644 rev : v1.24.1
2745 hooks :
2846 - id : zizmor
2947 files : ^\.github/
48+ priority : 30
3049
3150 # # BASH
3251 - repo : https://github.com/koalaman/shellcheck-precommit
3352 rev : v0.11.0
3453 hooks :
3554 - id : shellcheck
3655 exclude : contrib
56+ priority : 30
3757
3858 # # PYTHON — SDK (prowler/, tests/, dashboard/, util/, scripts/)
3959 - repo : https://github.com/myint/autoflake
4868 " --remove-all-unused-imports" ,
4969 " --remove-unused-variable" ,
5070 ]
71+ priority : 20
5172
5273 - repo : https://github.com/pycqa/isort
5374 rev : 8.0.1
@@ -56,13 +77,15 @@ repos:
5677 name : " SDK - isort"
5778 files : { glob: ["{prowler,tests,dashboard,util,scripts}/**/*.py"] }
5879 args : ["--profile", "black"]
80+ priority : 20
5981
6082 - repo : https://github.com/psf/black
6183 rev : 26.3.1
6284 hooks :
6385 - id : black
6486 name : " SDK - black"
6587 files : { glob: ["{prowler,tests,dashboard,util,scripts}/**/*.py"] }
88+ priority : 20
6689
6790 - repo : https://github.com/pycqa/flake8
6891 rev : 7.3.0
7194 name : " SDK - flake8"
7295 files : { glob: ["{prowler,tests,dashboard,util,scripts}/**/*.py"] }
7396 args : ["--ignore=E266,W503,E203,E501,W605"]
97+ priority : 30
7498
7599 # # PYTHON — API + MCP Server (ruff)
76100 - repo : https://github.com/astral-sh/ruff-pre-commit
@@ -80,9 +104,11 @@ repos:
80104 name : " API + MCP - ruff check"
81105 files : { glob: ["{api,mcp_server}/**/*.py"] }
82106 args : ["--fix"]
107+ priority : 30
83108 - id : ruff-format
84109 name : " API + MCP - ruff format"
85110 files : { glob: ["{api,mcp_server}/**/*.py"] }
111+ priority : 20
86112
87113 # # PYTHON — Poetry
88114 - repo : https://github.com/python-poetry/poetry
@@ -93,31 +119,36 @@ repos:
93119 args : ["--directory=./api"]
94120 files : { glob: ["api/{pyproject.toml,poetry.lock}"] }
95121 pass_filenames : false
122+ priority : 50
96123
97124 - id : poetry-lock
98125 name : API - poetry-lock
99126 args : ["--directory=./api"]
100127 files : { glob: ["api/{pyproject.toml,poetry.lock}"] }
101128 pass_filenames : false
129+ priority : 50
102130
103131 - id : poetry-check
104132 name : SDK - poetry-check
105133 args : ["--directory=./"]
106134 files : { glob: ["{pyproject.toml,poetry.lock}"] }
107135 pass_filenames : false
136+ priority : 50
108137
109138 - id : poetry-lock
110139 name : SDK - poetry-lock
111140 args : ["--directory=./"]
112141 files : { glob: ["{pyproject.toml,poetry.lock}"] }
113142 pass_filenames : false
143+ priority : 50
114144
115145 # # CONTAINERS
116146 - repo : https://github.com/hadolint/hadolint
117147 rev : v2.14.0
118148 hooks :
119149 - id : hadolint
120150 args : ["--ignore=DL3013"]
151+ priority : 30
121152
122153 # # LOCAL HOOKS
123154 - repo : local
@@ -128,6 +159,7 @@ repos:
128159 language : system
129160 types : [python]
130161 files : { glob: ["{prowler,tests,dashboard,util,scripts}/**/*.py"] }
162+ priority : 30
131163
132164 - id : trufflehog
133165 name : TruffleHog
@@ -138,6 +170,7 @@ repos:
138170 language : system
139171 pass_filenames : false
140172 stages : ["pre-commit", "pre-push"]
173+ priority : 40
141174
142175 - id : bandit
143176 name : bandit
@@ -148,6 +181,7 @@ repos:
148181 files : ' .*\.py'
149182 exclude :
150183 { glob: ["{contrib,skills}/**", "**/.venv/**", "**/*_test.py"] }
184+ priority : 40
151185
152186 - id : safety
153187 name : safety
@@ -166,6 +200,7 @@ repos:
166200 " .safety-policy.yml" ,
167201 ],
168202 }
203+ priority : 40
169204
170205 - id : vulture
171206 name : vulture
@@ -174,3 +209,4 @@ repos:
174209 language : system
175210 types : [python]
176211 files : ' .*\.py'
212+ priority : 40
0 commit comments