LLM Skills
~/catalog/security//deps-audit
SecurityGitHub source

Dependency audit and security analysis

/deps-audit

The user needs comprehensive dependency analysis to identify security vulnerabilities, licensing conflicts, and maintenance risks in their project dep

wshobsonwshobson
2.6k
October 12, 2025
// skill content

--- model: claude-sonnet-4-0 --- # Dependency Audit and Security Analysis You are a dependency security expert specializing in vulnerability scanning, license compliance, and supply chain security. Analyze project dependencies for known vulnerabilities, licensing issues, outdated packages, and provide actionable remediation strategies. ## Context The user needs comprehensive dependency analysis to identify security vulnerabilities, licensing conflicts, and maintenance risks in their project dependencies. Focus on actionable insights with automated fixes where possible. ## Requirements $ARGUMENTS ## Instructions ### 1. Dependency Discovery Scan and inventory all project dependencies: Multi-Language Detection ``python import os import json import toml import yaml from pathlib import Path class DependencyDiscovery: def __init__(self, project_path): self.project_path = Path(project_path) self.dependency_files = { 'npm': ['package.json', 'package-lock.json', 'yarn.lock'], 'python': ['requirements.txt', 'Pipfile', 'Pipfile.lock', 'pyproject.toml', 'poetry.lock'], 'ruby': ['Gemfile', 'Gemfile.lock'], 'java': ['pom.xml', 'build.gradle', 'build.gradle.kts'], 'go': ['go.mod', 'go.sum'], 'rust': ['Cargo.toml', 'Cargo.lock'], 'php': ['composer.json', 'composer.lock'], 'dotnet': ['*.csproj', 'packages.config', 'project.json'] } def discover_all_dependencies(self): """ Discover all dependencies across different package managers """ dependencies = {} # NPM/Yarn dependencies if (self.project_path / 'package.json').exists(): dependencies['npm'] = self._parse_npm_dependencies() # Python dependencies if (self.project_path / 'requirements.txt').exists(): dependencies['python'] = self._parse_requirements_txt() elif (self.project_path / 'Pipfile').exists(): dependencies['python'] = self._parse_pipfile() elif (self.project_path / 'pyproject.toml').exists(): dependencies['python'] = self._parse_pyproject_toml() # Go dependencies if (self.project_path / 'go.mod').exists(): dependencies['go'] = self._parse_go_mod() return dependencies def _parse_npm_dependencies(self): """ Parse NPM package.json and lock files """ with open(self.project_path / 'package.json', 'r') as f: package_json = json.load(f) deps = {} # Direct dependencies for dep_type in ['dependencies', 'devDependencies', 'peerDependencies']: if dep_type in package_json: for name, version in package_json[dep_type].items(): deps[name] = { 'version': version, 'type': dep_type, 'direct': True } # Parse lock file for exact versions if (self.project_path / 'package-lock.json').exists(): with open(self.project_path / 'package-lock.json', 'r') as f: lock_data = json.load(f) self._parse_npm_lock(lock_data, deps) return deps ` **Dependency Tree Analysis** `python def build_dependency_tree(dependencies): """ Build complete dependency tree including transitive dependencies """ tree = { 'root': { 'name': 'project', 'version': '1.0.0', 'dependencies': {} } } def add_dependencies(node, deps, visited=None): if visited is None: visited = set() for dep_name, dep_info in deps.items(): if dep_name in visited: # Circular dependency detected node['dependencies'][dep_name] = { 'circular': True, 'version': dep_info['version'] } continue visited.add(dep_name) node['dependencies'][dep_name] = { 'version': dep_info['version'], 'type': dep_info.get('type', 'runtime'), 'dependencies': {} } # Recursively add transitive dependencies if 'dependencies' in dep_info: add_dependencies( node['dependencies'][dep_name], dep_info['dependencies'], visited.copy() ) add_dependencies(tree['root'], dependencies) return tree ` ### 2. Vulnerability Scanning Check dependencies against vulnerability databases: **CVE Database Check** ``python import requests from datetime import datetime class VulnerabilityScanner: def init(self):

// original public source
wshobson/commands
/tools/deps-audit.md
License: License not specified. Review the repository before reusing it.
Independent project, not affiliated with Anthropic. This skill remains the property of its original author.
// install this skill
Paste this command in your terminal at the root of your project:
mkdir -p .claude/commands && curl -o ".claude/commands/deps-audit.md" "https://raw.githubusercontent.com/wshobson/commands/main/tools/deps-audit.md"
Then in Claude Code, type /deps-audit to activate it.
open_in_newOpen original source
// save
Save available after sign in.
loginSign in to save
// information
Creatorwshobson
Stars 2.6k
CategorySecurity
UpdatedOctober 12, 2025
Format.md
AccessFree
// similar

Skills Security

View allarrow_forward