T08 · Insecure Dependencies
- Location
scripts/install.sh:35- Finding
Unpinned Go Dependency Allows Unreviewed Upstream Code Installation
- Content
View full analysis
/dev/null; then echo "Error: Go is not installed." >&2 echo "Install Go from https://go.dev/dl/" >&2 exit 1 fi echo "Go version: $(go version | grep -oE 'go[0-9]+\.[0-9]+')" echo "" # Install aperture. echo "Installing aperture..." go install "github.com/lightninglabs/aperture/cmd/aperture${VERSION}" ``` ### Technical Analysis When no version is supplied, the installation script uses the mutable `@latest` selector. Consequently, the code installed by the Skill can change after the Skill itself has been reviewed. The script does not pin an audited Aperture release or independently verify the selected source revision or resulting binary. The repository path is consistent with the declared Aperture project, and no evidence indicates that it is currently malicious. Nevertheless, relying on a mutable upstream version creates a supply-chain trust boundary. Compromise of the upstream repository, release process, a dependency, or relevant module-distribution infrastructure could cause users to install an altered binary. The installed Aperture binary is later run with access to the configuration paths for an LND TLS certificate and invoice macaroon. These resources are necessary for the declared L402 functionality, but they increase the consequences of executing an unreviewed version. ### Attack Path 1. An attacker compromises the upstream Aperture repository, its release process, or one of the dependencies selected by the latest release. 2. The attacker publishes a newer version that contains malicious behavior. 3. A user runs `scripts/install.sh` without specifying `--version ...[truncated 1019 chars]- Remediation
View remediation
