Analyze CVE reachability in software repositories by examining how vulnerable dependencies are imported and used. Determines whether vulnerable components, classes, or functions are reachable from project code through call chain analysis, reflection detection, dynamic loading patterns, and configuration-gated behavior. Classifies each CVE as likely reachable, possibly reachable, or likely unreachable with supporting evidence. Use when analyzing security vulnerabilities in dependencies, performing post-disclosure CVE triage, assessing vulnerability impact, or when users ask to analyze CVE reachability, check if vulnerabilities are exploitable, or evaluate dependency security risks.
9k tokens
context cost
the whole folder, loaded on every use
4
files
instructions only
0
copies elsewhere
how many repositories repackaged it
141
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
This skill performs static analysis of software repositories to determine whether disclosed CVEs in dependencies are reachable from the project's code. It analyzes import patterns, call chains, dynamic invocation, and configuration to classify each CVE's reachability with evidence-based justification.
Suggested next steps (upgrade, investigate, monitor)
Additional verification needed
Mitigation options if upgrade not possible
Output Format
Structure the output as follows:
## CVE Reachability Analysis for [Repository Name]
### Summary
- Total CVEs analyzed: X
- Likely reachable: X
- Possibly reachable: X
- Likely unreachable: X
---
### CVE-YYYY-XXXXX: [Vulnerability Title]
**Package**: package-name
**Affected versions**: < X.Y.Z
**Installed version**: X.Y.Z
**Vulnerable component**: `function_name()` or `ClassName`
**Classification**: Likely Reachable | Possibly Reachable | Likely Unreachable
**Confidence**: High | Medium | Low
#### Evidence
**Dependency presence**:
- Found in: `path/to/dependency-file:line`
- Version X.Y.Z is in vulnerable range (< X.Y.Z)
**Import analysis**:
- Imported in: `path/to/file.ext:line`
import vulnerable_package
**Call chain**:
1. Entry point: `main()` in `src/app.py:10`
2. Calls: `process_request()` in `src/handlers.py:45`
3. Calls: `vulnerable_function()` in `vulnerable_package:100`
**Configuration**:
- Feature flag: `enable_feature_x` (state: enabled in production)
- Environment: Used in production code path
#### Reasoning
[Explain why this classification was chosen, referencing the evidence above]
#### Uncertainty
[Describe any uncertainties, unknowns, or limitations]
#### Recommendations
- **Priority**: High | Medium | Low
- **Action**: Upgrade to version X.Y.Z | Investigate further | Monitor
- **Mitigation**: [If upgrade not possible, suggest alternatives]
---
[Repeat for each CVE]
### Analysis Notes
**Methodology**:
- Static analysis of codebase
- Dependency tree analysis
- Call graph construction
- Configuration review
**Limitations**:
- Dynamic behavior not fully captured
- Runtime configuration may differ from repository
- Transitive dependencies may have additional paths
**Assumptions**:
- Production configuration matches [source]
- Build profile is [profile name]
- Feature flags state: [list states]
Important Guidelines
Do not assume exploitability: Reachability ≠ exploitability. Focus on whether code is reached, not whether it can be exploited.
Justify conclusions: Every classification must be supported by evidence from the codebase.
Be conservative with "Likely Reachable": Only use when evidence is strong and clear.
Acknowledge uncertainty: When analysis is limited by dynamic behavior, configuration, or complexity, state this clearly.
Distinguish test vs. production: Usage in test files should not count as production reachability.
Consider configuration: Code may be present but disabled by configuration.
Check transitive dependencies: Vulnerable code may be reached through multiple layers.
Language-specific analysis: Use appropriate analysis techniques for each language.
Provide actionable recommendations: Help users understand what to do next.
10. Document assumptions: Clearly state any assumptions about configuration, environment, or build settings.
Example Usage
User request: "Analyze CVE-2024-12345 affecting log4j in my Java project"
Process:
Parse pom.xml to find log4j version
Check if version is in vulnerable range
Search for log4j imports in Java files
Find calls to vulnerable lookup() method
Trace call chains from HTTP endpoints
Check if JNDI lookup is enabled in configuration
Classify as "Likely Reachable" with high confidence
Provide evidence: import locations, call paths, configuration
Recommend immediate upgrade to fixed version
References
reachability_patterns.md - Common code patterns and their reachability implications