Commit 083307fe authored by Dave Pisek's avatar Dave Pisek

Vulnerabilities CSV: Rename "scanner" to "tool"

This commit renames the "Scanner Type" column within the vulnerability
report's exported CSV to "Tool". This will make it consistent
with the rest of the UI.

Changelog: changed
EE: true
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68238
parent f09b50ba
......@@ -8,7 +8,7 @@ module VulnerabilityExports
MAPPING = {
'Group Name' => 'group_name',
'Project Name' => 'project_name',
'Scanner Type' => 'report_type',
'Tool' => 'report_type',
'Scanner Name' => 'finding_scanner_name',
'Status' => 'state',
'Vulnerability' => 'title',
......
......@@ -20,7 +20,7 @@ RSpec.describe VulnerabilityExports::Exporters::CsvService do
end
it 'includes the columns required for import' do
expect(csv.headers).to contain_exactly('Group Name', 'Project Name', 'Scanner Type', 'Scanner Name', 'Status',
expect(csv.headers).to contain_exactly('Group Name', 'Project Name', 'Tool', 'Scanner Name', 'Status',
'Vulnerability', 'Details', 'Additional Info', 'Severity', 'CVE', 'CWE', 'Other Identifiers')
end
......@@ -39,7 +39,7 @@ RSpec.describe VulnerabilityExports::Exporters::CsvService do
it 'includes proper values for each column type', :aggregate_failures do
expect(csv[0]['Group Name']).to eq group.name
expect(csv[0]['Project Name']).to eq project.name
expect(csv[0]['Scanner Type']).to eq vulnerability.report_type
expect(csv[0]['Tool']).to eq vulnerability.report_type
expect(csv[0]['Scanner Name']).to eq vulnerability.finding_scanner_name
expect(csv[0]['Status']).to eq vulnerability.state
expect(csv[0]['Vulnerability']).to eq vulnerability.title
......@@ -60,7 +60,7 @@ RSpec.describe VulnerabilityExports::Exporters::CsvService do
it 'includes proper values for each column except group name' do
expect(csv[0]['Group Name']).to be_nil
expect(csv[0]['Project Name']).to eq project.name
expect(csv[0]['Scanner Type']).to eq vulnerability.report_type
expect(csv[0]['Tool']).to eq vulnerability.report_type
expect(csv[0]['Scanner Name']).to eq vulnerability.finding_scanner_name
expect(csv[0]['Status']).to eq vulnerability.state
expect(csv[0]['Vulnerability']).to eq vulnerability.title
......@@ -82,7 +82,7 @@ RSpec.describe VulnerabilityExports::Exporters::CsvService do
it 'includes proper values for each column except Other Identifiers' do
expect(csv[0]['Group Name']).to eq group.name
expect(csv[0]['Project Name']).to eq project.name
expect(csv[0]['Scanner Type']).to eq vulnerability.report_type
expect(csv[0]['Tool']).to eq vulnerability.report_type
expect(csv[0]['Scanner Name']).to eq vulnerability.finding_scanner_name
expect(csv[0]['Status']).to eq vulnerability.state
expect(csv[0]['Vulnerability']).to eq vulnerability.title
......
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