T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:52- Finding
Unpinned Remote Installer Scripts Are Executed Directly
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 52-57
Vulnerability Type: Remote payload retrieval and execution without integrity verification
Risk Level: HighVulnerable Code
bash # macOS / Linux - REVIEW SCRIPT BEFORE RUNNING curl -fsSL https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.sh | sh # Windows (PowerShell) - REVIEW SCRIPT BEFORE RUNNING irm https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/main/scripts/install.ps1 | iexTechnical Analysis
The installation instructions download scripts from the mutable
mainbranch of an external GitHub repository and immediately execute them usingshor PowerShellInvoke-Expression. No version, commit, cryptographic digest, or signature is pinned or verified.Although the comments tell users to review the scripts, piping the downloaded response directly into an interpreter does not provide a meaningful review step. The content executed can differ from content reviewed earlier because the
mainbranch is mutable.Installation of the external
dwsbinary is necessary for the declared DingTalk integration, but direct execution of mutable remote source is not the minimum privilege or minimum-risk mechanism required. The same document already offers safer alternatives, including downloading a release artifact or building from source.This finding does not establish that the current upstream installer is malicious. The vulnerability is that control of the effective payload remains with an external, changeable source after this skill has been reviewed.
Attack Path
- An attacker compromises the upstream GitHub organization, repository, maintainer account, release workflow, or another mechanism capable of modifying the installer on the
mainbranch. - The attacker replaces
install.shorinstall.ps1with a malicious payload. - A user or agent follows the d ...[truncated 1270 chars]
- An attacker compromises the upstream GitHub organization, repository, maintainer account, release workflow, or another mechanism capable of modifying the installer on the
- Remediation
View remediation
Remediation Suggestions
-
Remove all
curl | shandirm | iexinstallation instructions. -
Pin installation artifacts to a specific immutable release version or commit rather than the
mainbranch. -
Publish expected SHA-256 checksums through a separately protected release channel and require verification before execution.
-
Prefer signed release artifacts and verify the publisher signature or provenance before installation.
-
Separate download, inspection, verification, and execution into explicit commands. For example:
bash version="vX.Y.Z" curl -fL -o install.sh \ "https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-workspace-cli/${version}/scripts/install.sh" printf '%s %s\n' 'EXPECTED_SHA256' install.sh | sha256sum --check - less install.sh sh install.sh -
Provide an equivalent Windows workflow using
Invoke-WebRequest -OutFile,Get-FileHash, signature validation, local inspection, and only then explicit execution. -
Recommend running installation as an unprivileged user and prohibit
sudo, administrator shells, or elevation unless a documented operation strictly requires it. -
Keep credentials unset during installation so a compromised installer cannot inherit
DWS_CLIENT_ID,DWS_CLIENT_SECRET, or active tokens. -
Prefer verified package-manager distribution or reproducible builds from a pinned source revision.
-
