This is a submission for the GitHub Copilot CLI Challenge
The "Dependency Hell" Nightmare ๐ฑ
It's 4:55 PM on a Friday. You're about to deploy.
$ npm audit
found 12 vulnerabilities (2 critical, 5 high)
Panic sets in.
You check the report. The critical vulnerability isn't even in your code. It's in left-pad-v2, which is a dependency of react-awesome-button, which is a dependency of your UI library...
You are now in Dependency Hell. ๐ฅ
- โ You can't just
npm update(it breaks the UI). - โ You can't remove the package (you need the button).
- โ You spend hours reading GitHub issues from 2019.
- โ You try
npm dedupe,npm audit fix --force... and now your app won't build.
Sound familiar?
The "Aha!" Moment
What if AI could explain vulnerabilities in plain English?
What if it could tell me the business impact ($$$)?
What if it could auto-fix everything in 30 seconds?
Enter DepDoctor ๐ฉบ
๐ฉบ What is DepDoctor?
DepDoctor is an AI-powered CLI tool that doesn't just find problemsโit fixes them.
It combines GitHub Copilot's reasoning engine with a smart Tree Repair System to surgically remove vulnerabilities from your node_modules without breaking your app.
The "Killer Feature": Smart Tree Repair ๐ณ
Most tools stop at "You have a problem." DepDoctor says, "I fixed it."
The Smart Tree Repair uses a multi-stage process to resolve "Dependency Hell":
- Deep Scan: Finds vulnerabilities nested 10 layers deep.
- Safe Version Resolution: Finds the exact version of the sub-dependency that fixes the CVE.
- Surgical Override: Automatically modifies your
package.jsonwith anoverrides(orresolutions) field to force only the vulnerable package to update, keeping the rest of the chain intact. - Auto-Dedupe: Flattens your tree to remove duplicate vulnerable copies.
The Result?
You type depdoctor --fix-all, and that unfixable nested vulnerability vanishes. โจ
๐ค Copilot: Your Security Analyst
DepDoctor uses GitHub Copilot CLI to translate "Security Speak" into "Business Speak".
Instead of:
CVE-2024-1234: Prototype pollution in object serialization...
DepDoctor shows:
๐ค Copilot Analysis:
"Attackers can crash your server by sending malformed JSON.
Business Impact: High risk of DoS attack during peak traffic (est. loss $10k/hour)."
It prioritizes fixes based on actual risk, not just scary red text.
The Demo That Made My Team Go "๐ฎ"
$ depdoctor
๐ฉบ DepDoctor - Analyzing dependencies...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ DEPENDENCY HEALTH REPORT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Overall Score: 68/100 ๐ก (Needs Attention)
๐ด CRITICAL (2 vulnerabilities)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ lodash@4.17.21 โ
โ CVE-2021-23337 - Prototype Pollution โ
โ โ
โ ๐ค Copilot Explains: โ
โ "Attacker can modify object properties, โ
โ leading to Remote Code Execution" โ
โ โ
โ ๐ฐ Business Impact: $50,000+ breach โ
โ โ
โ โ
Fix: npm install lodash@latest โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Apply fixes? [y/N]: y
โ
Fixed 2 critical vulnerabilities in 30 seconds!
New Score: 92/100 ๐ข
No more Googling CVE numbers at midnight!
๐ See It In Action
1. The Audit
$ depdoctor
๐ฉบ DepDoctor - Analyzing dependencies...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ DEPENDENCY HEALTH REPORT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ด CRITICAL: deep-merge-util
In: ui-lib > button > utils > deep-merge-util
๐ค Copilot says: "Allows Remote Code Execution (RCE)."
๐ฐ Risk: Critical Data Breach
Dependencies stuck in Hell? 2
2. The Cure
$ depdoctor --fix-all
๐ณ Activating Smart Tree Repair...
โข Running npm dedupe... Done.
โข Isolating nested vulnerability: deep-merge-util
โข Calculating safe override version... found v2.1.0
โข Applying surgical override to package.json...
โข Re-installing dependencies...
โ
DEPENDENCY HELL RESOLVED.
2 Nested Vulnerabilities Fixed.
0 Breaking Changes Detected.
Get back to your weekend! ๐ป
Why This Exists
The Problem
Developers waste 15-20 hours/week on dependency hell:
- โ npm audit shows 47 vulnerabilities... which ones matter?
- โ Outdated packages... which will break my app?
- โ Unused deps... how much am I wasting?
- โ Hours spent Googling CVEs and reading changelogs
๐ ๏ธ How It Works (Under the Hood)
โโโโโโโโโโโโโโโ
โ Your Projectโ
โโโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ npm audit โ โ Scan vulnerabilities
โ npm outdated โ โ Find outdated packages
โ Code Scanner โ โ Detect unused deps
โโโโโโโโฌโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GitHub Copilot CLI โ
โ โข Explain vulnerabilitiesโ โ AI magic here! ๐ค
โ โข Assess business impact โ
โ โข Generate fixes โ
โ โข Create migration guidesโ
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Beautiful Reportโ โ You see this! ๐จ
โ + Auto-fix โ
โโโโโโโโโโโโโโโโโโโ
For the nerds like me, here's how the Tree Fixer works (src/fixers/tree-fixer.ts):
// 1. Identify nested vulnerabilities
const nestedVulns = analysis.vulnerabilities.filter(v => !v.isDirect);
// 2. Copilot determines the safe patch version
const overrides = {};
for (const vuln of nestedVulns) {
const safeVer = await copilot.findSafeVersion(vuln);
overrides[vuln.name] = safeVer;
}
// 3. Apply 'overrides' to package.json (works for npm 8+)
packageJson.overrides = { ...packageJson.overrides, ...overrides };
await fs.writeFile('package.json', JSON.stringify(packageJson));
It leverages the native overrides feature of npm (and resolutions for yarn) but automates the tedious, error-prone part: figuring out what to override and to what version to avoid breaking changes.
Real Impact: Before vs After
Before DepDoctor:
Friday 11 PM: npm audit shows 12 vulnerabilities
Friday 11:05 PM: Google "CVE-2021-23337"
Friday 11:30 PM: Still reading security advisories
Saturday 2 AM: Finally fix 2 critical issues
Monday: Boss asks "why was the site down?"
After DepDoctor:
Friday 11 PM: depdoctor
Friday 11:01 PM: See AI explanations
Friday 11:01 PM: Press 'y' to auto-fix
Friday 11:02 PM: Done. Score: 92/100 ๐ข
Friday 11:03 PM: Sleep like a baby ๐ด
Time saved: 3 hours โ 2 minutes โฐ
Screenshots
Try It Yourself
From source:
git clone https://github.com/Aryakoste/depDoctor
cd depDoctor
npm install && npm run build
npm link
depdoctor
Cool Features You Might Miss
1. Health History Tracking
$ depdoctor history
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโ
โ Date โ Score โ Critical โ High โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโค
โ 2/15/2026, 1:00 PM โ 92/100๐ขโ 0 โ 1 โ
โ 2/14/2026, 11:00 PM โ 68/100๐กโ 2 โ 5 โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโ
๐ Score improved by 24 points!
2. CI/CD Integration
# .github/workflows/security.yml
- name: Check Dependencies
run: |
npm install -g depdoctor
depdoctor --ci --threshold critical
# Fails build if critical vulns found
3. Migration Guides for Updates
๐ก react: 17.0.2 โ 18.3.1
๐ค Copilot Migration:
1. Update package.json
2. Replace ReactDOM.render() โ createRoot()
3. Remove deprecated lifecycle methods
โฐ Est. time: 2 hours
What dependency horror stories do you have? Share in the comments! ๐ฌ
Made with โค๏ธ and GitHub Copilot CLI


Top comments (0)