T08 · Insecure Dependencies
Warning
- Location
- scripts/setup.sh:16
- Finding
- Unpinned Remote Dependency Is Downloaded and Executed with Persistent Capabilities<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup.sh:16` (with subsequent execution at lines 29 and 85-87) **Vulnerability Type**: Unpinned third-party dependency and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```bash # Install feelgoodbot echo "📦 Installing feelgoodbot..." go install github.com/kris-hansen/feelgoodbot/cmd/feelgoodbot@latest ``` The downloaded executable is subsequently run and installed as a daemon: ```bash # Initialize if no baseline exists if [ ! -f ~/.config/feelgoodbot/snapshots/baseline.json ]; then echo "📸 Creating initial baseline..." feelgoodbot init else echo "✓ Baseline already exists" fi ``` ```bash # Install and start daemon echo "🚀 Installing daemon..." feelgoodbot daemon install 2>/dev/null || true feelgoodbot daemon stop 2>/dev/null || true feelgoodbot daemon start ``` ### Technical Analysis The setup script downloads the `feelgoodbot` package using the mutable `@latest` reference. This does not pin the installation to a reviewed version or immutable commit and does not verify a checksum or cryptographic signature. Consequently, the effective code executed by the Skill can change after the Skill itself has been reviewed. A compromised upstream repository, maintainer account, release process, Go module dependency, or future malicious release could cause arbitrary code to be installed. The exposure is amplified because the downloaded executable is immediately invoked to initialize a filesystem baseline and install a persistent daemon. The documented monitoring scope includes security-sensitive locations such as launch services, shell configuration, `authorized_keys`, sudoers, and PAM configuration. Although the audited files do not directly modify SSH keys or request elevated privileges, a compromised downloaded executable would run with all permissions held by the invoking user. Installing a daemon is consistent with continuous file-integrity monitoring and is dis ...[truncated 1707 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with a reviewed, immutable version or commit: ```bash go install github.com/kris-hansen/feelgoodbot/cmd/feelgoodbot@vX.Y.Z ``` 2. Maintain and review `go.sum` data for a reproducible build rather than resolving dependencies dynamically during setup. 3. Verify release checksums or cryptographic signatures before executing the binary. 4. Prefer distributing a reproducibly built, signed artifact from a trusted release process. 5. Audit transitive Go dependencies and automate vulnerability scanning. 6. Separate installation from execution so the user can inspect the resolved version before initialization. 7. Display the exact version and source to the user and require explicit confirmation before installing the daemon. 8. Run the daemon with the least-privileged account and narrowly scoped filesystem permissions required for monitoring. 9. Document how to stop and uninstall the daemon and remove all generated configuration. ]]>
