A comprehensive tool for analyzing NPM dependency vulnerabilities and providing clear, actionable upgrade recommendations. This project combines automated dependency scanning with an intuitive web interface to help developers quickly identify and remediate security issues.
This project provides two main components:
- Automated CI/CD Scanning: GitHub Actions workflow that automatically scans dependencies and generates vulnerability reports
- Interactive Web UI: React-based application for analyzing vulnerability reports with drag-and-drop functionality, providing:
- Minimal upgrade recommendations (which parent packages to upgrade)
- AI-powered summaries (via OpenAI API)
- Full vulnerability tables with export functionality
- Runs
npm auditto detect vulnerabilities - Generates dependency tree with
npm ls - Maps vulnerable packages to their parent dependencies
- Produces CSV reports with actionable insights
- Uploads artifacts for easy access
- Drag & Drop Interface: Simply drop your
npm-audit.jsonandnpm-ls.jsonfiles - Smart Analysis: Identifies which parent packages need upgrading to fix vulnerabilities
- AI Summaries: Optional OpenAI integration for intelligent recommendations
- Full Visibility: Detailed vulnerability table with severity levels and advisory links
- Export Functionality: Download vulnerability data as CSV
- Responsive Design: Works on desktop and mobile devices
- React 17 with TypeScript
- React Hooks for state management
- CSS3 with responsive design
- Modern ES6+ JavaScript
- Node.js for automation scripts
- GitHub Actions for CI/CD
- NPM ecosystem tools
deps-vuln/
├── audit-report-ui/ # React web application
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── DragAndDrop.tsx # File upload component
│ │ │ ├── TableDisplay.tsx # Vulnerability table
│ │ │ ├── ExportButton.tsx # CSV export
│ │ │ └── ThemeToggle.tsx # Theme switcher
│ │ ├── utils/ # Utility functions
│ │ │ ├── aiAnalysis.ts # AI-powered analysis
│ │ │ └── npmApi.ts # NPM registry API
│ │ ├── styles/ # CSS stylesheets
│ │ ├── App.tsx # Main app component
│ │ └── index.tsx # Entry point
│ ├── public/ # Static assets
│ └── package.json # Dependencies & scripts
├── scripts/
│ └── find-vulnerable-parents.js # CI script for analysis
├── .github/workflows/
│ └── dependency-scan.yml # GitHub Actions workflow
├── package.json # Root package config
└── README.md # This file
- Node.js 18+ and npm
- Git
-
Clone the repository
git clone https://github.com/pappater/deps-vuln.git cd deps-vuln -
Install dependencies
cd audit-report-ui npm install -
Run the development server
npm start
The app will open at
http://localhost:3000 -
Build for production
npm run build
-
Generate audit files in your project:
npm audit --json > npm-audit.json npm ls --json > npm-ls.json
-
Open the web application at https://pappater.github.io/deps-vuln/
-
Drag and drop both JSON files into the upload area
-
Review the analysis:
- Minimal Upgrade Summary: Shows which parent packages to upgrade
- LLM Summary (optional): Get AI-powered recommendations using your OpenAI API key
- Vulnerability Table: Full details of all vulnerabilities
-
Export results as CSV if needed
The workflow runs automatically on push/PR to main branch:
- Scans dependencies with
npm audit - Generates dependency tree
- Maps vulnerabilities to parent packages
- Uploads artifacts (CSV and JSON reports)
Access artifacts from the Actions tab in GitHub.
This project is deployed to GitHub Pages automatically.
cd audit-report-ui
npm run deployThis will:
- Build the production app
- Deploy to the
gh-pagesbranch - Make it available at the configured homepage URL
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React and TypeScript
- Inspired by the need for better npm vulnerability analysis tools
- Uses the NPM registry API for package information
- Optional OpenAI integration for intelligent summaries
Project Link: https://github.com/pappater/deps-vuln
Note: This is a demo project showcasing automated dependency scanning and vulnerability analysis. Always verify security recommendations before applying them to production systems.