Quick verify in menu and keyboard shortcuts to verify/close findings#14318
Quick verify in menu and keyboard shortcuts to verify/close findings#14318fopina wants to merge 6 commits intoDefectDojo:devfrom
Conversation
🔴 Risk threshold exceeded.This pull request modifies multiple sensitive codepaths (URLs, views, templates, API serializers/views, and helper modules under dojo/) and the scanner flagged these edits as sensitive; consider reviewing the changes carefully and configuring allowed paths/authors in .dryrunsecurity.yaml if appropriate. None of the findings are marked blocking, but they are flagged at the failing risk threshold and warrant attention.
🔴 Configured Codepaths Edit in
|
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/finding/views.py (drs_ce0937f4)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/templates/dojo/verify_finding.html (drs_959ff526)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/templates/dojo/view_finding.html (drs_110cab11)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/templates/dojo/view_finding.html (drs_cbb63c7f)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/api_v2/serializers.py (drs_c61db350)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/api_v2/views.py (drs_204dda67)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/finding/helper.py (drs_bde88f52)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/finding/views.py (drs_d7eedba4)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/finding/helper.py (drs_a95648cd)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/finding/helper.py (drs_562c68ea)
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
We've notified @mtesauro.
All finding details can be found in the DryRun Security Dashboard.
|
What's the difference between the PRs? Do you have screenshots? |
|
Hi @valentijnscholten , I understand where that question came from because I created this branch off the other one, not from I split them in case there was some need to discuss the additions separately :) #14317 adds
This one extends keyboard shortcuts in view findings (e,p,n) to also support verify and close finding
As the shortcut to "verify" requires the menu option to exist, I branched off it - also felt like they would look nice as different entries in the release log, since this one also improves "close finding" accessibility |
|
So #14317 can be closed and we only need this one? |
|
Done, PRs merged 👍 |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Hi @fopina your PR will need to have the current upstream dev branch pulled in. I attempted to do this for you, but did not have the perms to do so. I apologize for inconvenience! |
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
33bcf4e to
76efed1
Compare
|
I had to reset locally to the new dev as it was a mess of commits even after resolving conflicts... |
Maffooch
left a comment
There was a problem hiding this comment.
This looks great! Can you please do a couple things
- Add API support
- Consolidate the verification process into a helper
Use the close finding helper as a reference for interfacing with jira, and consolidating UI/API behavior to prevent disparity
76efed1 to
541e956
Compare
|
@Maffooch thanks for the feedback, working on adding those. Should it just be .save() (without |
|
and tests fixed now, all done apart from confirmation on jira interaction 👍 |
|
I think what @Maffooch meant is that by making a findin verified, it might be eligible to be pushed to JIRA where before it was skipped depending on system settings. To accomodate that you would have to do something like or maybe the exact same thing as the close finding helper: django-DefectDojo/dojo/finding/helper.py Lines 1080 to 1098 in f1f3b93 |
c756437 to
1a0e5e2
Compare
|
Flaky test I suppose, as it only failed for debian... Push force to retrigger tests |
|
Thank you @valentijnscholten I don't have a Jira instance to test however, looking at the code in dojo/jira_link/helper.py I don't see If I'm not missing something, is it worth triggering a "push to jira" that will not actually push anything? |
|
This django-DefectDojo/dojo/jira_link/helper.py Lines 191 to 226 in f1f3b93 |
|
Oh what a miss 🤦 I was checking if verified was mapped somewhere and forgot to check if it part of the criteria to push... I'll take a look at it, thanks |
|
I just found myself jumping between model definition, signals in jira helper, definitions in finding helper, and others and it didn't become clearer to me than before. I don't understand why this check is done in these methods instead of letting As I can't understand but I'm sure there's a reason (as it's done not just for close_finding but others, at least partially), I just did as suggested 😄 I hope it looks as expected now 👍 |


Description
When viewing a finding, the menu has the option to "Close finding" but no option to "Verify": one has to edit, scroll an endless form to get to status.
As (at least for me) triaging findings is either closing or verifying, I think it deserves a spot in the menu as well.
In addition, keyboard shortcuts shared by the ProTip are nice, so it felt like an even better shortcut (or shortcuts) would be: verify/close!
Checklist
This checklist is for your information.
dev.dev.bugfixbranch.