How mathivadhanis505/cve_test works
CVE-Patcher automates dependency vulnerability remediation: a scan records findings, the patcher selects unpatched findings, updates dependencies on dedicated branches, and opens pull requests for maintainer review. PostgreSQL stores scan and patch history; Slack provides a separate digest capability. The README documents scheduled/manual Actions and repository selection, but the supplied excerpts do not show the workflow wiring or the Lambda handler’s behavior, so those connections are documented rather than inferred from source.
Main entry points: crud.py Database operations · trivy_runner.py Trivy scanner · main.py Patch orchestrator · branch_creator.py Branch creator
Components 19
Vulnerability scanning
- Repository configuration
config/repos.yml - Trivy scanner
scanner/trivy_runner.py - CVE classifier
scanner/cve_classifier.py - Severity thresholds
config/thresholds.yml - Manifest parsers
scanner/ecosystem.py
Patch remediation
- Patch orchestrator
patcher/main.py - Version bumper
patcher/version_bumper.py - Branch creator
patcher/branch_creator.py - Pull request manager
patcher/pr_manager.py
Scan and patch records
- Database operations
db/crud.py - Run and patch models
db/models.py - Database sessions
db/session.py - PostgreSQL
Notifications
- Slack digest
notify/slack_digest.py
Other components
- GitHub Actions
- Target repository
- GitHub
- Slack webhook
- Maintainer
Connections 22
- GitHub Actions → Repository configuration: selects repositories
README.md - GitHub Actions → Trivy scanner: starts scans
README.md - Repository configuration → Trivy scanner: configures targets
README.md - Trivy scanner → Target repository: scans filesystem
scanner/trivy_runner.py - Trivy scanner → Database operations: records findings
scanner/trivy_runner.py - Trivy scanner → CVE classifier: classifies findings
scanner/cve_classifier.py - CVE classifier → Severity thresholds: loads rules
scanner/cve_classifier.py - Patch orchestrator → Database operations: loads findings
patcher/main.py - Patch orchestrator → Branch creator: creates patch branch
patcher/main.py - Branch creator → Version bumper: updates dependency
patcher/branch_creator.py - Branch creator → Target repository: clones and pushes
patcher/branch_creator.py - Branch creator → GitHub: checks branch
patcher/branch_creator.py - Patch orchestrator → Pull request manager: opens pull request
patcher/main.py - Pull request manager → GitHub: creates pull request
patcher/pr_manager.py - Patch orchestrator → Database operations: stores patch history
patcher/main.py - Database operations → Run and patch models: queries records
db/crud.py - Database operations → Database sessions: uses sessions
db/crud.py - Database sessions → PostgreSQL: connects
db/session.py - Slack digest → Database operations: reads run statistics
notify/slack_digest.py - Slack digest → Run and patch models: reads latest run
notify/slack_digest.py - Slack digest → Slack webhook: posts digest
notify/slack_digest.py - GitHub → Maintainer: presents pull request
README.md