T03 · Remote Payload Retrieval and Execution
- Location
assets/Dockerfile.txt:3- Finding
Unverified Remote Installer Scripts Execute with Root Privileges
- Content
View full analysis
/dev/null \ && cp /root/.opencode/bin/opencode /usr/local/bin/opencode || true ``` ### Technical Analysis The Docker build downloads installer scripts from three external URLs and immediately pipes their contents into `bash` or `sh`. These commands execute after `USER root`, giving each remotely supplied script unrestricted control over the image filesystem during the build. The downloaded content is not pinned to an immutable version and is not checked using a cryptographic digest or signature. HTTPS provides transport protection but does not establish that the retrieved script is the same content that was reviewed. A compromised upstream service, publishing account, CDN, DNS route, or future installer modification could therefore change the effective payload without any change to this project. The installers may require installation access, but executing mutable scripts as root exceeds the minimum privilege necessary. The required binaries could instead be obtained from versioned release artifacts and verified before installation. The OpenCode command als ...[truncated 1405 chars]- Remediation
View remediation
