返回顶部
d

dependency-autopsy

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
262
下载量
0
收藏
概述
安装方式
版本历史

dependency-autopsy

# Dependency Autopsy > "Every dependency is a bet: you're betting that someone you've never met will maintain code you've never read for as long as you need it. How much do you actually know about those bets?" ## What It Does `npm audit` tells you about known vulnerabilities. `npm outdated` tells you about version drift. Neither tells you the things that actually matter: - Is the maintainer still actively working on this? - When was the last meaningful commit (not just a CI config tweak)? - How many of this package's 14,000 lines do you actually use? - If this package disappears tomorrow, how hard is the replacement? - Does this package pull in 47 transitive dependencies for one utility function? - Is this package's bus factor literally 1? Dependency Autopsy performs a **full health examination** of every dependency in your tree and produces a risk-adjusted report. ## The Autopsy Report Card Each dependency receives a health score across seven vital signs: ### Vital 1: Pulse (Activity) Is this project alive? | Signal | Healthy | Warning | Critical | |---|---|---|---| | Last meaningful commit | < 3 months | 3-12 months | > 12 months | | Open issue response time | < 1 week | 1-4 weeks | > 4 weeks or never | | Release frequency | Regular | Slowing | Stopped | | CI status | Passing | Flaky | Failing or absent | | Open PRs with no review | < 5 | 5-20 | > 20 | ``` "Last meaningful commit" means a commit that changes source code. Dependency bumps, CI tweaks, and README updates don't count. A project can look active while being effectively abandoned. ``` ### Vital 2: Bus Factor (Maintainer Health) How many people would need to disappear for this project to die? | Signal | Healthy | Warning | Critical | |---|---|---|---| | Unique committers (last year) | > 5 | 2-5 | 1 | | Has org ownership (not personal) | Yes | - | No (personal repo) | | Has multiple npm/PyPI publishers | Yes | - | No (single publisher) | | Corporate backing | Yes | Informal | None | | Succession plan visible | Yes | Unclear | No | ### Vital 3: Bloat Factor (Weight) How much of this package do you actually use? ``` ANALYSIS: ├── Total package size: 2.4 MB ├── Exports used by your code: 3 of 147 (2%) ├── Tree-shakeable: No ├── Transitive dependencies: 23 ├── Transitive dependencies YOU also use directly: 2 │ └── (the other 21 exist solely because of this package) ├── Estimated bundle impact: +340 KB └── Could be replaced with: ~30 lines of code VERDICT: You imported an aircraft carrier to cross a creek. ``` ### Vital 4: Replacement Difficulty If this dependency vanished today, how hard is the swap? | Difficulty | Description | Example | |---|---|---| | **Trivial** | Drop-in alternative exists, or you can inline the code | `left-pad` → 1 line of code | | **Easy** | Alternative exists with minor API differences | `moment` → `date-fns` (well-documented migration) | | **Moderate** | Alternatives exist but require meaningful refactoring | `Express` → `Fastify` (different middleware model) | | **Hard** | Few alternatives, deeply integrated | `React` → `Vue` (rewrite) | | **Critical** | No alternative, deeply embedded, you're locked in | `Terraform` → ? (vendor lock-in) | ### Vital 5: Version Health Is your version current, and is upgrading safe? ``` ANALYSIS: ├── Your version: 3.2.1 ├── Latest stable: 5.1.0 ├── Versions behind: 2 major, 0 minor ├── Breaking changes between yours and latest: 14 ├── Deprecated APIs you use: 3 (removed in v4+) ├── Security patches you're missing: 1 (medium severity) ├── Estimated upgrade effort: 8 hours └── Risk of staying: Medium (deprecated APIs may break with Node upgrade) ``` ### Vital 6: License Health Are you legally safe? ``` ANALYSIS: ├── Direct dependency license: MIT ✓ ├── Transitive dependency licenses: │ ├── MIT: 19 packages ✓ │ ├── Apache-2.0: 3 packages ✓ │ ├── ISC: 1 package ✓ │ └── GPL-3.0: 1 package ⚠ (copyleft — may require your code to be GPL) └── License compatibility with your project: WARNING — GPL transitive dep ``` ### Vital 7: Dependency Depth How deep does the rabbit hole go? ``` YOUR PACKAGE └── dependency-a (you chose this) ├── dep-a-1 (you didn't choose this) │ ├── dep-a-1-1 (you definitely didn't choose this) │ │ └── dep-a-1-1-1 (nobody chose this) │ └── dep-a-1-2 ├── dep-a-2 └── dep-a-3 └── dep-a-3-1 └── dep-a-3-1-1 └── dep-a-3-1-1-1 (8 levels deep. Welcome to JavaScript.) STATS: ├── Direct dependencies you chose: 24 ├── Total dependency tree: 847 packages ├── Maximum depth: 11 levels ├── Packages with 0 weekly downloads: 3 (why do these exist?) ├── Packages last published > 3 years ago: 12 └── Packages with install scripts (potential risk): 2 ``` ## The Full Autopsy Report ``` ╔══════════════════════════════════════════════════════════════╗ ║ DEPENDENCY AUTOPSY ║ ║ 24 direct / 847 total dependencies ║ ║ Overall Health: B+ (Good, with concerns) ║ ╠══════════════════════════════════════════════════════════════╣ ║ ║ ║ CRITICAL FINDINGS (2): ║ ║ ├── 🔴 image-tools@1.3.0 ║ ║ │ ├── Pulse: DEAD (last commit 26 months ago) ║ ║ │ ├── Bus Factor: 1 (personal GitHub repo) ║ ║ │ ├── You use: 1 of 23 functions (4%) ║ ║ │ ├── Known vulns: 1 (high — prototype pollution) ║ ║ │ └── RECOMMENDATION: Replace with sharp (actively ║ ║ │ maintained, covers your use case). ~2h effort. ║ ║ │ ║ ║ │── 🔴 GPL-3.0 license found in transitive dependency ║ ║ │ ├── Package: obscure-xml-parser@0.1.2 ║ ║ │ ├── Required by: dep-a → dep-a-1 → obscure-xml-parser ║ ║ │ └── RECOMMENDATION: Confirm GPL compatibility or find ║ ║ │ alternative XML parser in dep-a-1. ║ ║ ║ ║ WARNINGS (4): ║ ║ ├── 🟡 lodash@4.17.21 — you use 3 functions. Consider ║ ║ │ individual imports or native replacements (-340KB). ║ ║ ├── 🟡 auth-lib@2.1.0 — 2 major versions behind. ║ ║ │ 3 deprecated APIs in your code. Upgrade: ~8h. ║ ║ ├── 🟡 date-formatter@3.0.0 — bus factor 1, slowing pulse. ║ ║ │ Consider date-fns as insurance. ║ ║ └── 🟡 config-parser@1.0.0 — pulls 21 transitive deps ║ ║ for a 40-line utility. Consider inlining. ║ ║ ║ ║ HEALTHY (18): ║ ║ All vitals green. Active maintenance, healthy bus factor, ║ ║ appropriate usage, compatible licenses. ║ ║ ║ ║ TREE STATS: ║ ║ ├── Duplicate packages (different versions): 7 ║ ║ ├── Total install size: 148 MB ║ ║ ├── Estimated used code: 12 MB (8% of installed) ║ ║ └── Potential size reduction: 89 MB (remove bloat + dupes) ║ ╚══════════════════════════════════════════════════════════════╝ ``` ## When to Invoke - **Before adding a new dependency** — full autopsy before you `npm install` - Monthly health check on existing dependencies - When evaluating whether to upgrade or replace a library - Before a security audit or compliance review - When investigating unexpected bundle size growth - After any `npm audit` report (to go deeper than just CVE numbers) ## Why It Matters The average JavaScript project has 800+ transitive dependencies. The average Python project has 40+. Each one is code you didn't write, didn't review, and don't control — running with the same permissions as your code. `npm audit` tells you about *known* vulnerabilities. Dependency Autopsy tells you about *likely future* problems — abandoned projects, single-maintainer risk, license landmines, and bloat. The vulnerability that hasn't been discovered yet is in the package that nobody's looking at. Zero external dependencies. Zero API calls. Pure package manifest and registry analysis.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 dependency-autopsy-1776235698 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 dependency-autopsy-1776235698 技能

通过命令行安装

skillhub install dependency-autopsy-1776235698

下载 Zip 包

⬇ 下载 dependency-autopsy v1.0.0

文件大小: 4.46 KB | 发布时间: 2026-4-15 23:55

v1.0.0 最新 2026-4-15 23:55
Initial release

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部