Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

audit-dependency-versions审计依赖版本

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

423

周安装

18

GitHub Stars

12

下载量

148
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:audit-dependency-versions(审计依赖版本)
来源仓库:https://github.com/pjt222/development-guides
仓库路径:skills/audit-dependency-versions
安装命令:
npx skills add https://github.com/pjt222/development-guides --skill audit-dependency-versions
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pjt222/development-guides --skill audit-dependency-versions

简介

用于检查项目依赖的版本状态、已知安全漏洞及兼容性问题,生成优先级排序的升级建议报告。

  • 通过解析 lock 文件获取所有依赖项,比对最新版本并标记陈旧程度,识别安全风险和兼容性冲突。
  • 支持在发布前或定期维护时运行,也可在收到安全公告后触发,确保依赖链安全可靠。
  • 安装方式:通过 npx skills add 命令从指定 GitHub 仓库添加,支持 Codex、Claude、Cursor 等宿主环境。
  • 输出包含推荐操作列表,优先处理高危漏洞和主版本升级,次要更新可延后处理。

SKILL.md

Audit Dependency Versions

Audit project dependencies for version staleness, known security vulnerabilities, and compatibility issues. This skill inventories all dependencies from lock files, checks each against the latest available version, classifies staleness levels, identifies security concerns, and produces a prioritized upgrade report with recommended actions.

When to Use

  • Before a release to ensure dependencies are current and secure
  • During periodic maintenance (monthly or quarterly dependency reviews)
  • After receiving a security advisory affecting a project dependency
  • When upgrading a project to a new language version (e.g., R 4.4 to 4.5)
  • Before submitting a package to CRAN, npm, or crates.io
  • When inheriting a project and assessing its dependency health

Inputs

  • Required: Project root directory containing dependency/lock files
  • Optional: Ecosystem type if not auto-detectable (R, Node.js, Python, Rust)
  • Optional: Security-only mode flag (skip staleness, focus on CVEs)
  • Optional: Allowlist of dependencies to skip (known acceptable older versions)
  • Optional: Target date for compatibility (e.g., "must work with R 4.4.x")

Procedure

Step 1: Inventory All Dependencies

Locate and parse dependency files to build a complete inventory.

R packages:

# Direct dependencies from DESCRIPTION
grep -A 100 "^Imports:" DESCRIPTION | grep -B 100 "^[A-Z]" | head -50
grep -A 100 "^Suggests:" DESCRIPTION | grep -B 100 "^[A-Z]" | head -50

# Pinned versions from renv.lock
cat renv.lock | grep -A 3 '"Package"'

Node.js:

# Direct dependencies
cat package.json | grep -A 100 '"dependencies"' | grep -B 100 "}"
cat package.json | grep -A 100 '"devDependencies"' | grep -B 100 "}"

# Pinned versions from lock file
cat package-lock.json | grep '"version"' | head -20

Python:

# From requirements or pyproject
cat requirements.txt
cat pyproject.toml | grep -A 50 "dependencies"

# Pinned versions
cat requirements.lock 2>/dev/null || pip freeze

Rust:

# From Cargo.toml
grep -A 50 "\[dependencies\]" Cargo.toml
# Pinned versions
cat Cargo.lock | grep -A 2 "name ="

Build an inventory table:

| Package | Pinned Version | Type | Ecosystem |
|---|---|---|---|
| dplyr | 1.1.4 | Import | R |
| testthat | 3.2.1 | Suggests | R |
| express | 4.18.2 | dependency | Node.js |
| pytest | 8.0.0 | dev | Python |

Expected: Complete inventory of all direct and (optionally) transitive dependencies with pinned versions.

On failure: If lock files are missing, the project has reproducibility issues. Note this as a finding and inventory from the manifest file (DESCRIPTION, package.json) using declared version constraints instead of pinned versions.

Step 2: Check Latest Available Versions

For each dependency, determine the latest available version.

R:

# Check available versions
available.packages()[c("dplyr", "testthat"), "Version"]

# Or via CLI
Rscript -e 'cat(available.packages()["dplyr", "Version"])'

Node.js:

# Check outdated packages
npm outdated --json

# Or individual package
npm view express version

Python:

# Check outdated
pip list --outdated --format=json

# Or individual
pip index versions requests 2>/dev/null

Rust:

# Check outdated
cargo outdated

# Or individual
cargo search serde --limit 1

Update the inventory with latest versions:

| Package | Pinned | Latest | Gap |
|---|---|---|---|
| dplyr | 1.1.4 | 1.1.6 | patch |
| ggplot2 | 3.4.0 | 3.5.1 | minor |
| Rcpp | 1.0.10 | 1.0.14 | patch |
| shiny | 1.7.4 | 1.9.1 | minor |

Expected: Latest version identified for each dependency with the gap magnitude (patch/minor/major).

On failure: If a package registry is unreachable, note the dependency as "unable to check" and proceed with the rest. Do not block the entire audit on one unreachable registry.

Step 3: Classify Staleness

Assign a staleness level to each dependency:

LevelDefinitionAction
CurrentAt latest version or within latest patchNo action needed
Patch behindSame major.minor, older patchLow priority upgrade, usually safe
Minor behindSame major, older minorMedium priority, review changelog for new features
Major behindOlder major versionHigh priority, likely breaking changes in upgrade
EOL / ArchivedPackage no longer maintainedCritical: find replacement or fork

Produce a staleness summary:

### Staleness Summary

- **Current**: 12 packages (48%)
- **Patch behind**: 8 packages (32%)
- **Minor behind**: 3 packages (12%)
- **Major behind**: 1 package (4%)
- **EOL/Archived**: 1 package (4%)

**Overall health**: AMBER (major-behind and EOL packages present)

Color coding:

  • GREEN: All packages current or patch-behind
  • AMBER: Any minor-behind or one major-behind
  • RED: Multiple major-behind or any EOL packages

Expected: Every dependency classified by staleness with an overall health rating.

On failure: If version comparison logic is ambiguous (non-SemVer versions, date-based versions), classify conservatively as "minor behind" and note the non-standard versioning.

Step 4: Check for Security Vulnerabilities

Run ecosystem-specific security audit tools:

R:

# No built-in audit tool; check manually
# Cross-reference with https://www.r-project.org/security.html
# Check GitHub advisories for each package

Node.js:

# Built-in audit
npm audit --json

# Severity levels: info, low, moderate, high, critical
npm audit --audit-level=moderate

Python:

# Using pip-audit
pip-audit --format=json

# Or safety
safety check --json

Rust:

# Using cargo-audit
cargo audit --json

Document findings:

### Security Findings

| Package | Version | CVE | Severity | Fixed In | Description |
|---|---|---|---|---|---|
| express | 4.18.2 | CVE-2024-XXXX | High | 4.19.0 | Path traversal in static file serving |
| lodash | 4.17.20 | CVE-2021-23337 | Critical | 4.17.21 | Command injection via template |

**Security status**: RED (1 critical, 1 high)

Expected: Security vulnerabilities identified with CVE, severity, affected version, and fix version.

On failure: If no audit tool is available for the ecosystem, search GitHub Security Advisories manually for each dependency. Note that the audit is best-effort without tooling.

Step 5: Plan Upgrade Path

Prioritize upgrades based on risk and impact:

### Upgrade Plan

#### Priority 1: Security Fixes (do immediately)
| Package | Current | Target | Risk | Notes |
|---|---|---|---|---|
| lodash | 4.17.20 | 4.17.21 | Low (patch) | Fixes CVE-2021-23337 |
| express | 4.18.2 | 4.19.0 | Low (minor) | Fixes CVE-2024-XXXX |

#### Priority 2: EOL Replacements (plan within 1 month)
| Package | Current | Replacement | Migration Effort |
|---|---|---|---|
| request | 2.88.2 | node-fetch 3.x | Medium (API change) |

#### Priority 3: Major Version Upgrades (plan for next release cycle)
| Package | Current | Target | Breaking Changes |
|---|---|---|---|
| webpack | 4.46.0 | 5.90.0 | Config format, plugin API |

#### Priority 4: Minor/Patch Updates (batch in maintenance window)
| Package | Current | Target | Notes |
|---|---|---|---|
| dplyr | 1.1.4 | 1.1.6 | Patch fixes only |
| ggplot2 | 3.4.0 | 3.5.1 | New geom functions added |

For each major upgrade, note known breaking changes by checking the dependency's changelog.

Expected: Prioritized upgrade plan with security fixes first, then EOL replacements, major upgrades, and minor/patch batches.

On failure: If a dependency has no clear upgrade path (abandoned with no fork), document the risk and recommend: (1) vendoring the current version, (2) finding an alternative package, or (3) accepting the risk with monitoring.

Step 6: Document Compatibility Risks

For each planned upgrade, assess compatibility:

### Compatibility Assessment

#### express 4.18.2 -> 4.19.0
- **API changes**: None (patch-level fix)
- **Node.js requirement**: Same (>=14)
- **Test impact**: Run full test suite; expect zero failures
- **Confidence**: HIGH

#### webpack 4.46.0 -> 5.90.0
- **API changes**: Config file format changed, several plugins removed
- **Node.js requirement**: >=10.13 (unchanged)
- **Test impact**: Build configuration must be rewritten; all tests need re-run
- **Confidence**: LOW (requires dedicated migration effort)
- **Migration guide**: https://webpack.js.org/migrate/5/

Write the complete audit report to DEPENDENCY-AUDIT.md or DEPENDENCY-AUDIT-2026-02-17.md.

Expected: Compatibility risks documented for each significant upgrade. Complete audit report written.

On failure: If compatibility cannot be assessed without testing, recommend a branch-based upgrade approach: create a branch, apply the upgrade, run tests, and evaluate results before merging.

Validation

  • All direct dependencies inventoried from lock/manifest files
  • Latest available version checked for each dependency
  • Staleness level assigned (current / patch / minor / major / EOL)
  • Overall health rating calculated (GREEN / AMBER / RED)
  • Security audit run with ecosystem-appropriate tooling
  • All CVEs documented with severity, affected version, and fix version
  • Upgrade plan prioritized: security > EOL > major > minor/patch
  • Compatibility risks assessed for each major upgrade
  • Audit report written to DEPENDENCY-AUDIT.md
  • No dependencies left as "unable to check" without documented reason

Common Pitfalls

  • Ignoring transitive dependencies: A project may have 10 direct dependencies but 200 transitive ones. Security vulnerabilities often hide in transitive dependencies. Use npm ls or renv::dependencies() to see the full tree.
  • Upgrading everything at once: Batch-upgrading all dependencies in one commit makes it impossible to identify which upgrade caused a regression. Upgrade in logical groups (security first, then majors individually, then minors/patches as a batch).
  • Confusing "outdated" with "insecure": A package one major version behind with no CVEs is lower risk than a current package with a critical vulnerability. Always prioritize security over freshness.
  • Not reading changelogs: Blindly upgrading a major version without reading the changelog. Breaking changes in the dependency become breaking changes in your project.
  • Audit fatigue: Running audits but not acting on findings. Set a policy: security findings must be addressed within 1 sprint, EOL within 1 quarter.
  • Missing lock files: Projects without lock files have non-reproducible builds. If the audit reveals missing lock files, that is itself a critical finding to address before versioned upgrades.

Related Skills

  • apply-semantic-versioning -- Version bumps may be triggered by dependency upgrades
  • manage-renv-dependencies -- R-specific dependency management with renv
  • security-audit-codebase -- Broader security audit that includes dependency vulnerabilities
  • manage-changelog -- Document dependency upgrades in the changelog
  • plan-release-cycle -- Schedule dependency upgrades within the release timeline

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.85%
按下载量换算59

Claude

29.76%
按下载量换算44

Cursor

17.51%
按下载量换算26

Gemini CLI

10.16%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills