Awesome Reviewers

Reviewer · Security

Verify downloaded script integrity

Never pipe remotely-fetched installers or scripts directly into a shell for execution (e.g. `curl -LsSf https://example.com/install.sh | sh`), especially in environments that hold secrets such as API keys, tokens, or Vault credentials. Version pinning alone (e.g. a URL that embeds a version number) is not sufficient, since the remote content could still...

Instruction

Never pipe remotely-fetched installers or scripts directly into a shell for execution (e.g. curl -LsSf https://example.com/install.sh | sh), especially in environments that hold secrets such as API keys, tokens, or Vault credentials. Version pinning alone (e.g. a URL that embeds a version number) is not sufficient, since the remote content could still change or be compromised without warning. Instead, download a specific, pinned release artifact and verify its integrity (sha256 checksum or signature) against known-good values checked into the repo before unpacking or executing it. If the tool is widely used, prefer having it pre-installed on the build/agent image instead of fetching it at runtime. Example fix:

# Avoid:
curl -LsSf "https://astral.sh/uv/${VERSION}/install.sh" | sh

# Prefer: download pinned tarball and verify its checksum before use
curl -LsSf -o uv.tar.gz "https://github.com/astral-sh/uv/releases/download/${VERSION}/uv-x86_64-unknown-linux-gnu.tar.gz"
echo "${EXPECTED_SHA256}  uv.tar.gz" | sha256sum -c -
tar -xzf uv.tar.gz

When introducing new tooling or scripts that fetch and run external code in CI, flag this explicitly in review and confirm with the platform/operations team whether running unverified remote code is acceptable for that environment.