Advisory

GHSA-v7px-3835-7gjx

Details, part 2 of 2. The advisory

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

Sources & licences