重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
dependency-scan by jwynia/agent-skills
npx skills add https://github.com/jwynia/agent-skills --skill dependency-scan分析软件包依赖项中的已知漏洞。
/dependency-scan # 扫描所有检测到的包管理器
/dependency-scan --npm # 仅扫描 Node.js 包
/dependency-scan --pip # 仅扫描 Python 包
/dependency-scan --fix # 在可能的情况下自动修复
| 生态系统 | 文件 | 使用的工具 |
|---|---|---|
| Node.js | package.json, package-lock.json | npm audit |
| Python | requirements.txt, Pipfile, pyproject.toml | pip-audit, safety |
| Ruby |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| Gemfile, Gemfile.lock |
| bundler-audit |
| Java | pom.xml, build.gradle | dependency-check |
| Go | go.mod, go.sum | govulncheck |
| Rust | Cargo.toml, Cargo.lock | cargo-audit |
| PHP | composer.json, composer.lock | composer audit |
| .NET | *.csproj, packages.config | dotnet list --vulnerable |
/dependency-scan
扫描所有检测到的包管理器,报告所有严重级别。
/dependency-scan --npm
/dependency-scan --pip
/dependency-scan --go
/dependency-scan --severity critical,high
/dependency-scan --severity medium
/dependency-scan --fix
/dependency-scan --fix --dry-run # 预览更改
尝试将易受攻击的包更新到已打补丁的版本。
DEPENDENCY SCAN RESULTS
=======================
Scanned: package.json, requirements.txt
Packages analyzed: 127 (78 npm, 49 pip)
VULNERABILITIES BY SEVERITY
Critical: 2
High: 4
Medium: 8
Low: 12
TOP ISSUES
[!] CRITICAL: lodash < 4.17.21
CVE-2021-23337: Command Injection
Affected: lodash@4.17.19
Fix: npm update lodash
[!] CRITICAL: urllib3 < 2.0.6
CVE-2023-43804: Cookie Leak
Affected: urllib3@1.26.0
Fix: pip install urllib3>=2.0.6
[H] HIGH: express < 4.19.2
CVE-2024-29041: Open Redirect
Affected: express@4.18.0
Fix: npm update express
/dependency-scan --details
DETAILED VULNERABILITY REPORT
=============================
CVE-2021-23337
--------------
Package: lodash
Installed: 4.17.19
Patched: 4.17.21
Severity: CRITICAL (CVSS 9.8)
Description:
lodash 模板函数中的命令注入漏洞允许通过精心构造的模板字符串执行任意命令。
Attack Vector: Remote, no auth required
Exploitability: Public exploit available
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-23337
- https://github.com/lodash/lodash/issues/5085
Remediation:
npm update lodash
# or
npm install lodash@4.17.21
| 数据库 | 覆盖范围 |
|---|---|
| NVD (国家漏洞数据库) | 所有 CVE |
| GitHub 安全公告数据库 | GitHub 报告的漏洞 |
| OSV (开源漏洞) | 多生态系统 |
| npm 安全公告 | Node.js 特定 |
| PyPI 安全公告数据库 | Python 特定 |
| RustSec 安全公告数据库 | Rust 特定 |
| 分数 | 严重性 |
|---|---|
| 9.0-10.0 | 严重 |
| 7.0-8.9 | 高 |
| 4.0-6.9 | 中 |
| 0.1-3.9 | 低 |
npm audit --json
npm audit fix # 自动修复
npm audit fix --force # 允许破坏性更改
pip-audit
pip-audit --fix
pip-audit -r requirements.txt
safety check
safety check -r requirements.txt
bundle-audit check
bundle-audit update # 更新安全公告数据库
govulncheck ./...
cargo audit
cargo audit fix # 自动修复
在语义化版本兼容范围内更新:
可能引入破坏性更改:
--force 标志AUTO-FIX REPORT
===============
Fixed: 8 vulnerabilities
lodash: 4.17.19 → 4.17.21
axios: 0.21.0 → 0.21.1
minimist: 1.2.5 → 1.2.6
Unable to fix: 2 vulnerabilities
react-scripts: No patch available (major version required)
webpack-dev-server: Conflicts with other dependencies
Review package.json changes before committing.
创建 .dependency-scan-ignore:
# 忽略特定的 CVE(请记录原因!)
ignore:
- id: CVE-2021-23337
reason: "在我们的使用场景中不可利用,未使用 lodash 模板"
expires: 2024-12-31
- id: GHSA-xxx-xxx
reason: "仅为开发依赖项"
# 忽略包
packages:
- name: lodash
versions: ["< 4.17.0"] # 仅旧版本
# .dependency-scan.yaml
thresholds:
fail_on: critical # 在严重级别时使 CI 失败
warn_on: high # 在高等级别时警告
ignore_below: low # 不报告低等级别
fix:
auto_fix: true
allow_major: false # 不允许主版本升级
- name: Dependency Scan
run: |
/dependency-scan --severity critical,high --fail-on-findings
- name: Auto-fix and PR
if: failure()
run: |
/dependency-scan --fix
git add .
gh pr create --title "Security: Update vulnerable dependencies"
#!/bin/sh
# 在 package.json 更改时运行
if git diff --cached --name-only | grep -q "package.json\|requirements.txt"; then
/dependency-scan --severity critical,high
fi
/dependency-scan --health
额外检查:
DEPENDENCY HEALTH
=================
Outdated (major behind): 5
react: 17.0.2 → 18.2.0
typescript: 4.9.5 → 5.3.3
Deprecated: 1
request: Use got, axios, or node-fetch
Unmaintained (>2 years): 2
moment: Consider dayjs or date-fns
License Issues: 0
/security-scan - 完整的安全分析/secrets-scan - 凭据检测/config-scan - 配置安全每周安装次数
63
仓库
GitHub 星标数
42
首次出现
2026年2月16日
安全审计
安装于
codex57
opencode56
gemini-cli55
github-copilot54
kimi-cli53
amp53
Analyze package dependencies for known vulnerabilities.
/dependency-scan # Scan all detected package managers
/dependency-scan --npm # Node.js packages only
/dependency-scan --pip # Python packages only
/dependency-scan --fix # Auto-fix where possible
| Ecosystem | Files | Tool Used |
|---|---|---|
| Node.js | package.json, package-lock.json | npm audit |
| Python | requirements.txt, Pipfile, pyproject.toml | pip-audit, safety |
| Ruby | Gemfile, Gemfile.lock | bundler-audit |
| Java | pom.xml, build.gradle | dependency-check |
| Go | go.mod, go.sum | govulncheck |
| Rust | Cargo.toml, Cargo.lock | cargo-audit |
| PHP | composer.json, composer.lock | composer audit |
| .NET | *.csproj, packages.config | dotnet list --vulnerable |
/dependency-scan
Scans all detected package managers, reports all severity levels.
/dependency-scan --npm
/dependency-scan --pip
/dependency-scan --go
/dependency-scan --severity critical,high
/dependency-scan --severity medium
/dependency-scan --fix
/dependency-scan --fix --dry-run # Preview changes
Attempts to update vulnerable packages to patched versions.
DEPENDENCY SCAN RESULTS
=======================
Scanned: package.json, requirements.txt
Packages analyzed: 127 (78 npm, 49 pip)
VULNERABILITIES BY SEVERITY
Critical: 2
High: 4
Medium: 8
Low: 12
TOP ISSUES
[!] CRITICAL: lodash < 4.17.21
CVE-2021-23337: Command Injection
Affected: lodash@4.17.19
Fix: npm update lodash
[!] CRITICAL: urllib3 < 2.0.6
CVE-2023-43804: Cookie Leak
Affected: urllib3@1.26.0
Fix: pip install urllib3>=2.0.6
[H] HIGH: express < 4.19.2
CVE-2024-29041: Open Redirect
Affected: express@4.18.0
Fix: npm update express
/dependency-scan --details
DETAILED VULNERABILITY REPORT
=============================
CVE-2021-23337
--------------
Package: lodash
Installed: 4.17.19
Patched: 4.17.21
Severity: CRITICAL (CVSS 9.8)
Description:
Command Injection in lodash template function allows
arbitrary command execution via crafted template strings.
Attack Vector: Remote, no auth required
Exploitability: Public exploit available
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-23337
- https://github.com/lodash/lodash/issues/5085
Remediation:
npm update lodash
# or
npm install lodash@4.17.21
| Database | Coverage |
|---|---|
| NVD (National Vulnerability Database) | All CVEs |
| GitHub Advisory Database | GitHub-reported |
| OSV (Open Source Vulnerabilities) | Multi-ecosystem |
| npm Security Advisories | Node.js specific |
| PyPI Advisory Database | Python specific |
| RustSec Advisory Database | Rust specific |
| Score | Severity |
|---|---|
| 9.0-10.0 | Critical |
| 7.0-8.9 | High |
| 4.0-6.9 | Medium |
| 0.1-3.9 | Low |
npm audit --json
npm audit fix # Auto-fix
npm audit fix --force # Breaking changes OK
pip-audit
pip-audit --fix
pip-audit -r requirements.txt
safety check
safety check -r requirements.txt
bundle-audit check
bundle-audit update # Update advisory DB
govulncheck ./...
cargo audit
cargo audit fix # Auto-fix
Updates within semver-compatible range:
May introduce breaking changes:
--force flagAUTO-FIX REPORT
===============
Fixed: 8 vulnerabilities
lodash: 4.17.19 → 4.17.21
axios: 0.21.0 → 0.21.1
minimist: 1.2.5 → 1.2.6
Unable to fix: 2 vulnerabilities
react-scripts: No patch available (major version required)
webpack-dev-server: Conflicts with other dependencies
Review package.json changes before committing.
Create .dependency-scan-ignore:
# Ignore specific CVEs (document reason!)
ignore:
- id: CVE-2021-23337
reason: "Not exploitable in our usage, lodash template not used"
expires: 2024-12-31
- id: GHSA-xxx-xxx
reason: "Development dependency only"
# Ignore packages
packages:
- name: lodash
versions: ["< 4.17.0"] # Only old versions
# .dependency-scan.yaml
thresholds:
fail_on: critical # Fail CI on critical
warn_on: high # Warn on high
ignore_below: low # Don't report low
fix:
auto_fix: true
allow_major: false # No major version bumps
- name: Dependency Scan
run: |
/dependency-scan --severity critical,high --fail-on-findings
- name: Auto-fix and PR
if: failure()
run: |
/dependency-scan --fix
git add .
gh pr create --title "Security: Update vulnerable dependencies"
#!/bin/sh
# Run on package.json changes
if git diff --cached --name-only | grep -q "package.json\|requirements.txt"; then
/dependency-scan --severity critical,high
fi
/dependency-scan --health
Additional checks:
DEPENDENCY HEALTH
=================
Outdated (major behind): 5
react: 17.0.2 → 18.2.0
typescript: 4.9.5 → 5.3.3
Deprecated: 1
request: Use got, axios, or node-fetch
Unmaintained (>2 years): 2
moment: Consider dayjs or date-fns
License Issues: 0
/security-scan - Full security analysis/secrets-scan - Credential detection/config-scan - Configuration securityWeekly Installs
63
Repository
GitHub Stars
42
First Seen
Feb 16, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
codex57
opencode56
gemini-cli55
github-copilot54
kimi-cli53
amp53
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
152,400 周安装