[MR Widget V2]: Security Reports widget fails when tools are not configured
Summary
As shown in the image, when the tools are not configured, the API returns a 400 request and this causes our Scanners to display an error message.
We should ignore these errors and treat only configured tools. Alternatively, if we the frontend has information on which tools are enabled, we can make a call to the API only for the enabled tools.
More context
The mr
object has an enabledReports
property which looks like:
Use this object to detect which calls to make. If no report is enabled, we simply do not show the security reports widget.
Verification steps
-
Go to savasvedova/security-reports-v2!1 -
The widget container should have all enabledReports
set tofalse
(see screenshot below) -
Open the network tab -
Filter by following keywords: sast
,dast
,coverage
,api_fuzzing
,secret
,container
,dependency
. There should be no network requests.
Note The Security scanning detected no new potential vulnerabilities
message is misleading, it will be fixed in a separate issue.
Edited by Savas Vedova