dependency-scanner
Comprehensive dependency scanning, inventory generation, and SBOM creation for migration readiness assessment
What this skill does
# Dependency Scanner Skill
Performs comprehensive dependency scanning and inventory generation for codebases, supporting migration planning and security assessments through SBOM (Software Bill of Materials) generation.
## Purpose
Enable comprehensive dependency management for:
- Direct and transitive dependency extraction
- Dependency tree visualization
- Version conflict detection
- Circular dependency identification
- License extraction and compliance
- SBOM generation (CycloneDX, SPDX formats)
## Capabilities
### 1. Direct/Transitive Dependency Extraction
- Parse package manifests (package.json, pom.xml, requirements.txt, etc.)
- Resolve full dependency trees including transitive dependencies
- Identify version constraints and resolution results
- Track dependency sources and registries
### 2. Dependency Tree Visualization
- Generate hierarchical dependency graphs
- Export to DOT, JSON, or Mermaid formats
- Highlight problematic paths
- Calculate tree depth and breadth metrics
### 3. Version Conflict Detection
- Identify version conflicts in dependency trees
- Detect peer dependency violations
- Find incompatible version ranges
- Suggest resolution strategies
### 4. Circular Dependency Identification
- Detect circular dependency chains
- Map dependency cycles
- Assess impact of circular dependencies
- Recommend breaking strategies
### 5. License Extraction
- Extract license information from dependencies
- Identify license types (MIT, Apache, GPL, etc.)
- Flag copyleft licenses
- Track dual-licensed packages
### 6. SBOM Generation
- Generate CycloneDX format SBOMs
- Generate SPDX format SBOMs
- Include vulnerability references
- Support machine-readable and human-readable outputs
## Tool Integrations
This skill can leverage the following external tools when available:
| Tool | Purpose | Integration Method |
|------|---------|-------------------|
| npm/yarn/pnpm | Node.js dependencies | CLI |
| Maven | Java dependencies | CLI |
| Gradle | Java/Kotlin dependencies | CLI |
| pip/pipenv/poetry | Python dependencies | CLI |
| Bundler | Ruby dependencies | CLI |
| Cargo | Rust dependencies | CLI |
| Go Modules | Go dependencies | CLI |
| Snyk | Security scanning | CLI / API |
| OWASP Dependency-Check | Vulnerability scanning | CLI |
| Trivy | SBOM generation | MCP Server / CLI |
| Syft | SBOM generation | CLI |
## Usage
### Basic Scanning
```bash
# Invoke skill for dependency scanning
# The skill will auto-detect package managers and scan accordingly
# Expected inputs:
# - targetPath: Path to project root
# - scanDepth: 'direct' | 'transitive' | 'full'
# - outputFormat: 'json' | 'tree' | 'sbom-cyclonedx' | 'sbom-spdx'
# - includeLicenses: boolean
```
### Scanning Workflow
1. **Detection Phase**
- Identify package managers in use
- Locate manifest files
- Check for lock files
2. **Extraction Phase**
- Parse manifest files
- Resolve dependency trees
- Extract version information
3. **Analysis Phase**
- Detect conflicts
- Identify circular dependencies
- Extract licenses
4. **Output Generation**
- Generate inventory reports
- Create SBOMs if requested
- Produce visualization artifacts
## Output Schema
```json
{
"scanId": "string",
"timestamp": "ISO8601",
"target": {
"path": "string",
"packageManagers": ["string"],
"manifestFiles": ["string"]
},
"summary": {
"totalDependencies": "number",
"directDependencies": "number",
"transitiveDependencies": "number",
"uniquePackages": "number",
"treeDepth": "number"
},
"dependencies": [
{
"name": "string",
"version": "string",
"type": "direct|transitive",
"parent": "string|null",
"license": "string",
"repository": "string",
"depth": "number"
}
],
"conflicts": [
{
"package": "string",
"versions": ["string"],
"sources": ["string"],
"recommendation": "string"
}
],
"circularDependencies": [
{
"chain": ["string"],
"severity": "high|medium|low"
}
],
"licenses": {
"summary": {
"MIT": "number",
"Apache-2.0": "number",
"GPL-3.0": "number"
},
"copyleft": ["string"],
"unknown": ["string"]
},
"sbom": {
"format": "cyclonedx|spdx",
"version": "string",
"path": "string"
}
}
```
## Integration with Migration Processes
This skill integrates with the following Code Migration/Modernization processes:
- **dependency-analysis-updates**: Primary tool for dependency assessment
- **legacy-codebase-assessment**: Dependency inventory for legacy systems
- **framework-upgrade**: Compatibility analysis for upgrades
- **cloud-migration**: Dependency portability assessment
## Configuration
### Skill Configuration File
Create `.dependency-scanner.json` in the project root:
```json
{
"packageManagers": ["auto"],
"excludePaths": ["node_modules", ".git"],
"scanDepth": "full",
"includeDev": true,
"includeOptional": false,
"licensePolicy": {
"allowed": ["MIT", "Apache-2.0", "BSD-3-Clause", "ISC"],
"flagged": ["GPL-3.0", "AGPL-3.0"],
"blocked": []
},
"sbomConfig": {
"format": "cyclonedx",
"version": "1.5",
"includeVulnerabilities": true
}
}
```
## MCP Server Integration
When Trivy SBOM Generator MCP Server is available:
```javascript
// Example MCP tool invocation
{
"tool": "trivy_generate_sbom",
"arguments": {
"target": "./",
"format": "cyclonedx",
"output": "./sbom.json"
}
}
```
When GitHub Dependabot MCP Server is available:
```javascript
// Example dependency update check
{
"tool": "dependabot_check_updates",
"arguments": {
"repo": "owner/repo",
"ecosystem": "npm"
}
}
```
## Package Manager Support
### Node.js (npm/yarn/pnpm)
```bash
# Auto-detected files:
# - package.json
# - package-lock.json
# - yarn.lock
# - pnpm-lock.yaml
```
### Java (Maven/Gradle)
```bash
# Auto-detected files:
# - pom.xml
# - build.gradle
# - build.gradle.kts
```
### Python (pip/pipenv/poetry)
```bash
# Auto-detected files:
# - requirements.txt
# - Pipfile
# - pyproject.toml
# - setup.py
```
### Ruby (Bundler)
```bash
# Auto-detected files:
# - Gemfile
# - Gemfile.lock
```
### Go (Modules)
```bash
# Auto-detected files:
# - go.mod
# - go.sum
```
### Rust (Cargo)
```bash
# Auto-detected files:
# - Cargo.toml
# - Cargo.lock
```
## Best Practices
1. **Lock File Usage**: Always include lock files for reproducible scans
2. **Regular Scanning**: Integrate into CI/CD for continuous monitoring
3. **SBOM Storage**: Store SBOMs alongside releases for compliance
4. **License Reviews**: Review license changes in dependency updates
5. **Conflict Resolution**: Address version conflicts before migration
## Related Skills
- `vulnerability-scanner`: Security scanning of dependencies
- `license-compliance-checker`: Detailed license analysis
- `dependency-updater`: Automated dependency updates
## Related Agents
- `dependency-modernization-agent`: Uses this skill for dependency management
- `migration-readiness-assessor`: Uses this skill for readiness evaluation
- `security-vulnerability-assessor`: Uses this skill for dependency security
## References
- [SBOM Generator MCP Server (Trivy)](https://playbooks.com/mcp/trivy-sbom-generator)
- [GitHub Dependabot MCP Server](https://mcp.so/server/github-dependabot-mcp-server)
- [Renovate](https://github.com/renovatebot/renovate)
- [OWASP Dependency-Check](https://github.com/jeremylong/DependencyCheck)
- [CycloneDX Specification](https://cyclonedx.org/)
- [SPDX Specification](https://spdx.dev/)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.