Expand description
Candidate-rejection validators ported from
guard_core/handlers/_suspatterns_shell_validators.py (spec 4.0.2).
A validator receives a candidate match plus the detection context and decides whether the match is a true injection; returning false rejects the candidate and lets the scan continue with later matches.
Constants§
Functions§
- brace_
expansion_ is_ dangerous_ command _brace_expansion_is_dangerous_command: any comma-separated item is a word-shaped token containing a letter.- dollar_
substitution_ pair_ is_ injection _dollar_substitution_pair_is_injection.- glob_
wildcard_ token_ is_ dangerous_ command _glob_wildcard_token_is_dangerous_command.- glued_
backtick_ pair_ is_ injection _glued_backtick_pair_is_injection.- quote_
splice_ token_ is_ dangerous_ command _quote_splice_token_is_dangerous_command: >= 3 consecutive 1-char fragments when splitting the token on quote runs.