Feature/root cause grouping#150
Open
KolaSailaja wants to merge 2 commits into
Open
Conversation
|
Correct PR TemplatePlease copy and paste the raw template below into your PR description and fill it out: > **Before opening:** make sure there is an issue tracking this work, and link it below. PRs without a linked issue may be closed without review.
## Linked issue
Closes #
## What this PR does
## Type of change
- [ ] Bug fix
- [ ] New feature
- [ ] ML model / training pipeline
- [ ] Refactor (no behaviour change)
- [ ] Documentation
- [ ] Tests only
## ML tier (if applicable)
- [ ] Tier 1 — Triage
- [ ] Tier 2 — Predictive
- [ ] Tier 3 — Autonomous
- [ ] Not ML-related
## Stack affected
- [ ] Backend
- [ ] Frontend
- [ ] Both
---
## Changes
### Backend
-
### Frontend
-
### New dependencies
-
### Database / schema changes
-
---
## Testing
**How did you test this?**
**Checklist**
- [ ] Tested locally end-to-end (upload ZIP or GitHub URL → scan → findings returned correctly)
- [ ] New ML model falls back gracefully when model file is absent
- [ ] No new `console.error` or unhandled Python exceptions introduced
- [ ] Added or updated tests where applicable
- [ ] `requirements.txt` / `package.json` updated if new dependencies added
- [ ] New model files (`.pkl`, `.pt`, etc.) are gitignored, not committed
---
## Anything reviewers should focus on
## Screenshots (if UI changed)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Issue #144: AI-Powered Root Cause Grouping for Security Findings.
This contribution introduces a Root Cause Grouping system that analyzes related security findings, clusters them based on shared characteristics, and identifies likely root causes responsible for multiple vulnerabilities. The feature helps users prioritize high-impact fixes by addressing the underlying source rather than resolving findings individually.
Changes Made
Backend
Added
analyze_root_cause()to process findings and generate root-cause groupings.Created a dedicated Root Cause Grouping API endpoint:
GET /jobs/{job_id}/root-cause-groupsAdded root-cause grouping exports through the ML package.
Registered the new router in
main.py.Evidence Pack Integration
Extended Evidence Pack generation to include root-cause analysis results.
Added:
rca.jsonEnsured root-cause information is packaged alongside existing audit artifacts.
Root Cause Analysis Features
Groups related findings into clusters.
Identifies likely source locations responsible for multiple findings.
Returns structured grouping information including:
Example Output
{ "job_id": "123", "groups": [ { "group_id": "RCG-001", "root_cause": "database_helper.py", "findings_count": 15 } ] }Verification
Related Issue
Closes #144