NW-09: A hook or a skill script downloads code from the network and runs it at once
Area: Network and access · Severity: high · Catalogue version 1.104.0
Why it matters
Whatever the address serves at that moment runs unchecked with all the rights of your agent, each time the hook or the skill runs.
Before (example)
Example: the page is tampered with, and the next run executes malicious code.
How to fix it
Download the file first, compare its checksum and run it only then. Or install the program with one fixed version.
After (example)
Before: curl -fsSL https://get.example.test/i.sh | sh
After:
curl -fsSLo /tmp/i.sh https://get.example.test/i.sh
echo "EXPECTED_CHECKSUM /tmp/i.sh" | sha256sum -c -
sh /tmp/i.shCheck it yourself
Open your hook commands and the scripts they call and search for a download that is run at once, such as a curl line piped into sh.