`difyctl` install docs rely on `curl | sh` for the installer script (no script integrity check)
- AIS008 (HIGH) —
cli/README.md: The primary install instruction pipes the installer fromraw.githubusercontent.comstraight intosh. The script correctly SHA-256-verifies thedifyctlrelease asset, but the installer script is not verified before execution, so a tampered or substituted script runs with full user privileges. The same one-liner pattern is documented incli/scripts/install-cli.shandcli/scripts/install-r2.sh. Fix: Publish versioned installer scripts and checksum manifests on GitHub Releases (alongsidedifyctl), and document download →sha256sum -c→sh install-cli.sh(or a small verified wrapper). Keepcurl | shonly for a stub that verifies and execs the real script.
Found with lacan-scan v7.5.0 and checked by hand.
I would like to work on this. I verified on current main (0e63474) that cli/README.md still pipes install-cli.sh straight into sh, and that the script itself already sha256-verifies the difyctl binary against the release checksums manifest, so the installer script is the one unverified link. I will open a PR that publishes installer-script checksums on Releases, extending the existing manifest pattern, and documents the download, verify, run flow in cli/README.md. Happy to adjust the direction if maintainers prefer a different fix.
Verified against current main (HEAD 0e63474, 2026-11-18). The gap is real and narrow:
- cli/README.md lines 9-10 still show curl -fsSL https://raw.githubusercontent.com/langgenius/dify/main/cli/scripts/install-cli.sh | sh as the primary install, and the same pattern documents install-r2.sh and the PowerShell one-liner.
- The binary itself is already protected: cli/scripts/install-cli.sh lines 209-241 download difyctl-v${version}-checksums.txt from the release and sha256-verifies the asset before installing. The release already publishes that manifest, so the mechanism exists.
- The installer script is the only unverified link: nothing checks install-cli.sh, install-r2.sh or install.ps1 before they run, and the README pins them to main, which is mutable. Proposed fix, keeping the existing pattern: extend .github/workflows/cli-release.yml so the release also publishes sha256 checksums for the three installer scripts, then document download, sha256sum -c, sh in cli/README.md, with curl|sh kept only against a pinned release tag. Two questions for maintainers before I write the PR: is publishing script checksums on Releases acceptable, and should the edge/R2 installer get the same treatment as the release installer? If the answer to the first is no, the fallback is docs-only: pin the README one-liners to a release tag instead of main.