T08 · Insecure Dependencies
Warning
- Location
- references/setup.md:10
- Finding
- Mutable Development Container Image Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `references/setup.md`, lines 7–21; vulnerable image declaration at line 10 **Vulnerability Type**: Unpinned mutable third-party container image **Risk Level**: Medium ### Vulnerable Code ```yaml version: "3" services: readarr: image: lscr.io/linuxserver/readarr:develop container_name: readarr environment: - PUID=1026 - PGID=101 - TZ=Europe/Lisbon volumes: - /volume1/docker/readarr:/config - /volume1/Books:/books - /volume1/Downloads:/downloads ports: - 8787:8787 restart: unless-stopped ``` ### Technical Analysis The deployment uses the mutable `develop` tag without pinning the image to a reviewed version or immutable SHA-256 digest. The content associated with this tag can change after the Skill has been audited. Development tags also commonly receive less stable and less thoroughly reviewed updates than fixed release versions. Consequently, a future image pull may execute container code that differs from the code originally reviewed. This creates a supply-chain trust dependency on the image registry, publisher account, and all future updates assigned to the tag. The container receives persistent access to three host-backed volumes: - `/volume1/docker/readarr`, mounted as `/config` - `/volume1/Books`, mounted as `/books` - `/volume1/Downloads`, mounted as `/downloads` It also listens on host port 8787 and is configured to restart unless explicitly stopped. The Compose configuration does not mount the Docker socket or grant privileged mode, so direct host-root compromise is not established by the reviewed configuration. Nevertheless, a malicious image could access or alter the mounted data under the configured UID/GID permissions. ### Attack Path 1. An attacker compromises the image publisher, registry account, build pipeline, or mutable `develop` tag. 2. The attacker publishes a modified image under `lscr.io/linuxserver/readarr:deve ...[truncated 1110 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the `develop` tag with a reviewed stable release and pin it to an immutable digest: ```yaml image: lscr.io/linuxserver/readarr:<reviewed-version>@sha256:<verified-digest> ``` 2. Verify the digest against the publisher's authenticated release metadata before deployment. 3. Test new versions in an isolated environment before changing the pinned digest. 4. Use an update process that reviews image provenance, release notes, vulnerability scan results, and software bills of materials. 5. Consider enabling signature verification through an appropriate container-image policy mechanism. 6. Restrict the container's filesystem and runtime capabilities where compatible: - Mount data read-only where writes are unnecessary. - Drop unneeded Linux capabilities. - Apply `no-new-privileges`. - Restrict outbound network access. 7. Back up the mounted configuration and library data independently so that a compromised update cannot destroy the only available copy. ]]>
