-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling "requires login" in "fingerprint" and "lines" fields of Semgrep JSON Report (issue #11480) #11495
base: bugfix
Are you sure you want to change the base?
Handling "requires login" in "fingerprint" and "lines" fields of Semgrep JSON Report (issue #11480) #11495
Conversation
DryRun Security SummaryThe pull request enhances the Semgrep security testing tool by improving the parser's reliability, handling of findings, and introducing a new configuration file to identify potential security vulnerabilities in the application's codebase. Expand for full summarySummary: This pull request includes several changes related to the security testing and analysis of the application using the Semgrep tool. The changes focus on improving the reliability and robustness of the Semgrep parser, as well as introducing a new Semgrep configuration file that identifies potential security vulnerabilities in the codebase. The key changes include:
From an application security perspective, these changes are positive and demonstrate a commitment to improving the security of the application. The new test case and parser changes help ensure the reliability of the security analysis tools, while the introduction of the Semgrep configuration file helps identify and address potential vulnerabilities in the codebase. Files Changed:
Code AnalysisWe ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I think the lines
section can contain the same string that should be ignored. Could you add the same logic there?
Also looks like you might need to rebase onto bugfix
as there is now a superfluous commit not related to this PR.
@valentijnscholten |
d1ef91b
to
f55e15f
Compare
Unittest for handling "requires login"
Add example file for testing "requires login"
f55e15f
to
5059aea
Compare
Thanks, let's wait for a maintainer to allow the tests to run in GitHub. |
Description
This PR addresses the handling of the "requires login" value in the fingerprint field of Semgrep reports #11480. The change ensures that when the "requires login" value is encountered, it is treated as if it is not set, allowing the deduplication process to fall back to legacy deduplication based on hash codes.
Additionally, a new JSON report for Semgrep has been added to the unittests folder, and a function has been implemented in the test suite to verify this change. While I have not run the unit tests yet, I have tested the parser locally within my DefectDojo environment using the provided test JSON report. The results were compared with the Demo instance of DefectDojo to confirm the resolution of the bug.
Test results
The test suite has been extended with a new function to cover the changes in this PR.
I have not run the unit tests yet, but I have manually tested the parser with the newly added JSON report in my local instance of DefectDojo.
Results from both my local environment and the Demo instance of DefectDojo are attached to compare the resolution of the bug. The sample JSON report is also attached.
fingerprint_test.json