Skip to content
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

Reactivate sonar #1445

Merged
merged 7 commits into from Aug 8, 2019
Merged

Reactivate sonar #1445

merged 7 commits into from Aug 8, 2019

Conversation

ptrovatelli
Copy link
Collaborator

List of changes:

  • Reactivate sonarQube parser. (more info: see DefectDojo SonarQube Integration #810)
  • Fix it for python3
  • add file_path and line_number
  • fix an issue with the logic for finding the vulnerabilities and the rules
    • before it was finding all the "tbody" and expect to find data always at the same nth tbody.
    • However sometimes there are more "tbody" in the rules description, and when there are no vulnerabilities found, one of the tbody disappears so it didn't work. Fix by using xpath instead to locate the list of vuln and the rules.
  • force the findings as static findings (they were dynamic before)
  • add unit tests

Beware that you'll need the last version of the sonar html export for this to work. it's here https://github.com/soprasteria/sonar-report but the npm registry is not up to date yet.

See also

@ptrovatelli
Copy link
Collaborator Author

I have an idea for a perf improvment: that get_rule_details function has a complexity of number of findings * (number of rules/2).
It could be lowered to number of findings + number of rules if we go through the rules just once and put them in a hashmap.
@praveendvd also found a issue when importing non-vulnerability findings. i'll check this too

@Maffooch
Copy link
Contributor

Maffooch commented Aug 5, 2019

Hey @ptrovatelli please reactivate here as well. Thanks.

@ptrovatelli
Copy link
Collaborator Author

Hey @ptrovatelli please reactivate here as well. Thanks.

Nice catch thanks! done.

@devGregA devGregA merged commit eb328bb into DefectDojo:dev Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants