スキル一覧に戻る
Optima-Financial

dependency-risk-auditor

by Optima-Financial

Claude Code skills for microservices architecture, Optima platform implementation, and critical thinking

0🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: dependency-risk-auditor description: Analyze third-party dependencies for security, maintenance, and lock-in risk. Use when auditing dependencies, reviewing new packages, or assessing supply chain security. Triggers on "dependency audit", "package risk", "supply chain", "vulnerable dependencies", "license check", "outdated packages", "dependency review", "npm audit", "security scan".

Dependency Risk Auditor

Analyze third-party dependencies for security vulnerabilities, maintenance health, license compliance, and vendor lock-in risk.

Core Risks

Risk CategoryImpactExample
SecurityData breach, RCEKnown CVE in dependency
MaintenanceFuture breakageUnmaintained package
LicenseLegal liabilityGPL in proprietary code
Lock-inMigration costDeep integration with single vendor
Supply ChainCompromiseMalicious package update

When to Use

  • Adding new dependencies
  • Regular security audits
  • Preparing for production deployment
  • Evaluating vendor/library choices
  • License compliance review
  • Investigating transitive dependencies

Audit Workflow

Step 1: Inventory Dependencies

# Node.js - List all dependencies
npm ls --all --depth=10 > deps.txt
npm ls --prod --depth=0  # Production only

# Python
pip list --format=freeze
pip-audit

# Go
go list -m all

# Rust
cargo tree

# Count dependencies
npm ls --all | wc -l

Categorize:

CategoryCountExamples
Direct (prod)[N]express, lodash
Direct (dev)[N]jest, typescript
Transitive[N]All nested deps
Total[N]

Step 2: Security Scan

# Node.js
npm audit
npm audit --json > audit.json

# Python
pip-audit
safety check

# Go
go list -json -m all | nancy sleuth

# Rust
cargo audit

# General
snyk test
trivy fs .

Step 3: Analyze Health Signals

For each direct dependency, check:

SignalGoodWarningBad
Last commit<3 months3-12 months>12 months
Open issuesActively triagedBacklog growingIgnored
MaintainersMultiple, activeOne activeNone active
DownloadsGrowing/stableDecliningVery low
GitHub starsAppropriate to scopeN/AArchived
Test coverageVisible, highUnknownNone
Security policySECURITY.md existsN/ANone

Step 4: License Analysis

# Node.js
npx license-checker --summary
npx license-checker --production --csv > licenses.csv

# Python
pip-licenses

# Go
go-licenses csv .

# General
fossa analyze

See LICENSE-REFERENCE.md for license compatibility.

Step 5: Execute Checklist

See CHECKLIST.md for the complete audit checklist.

Output Format

A) Dependency Overview

┌─────────────────────────────────────────────────────────────┐
│                  DEPENDENCY OVERVIEW                         │
├─────────────────────────────────────────────────────────────┤
│ Package Manager: npm / pip / go / cargo                      │
│ Lock File: ✅ Present / ❌ Missing                           │
│                                                              │
│ Direct dependencies (prod):    [N]                           │
│ Direct dependencies (dev):     [N]                           │
│ Transitive dependencies:       [N]                           │
│ Total unique packages:         [N]                           │
│                                                              │
│ With known vulnerabilities:    [N]                           │
│ Unmaintained (>12 months):     [N]                           │
│ Deprecated:                    [N]                           │
└─────────────────────────────────────────────────────────────┘

B) Security Vulnerabilities

┌─────────────────────────────────────────────────────────────┐
│                 SECURITY VULNERABILITIES                     │
├──────────────┬──────────┬───────────────────────────────────┤
│ Package      │ Severity │ Vulnerability                     │
├──────────────┼──────────┼───────────────────────────────────┤
│ lodash@4.17.15 │ CRITICAL │ CVE-2021-23337 - Command Injection│
│ axios@0.21.0 │ HIGH     │ CVE-2021-3749 - ReDoS             │
│ minimist@1.2.5 │ MEDIUM   │ CVE-2021-44906 - Prototype Pollution│
└──────────────┴──────────┴───────────────────────────────────┘

Remediation:
• lodash: Upgrade to 4.17.21
• axios: Upgrade to 0.21.2+
• minimist: Transitive via [parent] - update [parent]

C) Abandoned/Risky Dependencies

### :red_circle: CRITICAL RISK: [package-name]

**Version:** [version]
**Last updated:** [date]
**Weekly downloads:** [count]
**Risk factors:**
- No commits in 24+ months
- 150+ open issues, no response
- Single maintainer, no activity
- Known unfixed vulnerabilities

**Used by:** [where it's used in codebase]
**Recommendation:** Replace with [alternative]
### :orange_circle: MODERATE RISK: [package-name]

**Version:** [version]
**Last updated:** [date]
**Risk factors:**
- Declining download trend
- Bus factor of 1
- No security policy

**Recommendation:** Monitor, plan migration

D) Transitive Dependency Hotspots

┌─────────────────────────────────────────────────────────────┐
│              TRANSITIVE HOTSPOTS                             │
│  (Packages that many direct deps depend on)                  │
├──────────────┬───────────────────────────────────────────────┤
│ Package      │ Depended on by                                │
├──────────────┼───────────────────────────────────────────────┤
│ debug@4.3.1  │ express, morgan, axios, socket.io (12 paths) │
│ ms@2.1.2     │ debug, jsonwebtoken, mongoose (8 paths)      │
│ semver@7.3.5 │ npm, pacote, libnpmexec (15 paths)           │
└──────────────┴───────────────────────────────────────────────┘

⚠️ Vulnerability in these packages has amplified impact!

E) License Analysis

┌─────────────────────────────────────────────────────────────┐
│                   LICENSE SUMMARY                            │
├──────────────┬──────────────────────────────────────────────┤
│ License      │ Count    │ Risk Level                        │
├──────────────┼──────────┼───────────────────────────────────┤
│ MIT          │ 245      │ ✅ Permissive                     │
│ ISC          │ 89       │ ✅ Permissive                     │
│ Apache-2.0   │ 34       │ ✅ Permissive (patent grant)      │
│ BSD-3-Clause │ 12       │ ✅ Permissive                     │
│ GPL-3.0      │ 2        │ :red_circle: Copyleft - REVIEW!   │
│ UNKNOWN      │ 3        │ :orange_circle: Investigate       │
└──────────────┴──────────┴───────────────────────────────────┘

:red_circle: LICENSE ISSUES:
• gpl-package@1.0.0 - GPL-3.0 incompatible with proprietary distribution
• mystery-lib@2.0.0 - No license file, check with legal

F) Lock-in Assessment

┌─────────────────────────────────────────────────────────────┐
│                  LOCK-IN ASSESSMENT                          │
├──────────────┬───────────────────────────────────────────────┤
│ Dependency   │ Lock-in Risk                                  │
├──────────────┼───────────────────────────────────────────────┤
│ AWS SDK      │ HIGH - Deep integration, no abstraction       │
│ Prisma       │ MEDIUM - ORM-specific schema, migrations      │
│ React        │ LOW - Standard patterns, replaceable          │
│ stripe       │ MEDIUM - Payment flows, webhook contracts     │
└──────────────┴───────────────────────────────────────────────┘

Recommendations:
• AWS SDK: Consider abstracting behind interface for multi-cloud
• Prisma: Document schema as SQL for portability

G) Upgrade Strategy

┌─────────────────────────────────────────────────────────────┐
│                  UPGRADE PRIORITY                            │
├─────────────────────────────────────────────────────────────┤
│ IMMEDIATE (Security):                                        │
│   • lodash 4.17.15 → 4.17.21 (CVE fix)                      │
│   • axios 0.21.0 → 1.6.0 (CVE fix)                          │
│                                                              │
│ THIS SPRINT (Maintenance):                                   │
│   • typescript 4.9 → 5.3 (improved types)                   │
│   • jest 28 → 29 (performance)                              │
│                                                              │
│ NEXT QUARTER (Major):                                        │
│   • express 4 → 5 (breaking changes, plan needed)           │
│   • react 17 → 18 (concurrent features)                     │
│                                                              │
│ MONITOR (Low priority):                                      │
│   • Various patch updates                                    │
└─────────────────────────────────────────────────────────────┘

H) Risk Summary

┌─────────────────────────────────────────────────────────────┐
│                    RISK SUMMARY                              │
├─────────────────────────────────────────────────────────────┤
│ Security vulnerabilities:  [N] (Critical: X, High: Y)        │
│ Abandoned packages:        [N]                               │
│ License issues:            [N]                               │
│ High lock-in packages:     [N]                               │
├─────────────────────────────────────────────────────────────┤
│ OVERALL RISK: [LOW / MEDIUM / HIGH / CRITICAL]               │
├─────────────────────────────────────────────────────────────┤
│ Top 3 Actions:                                               │
│ 1. [Most critical action]                                    │
│ 2. [Second priority]                                         │
│ 3. [Third priority]                                          │
└─────────────────────────────────────────────────────────────┘

Quick Commands

# Security scan
npm audit --json | jq '.vulnerabilities | keys[]'
snyk test --json

# Find outdated packages
npm outdated
pip list --outdated

# Check specific package health
npm view [package] time modified
npm view [package] maintainers

# License check
npx license-checker --production --onlyAllow "MIT;ISC;Apache-2.0;BSD-3-Clause"

# Find who depends on a package
npm ls [package]

# Dependency tree visualization
npx npm-remote-ls [package]

# Check for deprecation
npm view [package] deprecated

Resources

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です