T03 · Remote Payload Retrieval and Execution
Error
- Location
- README.md:77
- Finding
- Mutable Remote Installation Scripts Are Downloaded and Executed Without Verification<![CDATA[ ## Vulnerability Details **File Locations**: - `README.md:77-81` - `README-CN.md:79-83` - `references/examples.md:13-17` - `SKILL.md:12` directs the Agent to follow the installation instructions in `references/examples.md` **Vulnerability Type**: Unverified remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.sh | bash ``` ```powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.ps1" -OutFile "$env:TEMP\adp-init.ps1"; & "$env:TEMP\adp-init.ps1" ``` ### Technical Analysis The Unix installation command downloads a shell script from an external URL and pipes it directly into `bash`. The Windows command downloads a PowerShell script into a temporary directory and immediately executes it. Neither method verifies a cryptographic checksum, digital signature, release provenance, or expected script contents before execution. Both URLs reference the mutable `main` branch of an external GitHub repository. Consequently, the code that is executed can change after this Skill package has been reviewed. The externally hosted scripts are not included in the audited artifact, so their current or future behavior cannot be established from the project contents. This behavior is not necessary to provide document parsing and extraction. At most, the Skill needs a known, authenticated CLI artifact. Executing mutable remote scripts grants substantially broader capability than retrieving and validating a fixed release. The PowerShell variant avoids a direct network-to-interpreter pipe but does not materially mitigate the risk: the downloaded file is still executed immediately without validation. ### Attack Path 1. An attacker compromises the external repository, a maintainer account, or another part of the remote delivery chain. 2. The attacker modifies `scripts/adp-init.sh` or `scripts/adp-ini ...[truncated 1328 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all direct pipe-to-shell installation commands and immediate execution of unverified temporary scripts. 2. Publish versioned release artifacts and reference an immutable release version or commit rather than the mutable `main` branch. 3. Provide a documented download-and-verify workflow, for example: - Download the installer without executing it. - Verify a publisher-provided SHA-256 digest or cryptographic signature. - Display or make the script available for inspection. - Execute it only after explicit user approval. 4. Store checksums in a separately authenticated release channel. A checksum downloaded from the same mutable location does not provide meaningful protection against repository compromise. 5. Prefer a minimal, audited installer bundled with the Skill if automatic installation is essential. 6. Require explicit user confirmation before installing software or executing any downloaded code. 7. Apply the remediation consistently to `README.md`, `README-CN.md`, and `references/examples.md`. 8. Update `SKILL.md` so that an Agent must not automatically execute installation commands merely because the CLI is absent. ]]>
