Commit 6d55b31f authored by Shinya Maeda's avatar Shinya Maeda

Merge branch '330713-add-new-security-scan-type-to-jobs-finder' into 'master'

Add ability to search for cluster image scaning jobs

See merge request gitlab-org/gitlab!64616
parents 9dce5fff 3579088e
......@@ -13,7 +13,7 @@
module Security
class SecurityJobsFinder < JobsFinder
def self.allowed_job_types
[:sast, :dast, :dependency_scanning, :container_scanning, :secret_detection, :coverage_fuzzing, :api_fuzzing]
[:sast, :dast, :dependency_scanning, :container_scanning, :secret_detection, :coverage_fuzzing, :api_fuzzing, :cluster_image_scanning]
end
end
end
......@@ -14956,6 +14956,7 @@ Size of UI component in SAST configuration page.
| Value | Description |
| ----- | ----------- |
| <a id="securityreporttypeenumapi_fuzzing"></a>`API_FUZZING` | API FUZZING scan report. |
| <a id="securityreporttypeenumcluster_image_scanning"></a>`CLUSTER_IMAGE_SCANNING` | CLUSTER IMAGE SCANNING scan report. |
| <a id="securityreporttypeenumcontainer_scanning"></a>`CONTAINER_SCANNING` | CONTAINER SCANNING scan report. |
| <a id="securityreporttypeenumcoverage_fuzzing"></a>`COVERAGE_FUZZING` | COVERAGE FUZZING scan report. |
| <a id="securityreporttypeenumdast"></a>`DAST` | DAST scan report. |
......@@ -14970,6 +14971,7 @@ The type of the security scanner.
| Value | Description |
| ----- | ----------- |
| <a id="securityscannertypeapi_fuzzing"></a>`API_FUZZING` | |
| <a id="securityscannertypecluster_image_scanning"></a>`CLUSTER_IMAGE_SCANNING` | |
| <a id="securityscannertypecontainer_scanning"></a>`CONTAINER_SCANNING` | |
| <a id="securityscannertypecoverage_fuzzing"></a>`COVERAGE_FUZZING` | |
| <a id="securityscannertypedast"></a>`DAST` | |
......
......@@ -62,7 +62,7 @@ RSpec.describe Projects::Security::ConfigurationController do
it 'responds in json format when requested' do
get :show, params: { namespace_id: project.namespace, project_id: project, format: :json }
types = %w(sast dast dast_profiles dependency_scanning container_scanning secret_detection coverage_fuzzing license_scanning api_fuzzing)
types = %w(sast dast dast_profiles dependency_scanning container_scanning cluster_image_scanning secret_detection coverage_fuzzing license_scanning api_fuzzing)
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['features'].map { |f| f['type'] }).to match_array(types)
......
......@@ -4,6 +4,6 @@ require 'spec_helper'
RSpec.describe GitlabSchema.types['SecurityScannerType'] do
it 'exposes all security scanner types' do
expect(described_class.values.keys).to match_array(%w[API_FUZZING CONTAINER_SCANNING COVERAGE_FUZZING DAST DEPENDENCY_SCANNING SAST SECRET_DETECTION])
expect(described_class.values.keys).to match_array(%w[API_FUZZING CLUSTER_IMAGE_SCANNING CONTAINER_SCANNING COVERAGE_FUZZING DAST DEPENDENCY_SCANNING SAST SECRET_DETECTION])
end
end
......@@ -83,6 +83,7 @@ RSpec.describe Projects::Security::ConfigurationPresenter do
security_scan(:dast, configured: true),
security_scan(:sast, configured: true),
security_scan(:container_scanning, configured: false),
security_scan(:cluster_image_scanning, configured: false),
security_scan(:dependency_scanning, configured: false),
security_scan(:license_scanning, configured: false),
security_scan(:secret_detection, configured: true),
......@@ -107,6 +108,7 @@ RSpec.describe Projects::Security::ConfigurationPresenter do
security_scan(:dast, configured: false),
security_scan(:sast, configured: false),
security_scan(:container_scanning, configured: false),
security_scan(:cluster_image_scanning, configured: false),
security_scan(:dependency_scanning, configured: false),
security_scan(:license_scanning, configured: false),
security_scan(:secret_detection, configured: false),
......@@ -139,6 +141,7 @@ RSpec.describe Projects::Security::ConfigurationPresenter do
security_scan(:dast_profiles, configured: true),
security_scan(:sast, configured: true),
security_scan(:container_scanning, configured: false),
security_scan(:cluster_image_scanning, configured: false),
security_scan(:dependency_scanning, configured: false),
security_scan(:license_scanning, configured: false),
security_scan(:secret_detection, configured: true),
......@@ -157,6 +160,7 @@ RSpec.describe Projects::Security::ConfigurationPresenter do
security_scan(:dast_profiles, configured: true),
security_scan(:sast, configured: true),
security_scan(:container_scanning, configured: false),
security_scan(:cluster_image_scanning, configured: false),
security_scan(:dependency_scanning, configured: false),
security_scan(:license_scanning, configured: false),
security_scan(:secret_detection, configured: false),
......@@ -180,6 +184,7 @@ RSpec.describe Projects::Security::ConfigurationPresenter do
security_scan(:dast_profiles, configured: true),
security_scan(:sast, configured: true),
security_scan(:container_scanning, configured: false),
security_scan(:cluster_image_scanning, configured: false),
security_scan(:dependency_scanning, configured: false),
security_scan(:license_scanning, configured: false),
security_scan(:secret_detection, configured: false),
......@@ -196,6 +201,7 @@ RSpec.describe Projects::Security::ConfigurationPresenter do
security_scan(:dast_profiles, configured: true),
security_scan(:sast, configured: true),
security_scan(:container_scanning, configured: false),
security_scan(:cluster_image_scanning, configured: false),
security_scan(:dependency_scanning, configured: false),
security_scan(:license_scanning, configured: true),
security_scan(:secret_detection, configured: true),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment