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

Better support SARIF ruleId attribute #5025

Merged
merged 5 commits into from Sep 8, 2021

Conversation

damiencarol
Copy link
Contributor

@damiencarol damiencarol commented Sep 1, 2021

According to specification, attribute ruleId could be missing from reports. (cf https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317643 )

Not all existing analysis tools emit the equivalent of a ruleId in their output.

This PR allow to import reports for tools that don't emit ruleId properly (like Gitleaks 7.5.0 which we use for a new unit tests)

Work done

  • better support attribute ruleId when tools doesn't set it cleanly (missing, reference but no data, etc...)
  • implement mitigation attribute

@damiencarol damiencarol requested a review from a team September 1, 2021 14:00
Copy link
Member

@StefanFl StefanFl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my 2 questions.

dojo/tools/sarif/parser.py Outdated Show resolved Hide resolved
dojo/tools/sarif/parser.py Outdated Show resolved Hide resolved
@damiencarol
Copy link
Contributor Author

@StefanFl addressed your comments and also implemented mitigation attribute.

@valentijnscholten valentijnscholten merged commit 7bf802b into DefectDojo:dev Sep 8, 2021
@damiencarol damiencarol deleted the fix_gitleaks_sarif branch September 8, 2021 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants