T08 · Insecure Dependencies
- Location
scripts/install.sh:16- Finding
Unpinned Remote Dependencies Make Builds Non-Reproducible and Expose the Image to Supply-Chain Compromise
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install.sh, lines 16-23
Vulnerability Type: Unpinned third-party image, Python package, and model dependencies
Risk Level: MediumVulnerable Code
dockerfile FROM python:3.11-slim WORKDIR /app RUN pip install --no-cache-dir faster-whisper # Pre-download the model (small for speed, change to large-v3 for accuracy) RUN python3 -c "from faster_whisper import WhisperModel; WhisperModel('small', device='cpu', compute_type='int8')"Technical Analysis
The Docker base image is referenced through the mutable
python:3.11-slimtag rather than an immutable digest. The installation offaster-whisperalso omits an exact version and cryptographic hashes. Finally, the Whisper model is selected only by the mutable namesmall, without pinning or verifying a specific model revision.As a result, identical executions of the installer can retrieve materially different content. The Docker build executes installation and model-loading code obtained from external package, container, and model infrastructure. Compromise of an upstream account, registry, package release, transitive dependency, or model source could therefore alter the generated image after this Skill has been reviewed.
Attack Path
- An attacker compromises an upstream container tag, Python package, transitive dependency, package publisher, or model distribution source.
- The attacker publishes modified content under an identifier used by the installer, such as
python:3.11-slim, the latest availablefaster-whisperrelease, or thesmallmodel. - A user executes
scripts/install.sh. docker buildretrieves the mutable base image andpipretrieves the unpinned package and dependencies.- The subsequent Python build step imports
faster_whisperand initializes the model, executing compromised package code during image construction. - The resulting
whisper:localimage re ...[truncated 732 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the base image to an audited immutable digest:
dockerfile FROM python:3.11-slim@sha256:REVIEWED_DIGEST -
Pin
faster-whisperand every relevant transitive dependency to reviewed versions. -
Use a lock file or requirements file containing cryptographic hashes, and install with hash enforcement:
dockerfile COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir --require-hashes -r /app/requirements.txt -
Pin the model to an immutable repository revision or commit and verify expected artifact checksums before loading it.
-
Build in a restricted environment without sensitive credentials, host mounts, or unnecessary network access.
-
Generate and review a software bill of materials, scan the resulting image, and periodically update pins through a controlled review process.
-
