Pre-installation security verification for external code and dependencies.
Always verify before you download. External code (GitHub repos, npm packages, PyPI libraries, scripts) can contain malicious code, vulnerabilities, or supply chain attacks. This skill automates security checks before executing potentially dangerous commands.
Automatically trigger security check before:
git clone <url> — GitHub/GitLab repositoriespip install <package> — Python packagesnpm install <package> — Node packagescurl <url> | bash — Shell scriptsIdentify what's being installed:
Based on source type, collect:
For GitHub repos:
security labels)For PyPI packages:
For npm packages:
Use threshold-based scoring (inspired by Skantek):
Risk Score = 0
# Positive signals (reduce risk):
- High stars/downloads: -10
- Recent activity (< 30 days): -5
- Well-known maintainer: -5
- Clear license: -3
- Few dependencies: -5
# Negative signals (increase risk):
- No activity (> 1 year): +15
- No license: +10
- Many dependencies: +5 per 10 deps
- Known CVEs: +20 per CVE
- Suspicious patterns: +25
Risk Levels:
Score < 0 → ✅ Safe (proceed automatically)0 <= Score < 15 → ⚠️ Review (show summary, ask confirmation)Score >= 15 → ❌ Dangerous (strong warning, manual approval required)Present findings:
🔒 Security Check: <package/repo>
Risk Level: ⚠️ REVIEW
Metrics:
✅ Stars: 15.2k | Forks: 3.1k
⚠️ Last commit: 8 months ago
✅ License: MIT
⚠️ Open security issues: 2
✅ Dependencies: 5
Known Issues:
- CVE-2024-12345 (Medium severity, patched in v1.2.3)
Recommendation: Update to v1.2.3+ before installing.
Proceed? [Y/n]
Based on risk level:
# Before: git clone https://github.com/user/repo
# After:
1. Detect: GitHub repo
2. Fetch metrics via GitHub API
3. Calculate risk score
4. Show summary
5. Ask confirmation if needed
6. Proceed or abort
curl -s "https://api.github.com/repos/{owner}/{repo}"7w4.net小葱技能站,你的AI助手技能库。
Returns: stars, forks, updated_at, open_issues_count, license
curl -s "https://pypi.org/pypi/{package}/json"
Returns: downloads, releases, maintainers
curl -s "https://registry.npmjs.org/{package}"
Returns: downloads (via npm-stat), dependencies, license
Based on Adyen's Skantek and GitHub's Dependabot:
User: pip install requests
Security Check:
✅ SAFE: requests (PyPI)
- Downloads: 50M/month
- Last release: 2 weeks ago
- License: Apache 2.0
- Dependencies: 5
- Known CVEs: 0
Proceeding with installation...
User: git clone https://github.com/suspicious/tool
Security Check:
❌ DANGEROUS: suspicious/tool
- Stars: 12
- Last commit: 3 years ago
- Open issues: 45 (3 security labels)
- No license
- Risk score: 35
⚠️ This repository shows multiple red flags.
Consider alternatives or manual code review.
Proceed anyway? [y/N]
User: npm install left-pad
Security Check:
⚠️ REVIEW: left-pad@1.0.0
- Downloads: 2M/week
- CVE-2024-xxxxx: Prototype pollution (High)
- Fixed in: v1.0.1
Recommendation: Install v1.0.1 instead.
Use latest version? [Y/n]
When skill matures:
For detailed implementation guidance:
references/skantek-approach.md — Adyen's methodologyreferences/vulnerability-databases.md — How to query CVE databases这个安全检查工具的整体质量中等偏上。它能帮助用户在安装外部代码前识别风险,功能概念完善、文档示例丰富。但目前它更像一份设计文档而非可用的工具,缺少实际程序代码,无法直接运行使用。如果你需要的是可直接使用的安全检查工具,这个产品还需要等待开发者补充实现代码。追求开箱即用的用户可能需要选择其他替代品。