T08 · Insecure Dependencies
- Location
SKILL.md:91- Finding
Unpinned Container Image Executed with Writable Host Access
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:91
Vulnerability Type: Supply-chain risk from a mutable container image with writable mounts
Risk Level: Mediumbash docker run --rm -v models-vol:/models -v /host/path:/src alpine cp /src/model.gguf /models/Technical Analysis
The documented command executes the mutable, registry-unqualified
alpineimage without pinning it to a verified digest. Consequently, the code executed depends on whichever local or remote image thealpinetag resolves to at runtime rather than the artifact reviewed when this skill was audited.The container is also granted writable access to both
/host/pathand the persistentmodels-volvolume because neither mount is marked read-only. A malicious or compromised image could therefore read, alter, or delete accessible files in the mounted host directory and could replace the model stored in the persistent volume.This creates a supply-chain boundary in which registry compromise, mutable-tag replacement, or local image-name spoofing could convert a documented file-copy operation into attacker-controlled container execution.
Attack Path
- An attacker causes the
alpinetag to resolve to a malicious image, such as through registry compromise, tag replacement, or placement of a spoofed local image. - An operator follows the documented command without verifying the image digest or provenance.
- Docker starts the attacker-controlled image and mounts
/host/pathandmodels-volwith write access. - The malicious image reads or modifies files under the mounted host path.
- It replaces or corrupts
model.ggufor other content in the persistent model volume. - A subsequent inference container loads the altered model or related artifacts, causing service disruption or use of attacker-modified data.
Impact Assessment
The attacker obtains the privileges available to the container over the two mounted resour ...[truncated 575 chars]
- An attacker causes the
- Remediation
View remediation
Remediation Suggestions
- Use a fully qualified image reference pinned to a vendor-verified immutable digest:
bash docker run --rm \ --network none \ --cap-drop ALL \ --security-opt no-new-privileges \ -v models-vol:/models \ -v /host/path:/src:ro \ docker.io/library/alpine@sha256:VERIFIED_DIGEST \ cp /src/model.gguf /models/ - Verify the image digest and provenance through a trusted registry or signed-image policy before documenting or executing it.
- Mark the source host mount read-only with
:ro. - Mount only the narrowest required source directory and ensure it contains no credentials or unrelated sensitive files.
- Disable networking and remove Linux capabilities because the copy operation does not require them.
- Verify the copied model against an expected cryptographic checksum before deploying it to an inference service.
- Where practical, replace the helper container with a trusted host-side or Docker volume-management workflow that does not execute a third-party image with host mounts.
- Use a fully qualified image reference pinned to a vendor-verified immutable digest:
