How razaa-py/smart-contract-vulnerability-agent works
This is a Flask-based smart-contract vulnerability review app. A user submits Solidity source in the browser; the route runs static analysis, passes its findings and source to AI review, then renders both findings and the review. Static analysis combines custom rule detectors with Slither, while the AI path builds contract context and verifies the model’s response. The excerpts show these entry-point relationships, but omit parts of detectors.py, so internal rule and prompt-processing links are kept at a high level.
Main entry points: app.py Flask route and results · detectors.py Unified analyzer
Components 8
Web interface
- Flask route and results
app.py
Static analysis
- Unified analyzer
detectors.py - Rule detectors
detectors.py - Slither tool
AI review
- AI review pipeline
detectors.py - Ollama model service
- Response verification
detectors.py
Other components
- Contract reviewer
Connections 8
- Contract reviewer → Flask route and results: submits source
- Flask route and results → Unified analyzer: analyzes source
- Unified analyzer → Rule detectors: runs rules
- Unified analyzer → Slither tool: invokes analysis
- Flask route and results → AI review pipeline: requests review
- AI review pipeline → Ollama model service: sends prompt
- AI review pipeline → Response verification: verifies response
- Flask route and results → Contract reviewer: renders results