BE: Auto-dismiss vulnerabilities for the MR security widget
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Why are we doing this work
There should be a new section of the security widget titled Auto-dismiss in the MR showing detected vulnerabilities that will be auto-dismissed. This section should be below the New vulnerabilities and above any Fixed ones, where applicable.
We need to investigate what is needed to deliver this information from backend.
Relevant links
Non-functional requirements
- Documentation:
- Feature flag:
- Performance:
- Testing:
Implementation plan
Verification steps
- Enable the feature flag
auto_dismiss_vulnerability_policies - Create a project
- Create an auto-dismiss policy:
vulnerability_management_policy: - name: Auto-dismiss acceptable secrets description: Auto-dismiss secrets enabled: true actions: - type: auto_dismiss dismissal_reason: not_applicable rules: - type: detected criteria: - type: file_path value: ".env" - Add
.gitlab-ci.ymlwith secret detectioninclude: - template: Jobs/Secret-Detection.latest.gitlab-ci.yml - Add two secrets in a new MR:
-
.env:AWS_TOKEN=AKIAZYONPI3G4JNCCWGQ -
.env2:AWS_TOKEN=AKIAZYONPI3G4JNCCWGA
-
- Wait for the pipeline to finish
- Expand the detected findings in the MR security widget and verify that the matched finding shows an icon with a popover, while the other one doesn't.
- Click on "View all pipeline findings" and update the status of the new finding to dismissed
- Go back to the MR and verify that only
Dismissedbadge shows up.
Edited by 🤖 GitLab Bot 🤖