Fix/63 normalize category#67
Open
vikask011 wants to merge 4 commits into
Open
Conversation
Krishnx21
suggested changes
Jun 8, 2026
Krishnx21
left a comment
There was a problem hiding this comment.
Thanks for the contribution.
I found a few issues that should be addressed before merging:
categoryis passed twice to theFindingconstructor in multiple files, which will raiseSyntaxError: keyword argument repeated: category.- There are duplicate
return outstatements that result in unreachable code. - Please verify that
ml_featuresis defined before being used.
I've left inline comments with more details.
Owner
|
@vikask011 Fix failing tests and mentor review |
Owner
|
@vikask011 Still failing checks. Join our dc server to connect with fellow contributors and mentors. Our mentors will help you out there. |
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.
Linked issue
Closes #63
What this PR does
This PR introduces a centralized category normalization utility to ensure dependency-related findings are categorized consistently across different scanners. The OSV, Semgrep, and Gitleaks scanners were updated to use the shared normalization logic, and unit tests were added to verify the expected behavior.
Type of change
ML tier (if applicable)
Changes
Backend
categories.py).New dependencies
Database / schema changes
Testing
How did you test this?
Checklist
console.erroror unhandled Python exceptions introducedrequirements.txt/package.jsonupdated if new dependencies added.pkl,.pt, etc.) are gitignored, not committedAnything reviewers should focus on
Please review the category normalization logic and ensure the mappings remain consistent across all scanners and existing finding classifications.
Screenshots (if UI changed)
Not applicable.