jpskill.com
🛠️ 開発・MCP コミュニティ

dependency-audit-assistant

Reviews package dependencies for security vulnerabilities, outdated versions, and license compliance. Use when user asks about dependencies, security audits, or before releases.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o dependency-audit-assistant.zip https://jpskill.com/download/18105.zip && unzip -o dependency-audit-assistant.zip && rm dependency-audit-assistant.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18105.zip -OutFile "$d\dependency-audit-assistant.zip"; Expand-Archive "$d\dependency-audit-assistant.zip" -DestinationPath $d -Force; ri "$d\dependency-audit-assistant.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して dependency-audit-assistant.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → dependency-audit-assistant フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
2

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

依存関係監査アシスタント

この Skill は、プロジェクトの依存関係について、セキュリティ脆弱性、古いパッケージ、およびライセンスコンプライアンスの問題を監査するのに役立ちます。

この Skill を使用するタイミング

  • ユーザーが依存関係の監査またはセキュリティチェックを要求した場合
  • 主要なリリースまたはデプロイメントの前
  • ユーザーが古いパッケージまたは脆弱性について質問した場合
  • ライセンスコンプライアンスのレビューが必要な場合
  • ユーザーが "npm audit"、"security"、"dependencies"、または "vulnerabilities" に言及した場合

指示

1. パッケージマネージャーの検出

プロジェクトで使用されているパッケージマネージャーを特定します。

JavaScript/Node.js:

  • npm: package.json + package-lock.json
  • Yarn: package.json + yarn.lock
  • pnpm: package.json + pnpm-lock.yaml

Python:

  • pip: requirements.txt または setup.py
  • Poetry: pyproject.toml + poetry.lock
  • Pipenv: Pipfile + Pipfile.lock

Ruby:

  • Bundler: Gemfile + Gemfile.lock

Java:

  • Maven: pom.xml
  • Gradle: build.gradle または build.gradle.kts

Go:

  • Go modules: go.mod + go.sum

Rust:

  • Cargo: Cargo.toml + Cargo.lock

PHP:

  • Composer: composer.json + composer.lock

これらのファイルを見つけるには、Glob を使用します。

2. セキュリティ監査の実行

パッケージマネージャーに基づいて、適切な監査コマンドを実行します。

npm: npm audit --json または npm audit Yarn: yarn audit --json または yarn audit pnpm: pnpm audit --json pip: pip-audit または safety check Poetry: poetry check Bundler: bundle audit check --update Maven: mvn dependency:tree + OWASP Dependency Check Go: go list -m all + govulncheck Cargo: cargo audit Composer: composer audit

出力を解析して、以下を特定します。

  • 重大度別の脆弱性の数 (critical, high, moderate, low)
  • 影響を受けるパッケージとバージョン
  • 利用可能な修正 (アップデートまたはパッチ)
  • CVE 識別子

3. 古いパッケージの確認

利用可能な新しいバージョンがあるパッケージを特定します。

npm: npm outdated --json Yarn: yarn outdated --json pip: pip list --outdated Poetry: poetry show --outdated Bundler: bundle outdated Cargo: cargo outdated Go: go list -u -m all

アップデートを分類します。

  • Patch updates (1.0.0 → 1.0.1): バグ修正、安全にアップデート可能
  • Minor updates (1.0.0 → 1.1.0): 新機能、通常は安全
  • Major updates (1.0.0 → 2.0.0): 破壊的な変更、テストが必要

4. ライセンスコンプライアンスチェック

すべての依存関係のライセンスを確認します。

手順:

  1. パッケージメタデータからライセンスを抽出します
  2. ライセンスの種類を特定します (MIT, Apache-2.0, GPL など)
  3. 問題のある可能性のあるライセンスにフラグを立てます (商用プロジェクトでの GPL, AGPL)
  4. ライセンスがないか、不明なライセンスを確認します
  5. reference/licenses.md のライセンス互換性マトリックスを参照します

ツール:

  • npm: npx license-checker --json または npm-license-crawler
  • Python: pip-licenses
  • Ruby: license_finder
  • Go: go-licenses

ライセンスカテゴリ:

  • Permissive: MIT, Apache-2.0, BSD - 通常は安全
  • Weak copyleft: LGPL, MPL - レビューが必要
  • Strong copyleft: GPL, AGPL - 商用利用を制限する可能性あり
  • Unknown: 不明またはカスタムライセンス - 調査が必要

5. 依存関係ツリーの分析

依存関係の構造を理解します。

Direct vs Transitive:

  • Direct: package.json/requirements.txt にリストされている
  • Transitive: 依存関係の依存関係

問題を特定します。

  • 異なるバージョンでの重複したパッケージ
  • 深い依存関係ツリー (競合の可能性)
  • 放棄されたパッケージ (2 年以上アップデートがない)
  • リスクの高い推移的な依存関係

コマンド:

  • npm: npm ls --all
  • Yarn: yarn why <package>
  • pip: pipdeptree
  • Maven: mvn dependency:tree

6. 脆弱性の優先順位付け

以下に基づいて脆弱性の優先順位を付けます。

重大度レベル:

  1. Critical: リモートコード実行、権限昇格
  2. High: SQL インジェクション、XSS、認証バイパス
  3. Moderate: DoS、情報漏洩
  4. Low: 軽微な問題、エッジケース

悪用可能性:

  • 実際に悪用されている既知のエクスプロイト
  • PoC (Proof of Concept) が利用可能
  • 特別な条件が必要

暴露:

  • 本番環境の依存関係 vs 開発環境の依存関係
  • 直接的な依存関係 vs 深い推移的な依存関係
  • アプリケーションで実際に使用されているコードパス

7. 推奨事項の生成

見つかった各問題について、以下を提供します。

脆弱性:

Package: lodash@4.17.15
Severity: High
CVE: CVE-2020-8203
Issue: Prototype pollution
Recommendation: Upgrade to lodash@4.17.21 or higher
Command: npm install lodash@4.17.21

古いパッケージ:

Package: react@16.14.0
Current: 16.14.0
Latest: 18.2.0
Type: Major update
Recommendation: Test thoroughly before upgrading (breaking changes)
Notes: Review migration guide at https://react.dev/blog/2022/03/08/react-18-upgrade-guide

ライセンスの問題:

Package: some-gpl-library@1.0.0
License: GPL-3.0
Issue: GPL license may conflict with proprietary code
Recommendation: Find alternative with permissive license or consult legal
Alternatives: [list of similar packages with MIT/Apache licenses]

8. アップデート戦略

アップデートのアプローチを提案します。

安全なアップデート (自動):

  • 破壊的な変更のないパッチアップデート
  • 脆弱性のセキュリティ修正
  • Update: npm update または npm audit fix

慎重なアップデート (手動テスト):

  • マイナーバージョンアップ
  • 適切にメンテナンスされているパッケージへのメジャーアップデート
  • 個別にアップデートしてテストする

調査が必要:

  • 主要な破壊的変更
  • 放棄されたパッケージ (代替手段を見つける)
  • ライセンスの競合

9. サマリーレポートの生成

包括的な監査サマリーを提供します。

Dependency Audit Report
=======================

Overview:
- Total dependencies: 150 (120 direct, 30 transitive)
- Vulnerabilities: 5 (1 high, 3 moderate, 1 low)
- Outdated packages: 23
- License issues: 2

Security Vulnerabilities:
[List by severity with fix recommendations]

Outdated Packages:
[Categorized by update type: patch/minor/major]

License Compliance:
[List of licenses with any concerns]

Recommended Actions:
1. [Immediate] Fix high-severity vulnerabilitie

(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Dependency Audit Assistant

This skill helps audit project dependencies for security vulnerabilities, outdated packages, and license compliance issues.

When to Use This Skill

  • User requests a dependency audit or security check
  • Before major releases or deployments
  • User asks about outdated packages or vulnerabilities
  • License compliance review needed
  • User mentions "npm audit", "security", "dependencies", or "vulnerabilities"

Instructions

1. Detect Package Manager

Identify which package manager(s) the project uses:

JavaScript/Node.js:

  • npm: package.json + package-lock.json
  • Yarn: package.json + yarn.lock
  • pnpm: package.json + pnpm-lock.yaml

Python:

  • pip: requirements.txt or setup.py
  • Poetry: pyproject.toml + poetry.lock
  • Pipenv: Pipfile + Pipfile.lock

Ruby:

  • Bundler: Gemfile + Gemfile.lock

Java:

  • Maven: pom.xml
  • Gradle: build.gradle or build.gradle.kts

Go:

  • Go modules: go.mod + go.sum

Rust:

  • Cargo: Cargo.toml + Cargo.lock

PHP:

  • Composer: composer.json + composer.lock

Use Glob to find these files.

2. Run Security Audit

Execute the appropriate audit command based on package manager:

npm: npm audit --json or npm audit Yarn: yarn audit --json or yarn audit pnpm: pnpm audit --json pip: pip-audit or safety check Poetry: poetry check Bundler: bundle audit check --update Maven: mvn dependency:tree + OWASP Dependency Check Go: go list -m all + govulncheck Cargo: cargo audit Composer: composer audit

Parse the output to identify:

  • Number of vulnerabilities by severity (critical, high, moderate, low)
  • Affected packages and versions
  • Available fixes (updates or patches)
  • CVE identifiers

3. Check for Outdated Packages

Identify packages that have newer versions available:

npm: npm outdated --json Yarn: yarn outdated --json pip: pip list --outdated Poetry: poetry show --outdated Bundler: bundle outdated Cargo: cargo outdated Go: go list -u -m all

Categorize updates:

  • Patch updates (1.0.0 → 1.0.1): Bug fixes, safe to update
  • Minor updates (1.0.0 → 1.1.0): New features, usually safe
  • Major updates (1.0.0 → 2.0.0): Breaking changes, needs testing

4. License Compliance Check

Review licenses of all dependencies:

Steps:

  1. Extract licenses from package metadata
  2. Identify license types (MIT, Apache-2.0, GPL, etc.)
  3. Flag potentially problematic licenses (GPL, AGPL in commercial projects)
  4. Check for unlicensed or unknown licenses
  5. Reference the license compatibility matrix in reference/licenses.md

Tools:

  • npm: npx license-checker --json or npm-license-crawler
  • Python: pip-licenses
  • Ruby: license_finder
  • Go: go-licenses

License categories:

  • Permissive: MIT, Apache-2.0, BSD - Usually safe
  • Weak copyleft: LGPL, MPL - Requires review
  • Strong copyleft: GPL, AGPL - May restrict commercial use
  • Unknown: Missing or custom licenses - Needs investigation

5. Analyze Dependency Tree

Understand the dependency structure:

Direct vs Transitive:

  • Direct: Listed in package.json/requirements.txt
  • Transitive: Dependencies of dependencies

Identify issues:

  • Duplicate packages at different versions
  • Deep dependency trees (potential for conflicts)
  • Abandoned packages (no updates in >2 years)
  • High-risk transitive dependencies

Commands:

  • npm: npm ls --all
  • Yarn: yarn why <package>
  • pip: pipdeptree
  • Maven: mvn dependency:tree

6. Priority Vulnerabilities

Prioritize vulnerabilities based on:

Severity levels:

  1. Critical: Remote code execution, privilege escalation
  2. High: SQL injection, XSS, authentication bypass
  3. Moderate: DoS, information disclosure
  4. Low: Minor issues, edge cases

Exploitability:

  • Known exploits in the wild
  • PoC (Proof of Concept) available
  • Requires special conditions

Exposure:

  • Production dependencies vs dev dependencies
  • Direct dependencies vs deep transitive dependencies
  • Code paths actually used in the application

7. Generate Recommendations

For each issue found, provide:

Vulnerabilities:

Package: lodash@4.17.15
Severity: High
CVE: CVE-2020-8203
Issue: Prototype pollution
Recommendation: Upgrade to lodash@4.17.21 or higher
Command: npm install lodash@4.17.21

Outdated packages:

Package: react@16.14.0
Current: 16.14.0
Latest: 18.2.0
Type: Major update
Recommendation: Test thoroughly before upgrading (breaking changes)
Notes: Review migration guide at https://react.dev/blog/2022/03/08/react-18-upgrade-guide

License issues:

Package: some-gpl-library@1.0.0
License: GPL-3.0
Issue: GPL license may conflict with proprietary code
Recommendation: Find alternative with permissive license or consult legal
Alternatives: [list of similar packages with MIT/Apache licenses]

8. Update Strategy

Suggest an update approach:

Safe updates (automated):

  • Patch updates with no breaking changes
  • Security fixes for vulnerabilities
  • Update: npm update or npm audit fix

Careful updates (manual testing):

  • Minor version bumps
  • Major updates to well-maintained packages
  • Update individually and test

Research needed:

  • Major breaking changes
  • Abandoned packages (find alternatives)
  • License conflicts

9. Generate Summary Report

Provide a comprehensive audit summary:

Dependency Audit Report
=======================

Overview:
- Total dependencies: 150 (120 direct, 30 transitive)
- Vulnerabilities: 5 (1 high, 3 moderate, 1 low)
- Outdated packages: 23
- License issues: 2

Security Vulnerabilities:
[List by severity with fix recommendations]

Outdated Packages:
[Categorized by update type: patch/minor/major]

License Compliance:
[List of licenses with any concerns]

Recommended Actions:
1. [Immediate] Fix high-severity vulnerabilities
2. [Soon] Update packages with moderate vulnerabilities
3. [Review] Address license compliance issues
4. [Optional] Update outdated packages to latest

Commands to run:
npm audit fix  # Fix vulnerabilities automatically
npm update     # Update to latest compatible versions

10. Continuous Monitoring

Suggest ongoing practices:

  • Automated audits: Run in CI/CD pipeline
  • Dependabot/Renovate: Auto-create PRs for updates
  • Regular reviews: Monthly or quarterly audits
  • Security alerts: Enable GitHub/GitLab security alerts
  • Lock files: Commit lock files for reproducible builds

Best Practices

  1. Fix vulnerabilities promptly: Especially high/critical severity
  2. Test updates: Even patch updates can cause issues
  3. Read changelogs: Understand what changed before updating
  4. Use lock files: Ensure consistent installations across environments
  5. Minimize dependencies: Fewer deps = smaller attack surface
  6. Review new additions: Audit before adding new dependencies
  7. Stay current: Regular updates are easier than large jumps
  8. Document decisions: Why certain packages are pinned or not updated

Security Best Practices

  • Never commit secrets in dependencies or env files
  • Review dependency source code for popular/critical packages
  • Use private registries for internal packages
  • Enable 2FA on package registry accounts
  • Use SRI (Subresource Integrity) for CDN resources
  • Scan container images if using Docker

Supporting Files

  • scripts/check-licenses.sh: Extract and check license information
  • reference/licenses.md: License compatibility matrix
  • reference/common-vulnerabilities.md: Common vulnerability patterns

Common Commands Reference

npm:

npm audit                 # Show vulnerabilities
npm audit fix            # Auto-fix vulnerabilities
npm audit fix --force    # Force major updates
npm outdated            # Check for outdated packages
npm update              # Update to latest compatible

Yarn:

yarn audit               # Show vulnerabilities
yarn upgrade-interactive # Interactive update
yarn outdated           # Check for outdated

pip:

pip-audit               # Audit vulnerabilities
pip list --outdated     # Check outdated
pip install --upgrade   # Update package

Poetry:

poetry check            # Check lock file
poetry show --outdated  # Show outdated
poetry update           # Update packages

Cargo:

cargo audit             # Audit vulnerabilities
cargo outdated          # Check outdated
cargo update            # Update packages

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。