T08 · Insecure Dependencies
- Location
scripts/install-tools.sh:22- Finding
Unpinned and Unverified Dependencies Installed with Elevated or Global Privileges
- Content
View full analysis
/dev/null; then sudo apt-get update && sudo apt-get install -y ripgrep elif command -v yum &> /dev/null; then sudo yum install -y ripgrep elif command -v brew &> /dev/null; then brew install ripgrep else echo "⚠️ Cannot automatically install ripgrep. Please install it manually." fi # 安装 tree (用于目录结构) echo "🌳 Installing tree..." if command -v apt-get &> /dev/null; then sudo apt-get install -y tree elif command -v yum &> /dev/null; then sudo yum install -y tree elif command -v brew &> /dev/null; then brew install tree else echo "⚠️ Cannot automatically install tree. Please install it manually." fi ``` The generated Dockerfile also contains unpinned and unverified installation operations: ```dockerfile # Install drawio-desktop RUN npm install -g drawio-desktop # Install ripgrep RUN apt-get update && apt-get install -y wget && \ wget https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb && \ dpkg -i ripgrep_13.0.0_amd64.deb && \ rm ripgrep_13.0.0_amd64.deb ``` ### Technical Analysis The installer retrieves `drawio-desktop` without specifying an exact version or validating package integrity. Consequently, the effective package contents can change after the Skill has been audited. npm packages may execute lifecycle scripts during installation, so a compromised package, registry account, or dependency could execute arbitrary commands under the privileges available to the global npm installation. The script also inst ...[truncated 1886 chars]- Remediation
View remediation
