Details
At hooks.json load time, validate the first token of every hook command against
an allowlist of permitted executables. Reject any entry whose executable is not
in the allowlist before any subprocess call is made.
References
CWE-78: Improper Neutralization of Special Elements used in an OS Command
Python subprocess security documentation