require-valid-repository-hook-timeouts
Require repository hook timeoutSec values to be positive integers when present.
Rule catalog ID: R064
Targeted pattern scopeâ
.github/hooks/**/*.json
What this rule reportsâ
- zero, negative, fractional, or non-numeric
timeoutSecvalues
Why this rule existsâ
Hook timeouts are numeric execution budgets. Requiring a positive integer keeps the hook configuration aligned with the documented schema and avoids values that are ambiguous or unusable at runtime.
â Incorrectâ
{
"version": 1,
"hooks": {
"sessionStart": [{ "type": "command", "bash": "echo ready", "timeoutSec": 0 }]
}
}
â Correctâ
{
"version": 1,
"hooks": {
"sessionStart": [{ "type": "command", "bash": "echo ready", "timeoutSec": 10 }]
}
}