Skip to content

M1: Verify SHA-256 checksums and pin source commits in scripts/install_deps.sh #100

Backlog

Description

@h45sh

Context

scripts/install_deps.sh:194-288 downloads subfinder (v${SUBFINDER_VERSION}) and nuclei (v${NUCLEI_VERSION}) release .zip archives via download_file (curl -fsSL / wget -q) and extracts them directly into /usr/local/bin or ~/.local/bin without verifying SHA-256 checksums.

In addition, install_nikto_source (scripts/install_deps.sh:259,262) and install_searchsploit_source (scripts/install_deps.sh:280,283) clone https://github.com/sullo/nikto.git and https://gitlab.com/exploit-database/exploitdb.git with git clone --depth 1 from unpinned branch HEAD. By contrast, Dockerfile:34,38 pins both nikto and exploitdb to full git commit SHAs.

Proof

Inspected scripts/install_deps.sh:194-288 at origin/dev@0c0e3c1:

nl -ba /tmp/ether-audit-A/scripts/install_deps.sh | sed -n '194,288p' | grep -nE 'download_file|unzip|git clone|sha256sum|shasum'

Observed output:

10:   203	    if download_file "$url" "$tmp_dir/subfinder.zip"; then
11:   204	        if command -v unzip >/dev/null 2>&1; then
12:   205	            unzip -q "$tmp_dir/subfinder.zip" -d "$tmp_dir"
22:   215	            log_warn "unzip is required to extract subfinder."
37:   230	    if download_file "$url" "$tmp_dir/nuclei.zip"; then
38:   231	        if command -v unzip >/dev/null 2>&1; then
39:   232	            unzip -q "$tmp_dir/nuclei.zip" -d "$tmp_dir"
49:   242	            log_warn "unzip is required to extract nuclei."
66:   259	            git clone --depth 1 https://github.com/sullo/nikto.git "$target_dir" 2>/dev/null || true
69:   262	            $SUDO git clone --depth 1 https://github.com/sullo/nikto.git "$target_dir" 2>/dev/null || true
87:   280	            git clone --depth 1 https://gitlab.com/exploit-database/exploitdb.git "$target_dir" 2>/dev/null || true
90:   283	            $SUDO git clone --depth 1 https://gitlab.com/exploit-database/exploitdb.git "$target_dir" 2>/dev/null || true

Impact

Affects operators and contributors running scripts/install_deps.sh (including --user installs) to provision host security tools: compromised or MITM'd release archives or upstream branch mutations are installed without integrity verification. Does not bypass GatePolicy.SAFE runtime enforcement directly.

Acceptance criteria

  • Verify SHA-256 checksums (sha256sum / shasum -a 256) for subfinder and nuclei release archives in scripts/install_deps.sh before extraction, aborting on mismatch
  • Pin nikto and exploitdb clones in scripts/install_deps.sh to explicit full git commit SHAs (matching Dockerfile)
  • Add a packaging/lint check verifying scripts/install_deps.sh does not extract unverified archives or clone unpinned HEAD

Out of scope

Modifying Dockerfile checksums (tracked in #79) or changing tool versions.

Part of #24

Related to #79


audit:self · run 2026-12-02 · ref origin/dev@0c0e3c1 · cell signal×supply

Activity

  1. added this to the M1 Truth milestone on Dec 2, 2026
  2. added
    type:task
    area:packaging
    priority:P2
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:packagingpriority:P2type:task

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions