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.
Install with Tessl CLI
npx tessl i github:ArabelaTso/Skills-4-SE --skill cve-reachability-analyzer88
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
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.
Collect and validate the required information:
Repository analysis:
CVE information:
Configuration information (optional):
Check if the vulnerable dependency exists in the project:
Parse dependency files:
Version matching:
Early exit:
Determine if vulnerable components are imported:
Search for imports:
Language-specific patterns:
Assessment:
Identify if vulnerable code is invoked:
Direct usage analysis:
Indirect usage analysis:
Build call graph:
Use pattern library:
Check for dynamic code execution that may reach vulnerable code:
Reflection/metaprogramming:
Class.forName(), Python: getattr(), etc.)Dynamic loading:
importlib, JS: require(variable))Eval and code generation:
eval(), exec(), Function() constructorDetermine if vulnerable code is gated by configuration:
Feature flags:
Environment-specific code:
Build-time conditionals:
Runtime configuration:
Determine if the code path is actually executed:
Dead code detection:
Test-only code:
Error handling paths:
Entry point analysis:
Apply classification criteria from cve_analysis.md:
Likely Reachable - All of:
Possibly Reachable - One or more of:
Likely Unreachable - One or more of:
For each CVE, provide comprehensive assessment:
Classification: Likely Reachable / Possibly Reachable / Likely Unreachable
Confidence level: High / Medium / Low
Supporting evidence:
Reasoning:
Uncertainty factors:
Recommendations:
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`
```language
import vulnerable_packageCall chain:
main() in src/app.py:10process_request() in src/handlers.py:45vulnerable_function() in vulnerable_package:100Configuration:
enable_feature_x (state: enabled in production)[Explain why this classification was chosen, referencing the evidence above]
[Describe any uncertainties, unknowns, or limitations]
[Repeat for each CVE]
Methodology:
Limitations:
Assumptions:
## Important Guidelines
1. **Do not assume exploitability**: Reachability ≠ exploitability. Focus on whether code is reached, not whether it can be exploited.
2. **Justify conclusions**: Every classification must be supported by evidence from the codebase.
3. **Be conservative with "Likely Reachable"**: Only use when evidence is strong and clear.
4. **Acknowledge uncertainty**: When analysis is limited by dynamic behavior, configuration, or complexity, state this clearly.
5. **Distinguish test vs. production**: Usage in test files should not count as production reachability.
6. **Consider configuration**: Code may be present but disabled by configuration.
7. **Check transitive dependencies**: Vulnerable code may be reached through multiple layers.
8. **Language-specific analysis**: Use appropriate analysis techniques for each language.
9. **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**:
1. Parse `pom.xml` to find log4j version
2. Check if version is in vulnerable range
3. Search for log4j imports in Java files
4. Find calls to vulnerable `lookup()` method
5. Trace call chains from HTTP endpoints
6. Check if JNDI lookup is enabled in configuration
7. Classify as "Likely Reachable" with high confidence
8. Provide evidence: import locations, call paths, configuration
9. Recommend immediate upgrade to fixed version
## References
- [reachability_patterns.md](references/reachability_patterns.md) - Common code patterns and their reachability implications
- [language_guide.md](references/language_guide.md) - Language-specific analysis techniques
- [cve_analysis.md](references/cve_analysis.md) - CVE analysis framework and classification criteria
## Limitations
- Static analysis cannot capture all runtime behavior
- Dynamic code execution may not be fully traceable
- Configuration state may differ between repository and production
- Transitive dependencies may have complex interaction patterns
- Obfuscated or minified code is difficult to analyze
- Some framework magic (AOP, bytecode manipulation) may be missed0f00a4f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.