Dependency Audit Command
Audit dependencies for security vulnerabilities
Instructions
Perform a comprehensive dependency audit following these steps:
-
Dependency Discovery
- Identify all dependency management files (package.json, requirements.txt, Cargo.toml, pom.xml, etc.)
- Map direct vs transitive dependencies
- Check for lock files and version consistency
- Review development vs production dependencies
-
Version Analysis
- Check for outdated packages and available updates
- Identify packages with major version updates available
- Review semantic versioning compliance
- Analyze version pinning strategies
-
Security Vulnerability Scan
- Run security audits using appropriate tools:
npm audit for Node.js projects
pip-audit for Python projects
cargo audit for Rust projects
- GitHub security advisories for all platforms
- Identify critical, high, medium, and low severity vulnerabilities
- Check for known exploits and CVE references
-
License Compliance
- Review all dependency licenses for compatibility
- Identify restrictive licenses (GPL, AGPL, etc.)
- Check for license conflicts with project license
- Document license obligations and requirements
-
Dependency Health Assessment
- Check package maintenance status and activity
- Review contributor count and community support
- Analyze release frequency and stability
- Identify abandoned or deprecated packages
-
Size and Performance Impact
- Analyze bundle size impact of each dependency
- Identify large dependencies that could be optimized
- Check for duplicate functionality across dependencies
- Review tree-shaking and dead code elimination effectiveness
-
Alternative Analysis
- Identify dependencies with better alternatives
- Check for lighter or more efficient replacements
- Analyze feature overlap and consolidation opportunities
- Review native alternatives (built-in functions vs libraries)
-
Dependency Conflicts
- Check for version conflicts between dependencies
- Identify peer dependency issues
- Review dependency resolution strategies
- Analyze potential breaking changes in updates
-
Build and Development Impact
- Review dependencies that affect build times
- Check for development-only dependencies in production
- Analyze tooling dependencies and alternatives
- Review optional dependencies and their necessity
-
Supply Chain Security
- Check for typosquatting and malicious packages
- Review package authenticity and signatures
- Analyze dependency sources and registries
- Check for suspicious or unusual dependencies
-
Update Strategy Planning
- Create a prioritized update plan based on security and stability
- Identify breaking changes and required code modifications
- Plan for testing strategy during updates
- Document rollback procedures for problematic updates
-
Monitoring and Automation
- Set up automated dependency scanning
- Configure security alerts and notifications
- Review dependency update automation tools
- Establish regular audit schedules
-
Documentation and Reporting
- Create a comprehensive dependency inventory
- Document all security findings with remediation steps
- Provide update recommendations with priority levels
- Generate executive summary for stakeholders
Use platform-specific tools and databases for the most accurate results. Focus on actionable recommendations with clear risk assessments.