-
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
Add a filter for Findings for Has Any JIRA (grouped or single) #11313
Conversation
DryRun Security SummaryThe pull request introduces a new filter called Expand for full summarySummary: The code changes in this pull request introduce a new filter called The key points of interest are the potential performance impact of the new filter, the importance of ensuring proper access control, and the need for a consistent user experience. The code appears to be using the Files Changed:
Code AnalysisWe ran |
dojo/filters.py
Outdated
def all_items(self, qs, name): | ||
return qs.filter(Q(jira_issue=None) | Q(finding_group__jira_issue=None)) |
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.
This will only return Findings that are either missing jira_issue
or missing finding_group__jira_issue
. Shouldn't it simply return everything, unfiltered?
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.
This function is only called when the input supplied does not match what is expected, and low key sorta fails. I believe the thought process is along the lines of "if something unexpected happens, removing all findings with jira links would be a good indicator". This is just me speculating though. Would need @hblankenship to confirm
On the other side, returning all results (as if the filter was never applied) is a totally valid approach as well
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.
I apologize for not getting to this earlier. Testing shows that the option returns the same thing not applying the filter returns. The reason it returns them all, despite what it looks like, is because jira_issue is None for finding_group__jira_issue findings and finding_group__jira_issue is None for jira_issue items. I have modified it to just return without filtering to alleviate the confusion.
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.
Approved
Under the assumption that the pending comment from @cneill is resolved
[sc-4131]
Added a filter for Has Any JIRA which will filter the findings on having group jira or jira_issue. This will also allow a dashboard tile to exist that shows all findings with any type of JIRA issue.