Commit 5489973f authored by Robert Speicher's avatar Robert Speicher

Merge branch '214223-change-description-to-finding-description-in-vuln-export' into 'master'

Use finding_description in CSV vulnerability export

See merge request gitlab-org/gitlab!40944
parents a6dbbaaf 7e36d346
......@@ -128,7 +128,7 @@ class Vulnerability < ApplicationRecord
super || finding&.dismissal_feedback&.author_id
end
delegate :scanner_name, :scanner_external_id, :metadata, :message, :cve,
delegate :scanner_name, :scanner_external_id, :metadata, :message, :cve, :description,
to: :finding, prefix: true, allow_nil: true
delegate :default_branch, :name, to: :project, prefix: true, allow_nil: true
......
......@@ -10,7 +10,7 @@ module VulnerabilityExports
'Scanner Name' => 'finding_scanner_name',
'Status' => 'state',
'Vulnerability' => 'title',
'Details' => 'description',
'Details' => 'finding_description',
'Additional Info' => 'finding_message',
'Severity' => 'severity',
'CVE' => 'finding_cve'
......
---
title: Use finding_description for Details in CSV vulnerability export
merge_request: 40944
author:
type: changed
......@@ -36,7 +36,7 @@ RSpec.describe VulnerabilityExports::Exporters::CsvService do
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
expect(csv[0]['Details']).to eq vulnerability.description
expect(csv[0]['Details']).to eq vulnerability.finding_description
expect(csv[0]['Additional Info']).to eq vulnerability.finding_message
expect(csv[0]['Severity']).to eq vulnerability.severity
expect(csv[0]['CVE']).to eq vulnerability.finding_cve
......@@ -55,7 +55,7 @@ RSpec.describe VulnerabilityExports::Exporters::CsvService do
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
expect(csv[0]['Details']).to eq vulnerability.description
expect(csv[0]['Details']).to eq vulnerability.finding_description
expect(csv[0]['Additional Info']).to eq vulnerability.finding_message
expect(csv[0]['Severity']).to eq vulnerability.severity
expect(csv[0]['CVE']).to eq vulnerability.finding_cve
......
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