T08 · Insecure Dependencies
- Location
scripts/install_whisper_cpp.sh:13- Finding
Unpinned Upstream Source Is Built and Installed
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install_whisper_cpp.sh, lines 13–20
Vulnerability Type: Unpinned executable dependency
Risk Level: MediumVulnerable Code:
bash if [ ! -d "$REPO/.git" ]; then git clone https://github.com/ggerganov/whisper.cpp "$REPO" else git -C "$REPO" pull --ff-only fi cmake -S "$REPO" -B "$BUILD" -DCMAKE_BUILD_TYPE=Release cmake --build "$BUILD" -j"$(nproc)"Technical Analysis
The installer clones or updates the default branch of the upstream
whisper.cpprepository and immediately compiles it. It does not select an immutable commit, verify a signed release, or confirm that the checked-out revision matches an expected hash.As a result, the effective source code and build logic can change after this Skill has been reviewed. The use of HTTPS protects the network connection but does not establish that the current upstream repository contents are the specific contents previously audited.
Build systems can execute repository-controlled CMake logic during configuration and compilation. Therefore, compromise of the upstream repository, maintainer account, or default branch could result in attacker-controlled commands running during installation. The resulting binary and libraries are subsequently copied into
~/.local/binand~/.local/lib.Attack Path
- An attacker compromises the upstream repository, a maintainer account, or the mutable default branch.
- The attacker adds malicious source code or CMake build logic.
- A user follows the documented installation procedure and runs
scripts/install_whisper_cpp.sh. - The script clones or pulls the compromised revision without validating an immutable expected commit.
- CMake processes the attacker-controlled project and the build runs with the privileges of the installing user.
- The script installs the resulting
whisper-clibinary and shared libraries under the user's~/.localdir ...[truncated 712 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
whisper.cppto a reviewed, immutable commit hash rather than building the current default branch. - Clone without immediately trusting the checked-out branch, fetch the expected revision explicitly, and check it out in detached-HEAD mode.
- Verify that
git rev-parse HEADexactly matches the configured commit before invoking CMake. - Prefer a cryptographically signed upstream release where available, and verify the release tag or artifact signature against a trusted maintainer key.
- Record the approved version and hash in the repository so dependency updates require an explicit review.
- Perform builds in a restricted environment with minimal credentials, filesystem access, and network access to reduce the impact of malicious build logic.
- Review upstream changes before updating the pinned revision.
- Pin
