T08 · Insecure Dependencies
- Location
SKILL.md:191- Finding
Unverified Third-Party Executable Download and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 191–215 and 232–238
Vulnerability Type: Unverified third-party dependency installation
Risk Level: MediumThe installation instructions dynamically identify the latest
signal-clirelease, download executable archives from GitHub, extract them into a user-controlled executable path, and run the installed program without verifying a cryptographic signature or expected checksum.Vulnerable code:
bash VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/AsamK/signal-cli/releases/latest | sed -e 's/^.*\/v//') curl -L -O "https://github.com/AsamK/signal-cli/releases/download/v${VERSION}/signal-cli-${VERSION}-Linux-native.tar.gz" mkdir -p ~/.local/bin tar -C ~/.local/bin -xzf "signal-cli-${VERSION}-Linux-native.tar.gz" signal-cli chmod +x ~/.local/bin/signal-cli echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc source ~/.bashrc signal-cli --versionbash VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/AsamK/signal-cli/releases/latest | sed -e 's/^.*\/v//') curl -L -O "https://github.com/AsamK/signal-cli/releases/download/v${VERSION}/signal-cli-${VERSION}.tar.gz" mkdir -p ~/.local/bin/signal-cli tar -C ~/.local/bin/signal-cli -xzf "signal-cli-${VERSION}.tar.gz" cat > ~/.local/bin/signal-cli <<'EOF' #!/usr/bin/env bash exec java -jar "$HOME/.local/bin/signal-cli/lib/signal-cli-$VERSION.jar" "$@" EOF chmod +x ~/.local/bin/signal-cli echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc source ~/.bashrc signal-cli --versionbash VERSION=$(signal-cli --version | head -1 | sed 's/^signal-cli //' | cut -d+ -f1) curl -Ls -o /tmp/signal-cli.tar.gz "https://github.com/AsamK/signal-cli/releases/download/v${VERSION}/signal-cli-${VERSION}.tar.gz" mkdir -p ~/.local/share/man/man1 ~/.local/share/man/man5 tar -C ~/.local/share/man -xzf ...[truncated 3451 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
VERSIONto a specifically reviewedsignal-clirelease instead of resolving the mutablelatestredirect. - Provide a trusted SHA-256 digest for each supported archive and verify it before extraction:
bash echo 'EXPECTED_SHA256 signal-cli-VERSION-Linux-native.tar.gz' | sha256sum --check - - Prefer cryptographic release-signature verification where upstream signatures and a securely distributed signing key are available.
- Use fail-safe download options so HTTP failures do not produce files that are subsequently processed:
bash curl --fail --show-error --location --output "$archive" "$url" - Download into a private temporary directory created with
mktemp -d, set a restrictiveumask, and remove the directory after installation. - Verify the archive before extracting or changing permissions. Inspect the archive member list and continue extracting only explicitly expected paths.
- Avoid automatically sourcing shell startup files. Instruct users to start a new shell or update
PATHmanually, and make any profile modification idempotent. - Correct the JVM installation layout so the installation directory and launcher file have distinct paths. Embed the validated version into the launcher at installation time or use a stable launcher target.
- Prefer a trusted operating-system package manager when an appropriately maintained package is available, while still documenting the package provenance and update policy.
- Pin
