T08 · Insecure Dependencies
- Location
SKILL.md:36- Finding
Unpinned Git Repository Used for Source Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 36
Vulnerability Type: Unpinned source dependency
Risk Level: MediumVulnerable Code
sh cargo install --git https://github.com/Yuxin-Qiao/FreeFM --locked --root "$HOME/.local"Technical Analysis
The installation command retrieves, compiles, and installs FreeFM directly from a personal GitHub repository without specifying an immutable commit through Cargo's
--revoption. The--lockedflag constrains dependency resolution using the repository's lockfile, but it does not pin the repository's own source revision.Consequently, the command executed by a user at a later date may build different source code than the version reviewed during this audit. Cargo compilation can also execute package build scripts, so compromise or malicious modification of the upstream repository could result in code execution during installation—not merely when the resulting application is subsequently launched.
The separate helper download documented at
SKILL.md:88-102does not have this defect: it references an immutable commit, downloads to a temporary file, verifies a fixed SHA-256 digest before installation, and does not pipe network content directly into a shell.Attack Path
- An attacker compromises the upstream GitHub account or gains permission to modify the FreeFM repository.
- The attacker changes the repository's default branch, adding malicious Rust code or a Cargo build script.
- A user follows the documented installation command after granting the requested approval.
- Cargo retrieves the current, attacker-controlled default-branch source because no commit is pinned.
- Malicious build logic executes during compilation, or the installed
freefmbinary executes it during authentication or synchronization. - The payload operates with the privileges of the user who invoked Cargo and may access files and credentials available to that acco ...[truncated 679 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the installation to a reviewed immutable Git commit:
sh cargo install \ --git https://github.com/Yuxin-Qiao/FreeFM \ --rev c7bcf10dce142fd85c84f82173a307e91ea99adc \ --locked \ --root "$HOME/.local" -
Audit the selected revision, including
Cargo.toml,Cargo.lock, build scripts, procedural macros, and transitive dependencies, before publishing the instruction. -
Update the pinned revision only through a documented review process.
-
Prefer signed release artifacts from a controlled release channel and verify signatures or cryptographic checksums before execution.
-
Preserve the existing requirement for explicit user approval before installation.
-
Where practical, perform compilation in an isolated environment with restricted filesystem and credential access.
-
