Loading
Clear the tool coverage status for a new scanner
What does this MR do and why?
Clear the tool coverage status for a new scanner
Emit a null status from the tool coverage card's scanner dropdown in
tool_coverage_card.vue, so picking a different scanner drops the status
with it. Picking SAST while DAST was set to enabled used to produce SAST
enabled, a filter nobody chose. The card contributes no query variables
for a null status. Return early for the scanner already selected, so
reopening the dropdown and picking the same entry does nothing rather
than clearing the status.
Changelog: fixed
EE: trueReferences
- related to: Design: Dashboard summary widgets for security ... (#527861)
- split from: Draft: Sync security inventory filters with URL... (!252968 - closed)
Screenshots or screen recordings
| Case | Before | After |
|---|---|---|
| switching between scanners in the card dropdown | keeps the status selected |
deselects the status |
| how this interacts with filters in the bar |
How to set up and validate locally
-
git checkout mfluharty-clear-tool-coverage-status-on-scanner-change echo "Feature.enable(:security_inventory_tool_coverage_card)" | gdk rails c - have a GitLab Ultimate licence
- go to a group =>
Secure=>Security inventory, and find theTool coveragecard
picking a different scanner clears the status
- on the
Tool coveragecard, click one of the status rows:Enabled,Failed,StaleorNot enabled - open the scanner dropdown and pick a different scanner, for example
Dynamic application security testing (DAST)orStatic application security testing (SAST) - check that:
- the status row is no longer drawn as selected
- the card stops contributing a filter, so the project list widens back to whatever the search bar alone selects
- the donut re-renders for the new scanner's counts
reselecting the same scanner doesn't clear the status
- with a status row selected, open the scanner dropdown and click the scanner that is already selected
- check that:
- the status row stays selected
- the project list does not change
to run tests
yarn jest ee/spec/frontend/security_inventory/components/tool_coverage_card_spec.jsMR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Miranda Fluharty