mirror of
https://github.com/gadievron/raptor.git
synced 2026-04-25 05:56:00 +03:00
[PR #30] [CLOSED] Fix: Generate unique finding_id to prevent exploit/patch file collisions #40
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/raptor#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/gadievron/raptor/pull/30
Author: @sapran
Created: 12/9/2025
Status: ❌ Closed
Base:
main← Head:bugfix/unique-finding-id📝 Commits (4)
3e26816Merge branch 'main' of github.com:sapran/raptorb056d00Merge branch 'main' of github.com:sapran/raptore7c11b7Merge branch 'main' of github.com:sapran/raptorfff8fe1Fix bug: Generate unique finding_id to prevent file collisions📊 Changes
1 file changed (+15 additions, -6 deletions)
View changed files
📝
core/sarif/parser.py(+15 -6)📄 Description
Problem
Multiple findings with the same
rule_idwere assigned identicalfinding_idvalues, causing exploit and patch files to overwrite each other.Symptoms:
Root Cause
In
core/sarif/parser.py:142, the fallback logic used non-uniquerule_id:The Issue: When SARIF files lack fingerprints (common with Semgrep/CodeQL), all findings with the same
rule_idget the samefinding_id.Example collision:
Result:
requires login_exploit.cppgets overwritten 3 times.Solution
Generate unique
finding_idby combining rule + file + line:Priority hierarchy:
{rule}_{file}_L{line}(fallback) - unique and descriptiveExamples
Before (collisions):
After (unique):
Impact
Before:
After:
Benefits:
Testing
Verified with real scan output showing the bug:
Files Changed
core/sarif/parser.py- 1 file, +15 insertions, -6 deletions🤖 Generated with Claude Code
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.