How rivian/ai-sast works
AI-SAST scans repository code with a configurable AI backend, optionally validates findings, and produces reports or PR comments. Its principal workflow is PR-triggered diff scanning or a manual full scan; a separate feedback workflow stores developer labels for use as context in later scans. The graph preserves the major documented scan, validation, reporting, feedback, and backend capabilities. Some wiring is based on the source index or README because the relevant implementation was not fully excerpted; uncertain connections are omitted.
Main entry points: scanner.py Code scanner · pr_scan.py PR scan · validator.py Finding validator · full_scan.py Full scan
Components 18
Scan entry points
- PR scan
src/main/pr_scan.py - Full scan
src/main/full_scan.py - Feedback collection
src/main/collect_feedback.py
Analysis pipeline
- Code scanner
src/core/scanner.py - Finding validator
src/core/validator.py - Report generator
src/core/report.py - Scan configuration
src/core/config.py
AI and context
- Vertex AI client
src/core/vertex.py - Bedrock client
src/integrations/bedrock.py - Ollama client
src/integrations/ollama.py - Jira context
src/integrations/jira.py - Vector integration
src/integrations/vector.py - Notifications
src/integrations/notifications.py
Feedback and storage
- Feedback client
src/integrations/feedback.py - SQLite scan store
src/integrations/scan_database.py - Databricks store
src/integrations/databricks.py
Other components
- Developer
- GitHub repository
Connections 29
- Developer → GitHub repository: opens PR
README.md - GitHub repository → PR scan: triggers scan
README.md - Developer → Full scan: starts manually
README.md - GitHub repository → Full scan: provides repository
- GitHub repository → Feedback collection: triggers collection
README.md - PR scan → Code scanner: scans changed files
src/main/pr_scan.py - Full scan → Code scanner: scans repository
src/main/full_scan.py - PR scan → Finding validator: validates findings
src/main/pr_scan.py - PR scan → Report generator: generates report
src/main/pr_scan.py - Full scan → Report generator: generates report
src/main/full_scan.py - PR scan → GitHub repository: posts comments
README.md - Code scanner → Scan configuration: reads settings
src/core/scanner.py - Finding validator → Scan configuration: reads settings
src/core/validator.py - Code scanner → Vertex AI client: uses backend
src/core/scanner.py - Code scanner → Bedrock client: uses backend
src/core/scanner.py - Code scanner → Ollama client: uses backend
src/core/scanner.py - Finding validator → Vertex AI client: uses backend
src/core/validator.py - Finding validator → Bedrock client: uses backend
src/core/validator.py - Finding validator → Ollama client: uses backend
src/core/validator.py - Code scanner → Jira context: fetches context
src/core/scanner.py - Code scanner → Feedback client: loads context
src/core/scanner.py - Finding validator → Feedback client: loads context
src/core/validator.py - Feedback collection → Feedback client: stores labels
src/main/collect_feedback.py - Feedback client → SQLite scan store: selects backend
src/integrations/feedback.py - Feedback client → Databricks store: selects backend
src/integrations/feedback.py - PR scan → SQLite scan store: stores findings
src/main/pr_scan.py - Full scan → SQLite scan store: stores findings
src/main/full_scan.py - PR scan → Notifications: sends alerts
src/main/pr_scan.py - Code scanner → Vector integration: uses embeddings