Error importing Checkmarx results. Ignored active and verified state #4598
Comments
|
the file uploaded is attached |
|
Hello @devGregA , I will try to investigate how to solve the bug because is critical for me to solve it... Do you have some recommendation to locate the part of code that import Checkmarx results? thank you, |
|
For some reason these values are hardcoded to be false, I don't know why: https://github.com/valentijnscholten/django-DefectDojo/blob/3957c7d7f4f32dfa2339494e406ac24675864a13/dojo/tools/checkmarx/parser.py#L122. Looks like very old code, I think it should be removed and let the fields go to default value, which will also allow the settings chosen in API request or UI to propagate. |
|
Thank for your answer @valentijnscholten , I have removed the parameters active and verified with the value False hardcoded and It solves the problem for the Checkmarx and Checkmarx Detailed Parser. If it is possible I am going to open a Pull Request with these changes. :) |
|
yes please :-) |
ssiriz
mentioned this issue
Maffooch
mentioned this issue





Information
DefectDojo tag v1.15
Api endpoint import-scan
When you try to import the result file from Checkmarx using the API or the Web UI and changing the active state to true and the verify state to True, the findings are always setted as inactive.
Bug description
Problem importing the Checkmarx file report using the "checkmarx scan" and "checkmarx scan detailed" importer.
The problem is reproduced using the API endpoint (import-scan) and the WEB UI. Findigns state is always "Inactive" when the import process is done successfully setting the Active and Verified flag to True. It seems that these flags are ignored:
curl -X POST "https://defect-dojo.dmain/api/v2/import-scan/" -H "accept: application/json" -H "Content-Type: multipart/form-data" -H "X-CSRFToken: token" -F "scan_date=2021-06-02" -F "minimum_severity=Info" -F "active=true" -F "verified=true" -F "scan_type=Checkmarx Scan" -F "file=@ssdlc-testing.xml;type=text/xml" -F "engagement=51" -F "close_old_findings=false" -F "push_to_jira=false"
Expected behavior
Finding state must change if you set the active or verify flag status to False or True.
The text was updated successfully, but these errors were encountered: