Commit a74ebb45 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Rename Security::Occurrence to Security::Finding

parent 27d7f3d8
......@@ -55,7 +55,7 @@ module Gitlab
scanner = create_scanner(report, data['scanner'] || mutate_scanner_tool(data['tool']))
identifiers = create_identifiers(report, data['identifiers'])
report.add_finding(
::Gitlab::Ci::Reports::Security::Occurrence.new(
::Gitlab::Ci::Reports::Security::Finding.new(
uuid: SecureRandom.uuid,
report_type: report.type,
name: data['message'],
......
......@@ -4,7 +4,7 @@ module Gitlab
module Ci
module Reports
module Security
class Occurrence
class Finding
attr_reader :compare_key
attr_reader :confidence
attr_reader :identifiers
......
# frozen_string_literal: true
FactoryBot.define do
factory :ci_reports_security_finding, class: '::Gitlab::Ci::Reports::Security::Occurrence' do
factory :ci_reports_security_finding, class: '::Gitlab::Ci::Reports::Security::Finding' do
compare_key { "#{identifiers.first.external_type}:#{identifiers.first.external_id}:#{location.fingerprint}" }
confidence { :medium }
identifiers { Array.new(1) { FactoryBot.build(:ci_reports_security_identifier) } }
......@@ -39,7 +39,7 @@ FactoryBot.define do
end
initialize_with do
::Gitlab::Ci::Reports::Security::Occurrence.new(attributes)
::Gitlab::Ci::Reports::Security::Finding.new(attributes)
end
end
end
......@@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Gitlab::Ci::Reports::Security::Occurrence do
RSpec.describe Gitlab::Ci::Reports::Security::Finding do
describe '#initialize' do
subject { described_class.new(**params) }
......
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