Skip to content
Snippets Groups Projects

Resolve "Limit Group Security Dashboard to selected types of vulnerabilities"

Merged Tetiana Chupryna requested to merge 9393-limit-report-types-for-group-sec into master
3 files
+ 25
12
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -3,6 +3,11 @@
class Groups::Security::VulnerabilitiesController < Groups::Security::ApplicationController
HISTORY_RANGE = 3.months
# NOTE: we need this scope because DAST and Container Scanning vulnerabilities
# shouldn't appear in the Group Dashboard in the same as we're starting
# to save them in the database
+2
DEFAULT_REPORT_SCOPE = [:sast, :dependency_scanning].freeze
def index
vulnerabilities = found_vulnerabilities.ordered.page(params[:page])
@@ -39,8 +44,10 @@ def history
private
def filter_params
params.permit(report_type: [], project_id: [], severity: [])
.merge(hide_dismissed: Gitlab::Utils.to_boolean(params[:hide_dismissed]))
fparams = params.permit(report_type: [], project_id: [], severity: [])
.merge(hide_dismissed: Gitlab::Utils.to_boolean(params[:hide_dismissed]))
fparams[:report_type] = DEFAULT_REPORT_SCOPE unless fparams[:report_type]
fparams
end
def found_vulnerabilities(collection = :latest)
Loading