Welcome to mirror list, hosted at ThFree Co, Russian Federation.

secret_detection.rb « locations « security « reports « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0fd5cc5af113127c299d10aa0adfa1a9f62f743c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

module Gitlab
  module Ci
    module Reports
      module Security
        module Locations
          class SecretDetection < Base
            include Security::Concerns::FingerprintPathFromFile

            attr_reader :class_name
            attr_reader :end_line
            attr_reader :file_path
            attr_reader :method_name
            attr_reader :start_line

            def initialize(file_path:, start_line:, end_line: nil, class_name: nil, method_name: nil)
              @class_name = class_name
              @end_line = end_line
              @file_path = file_path
              @method_name = method_name
              @start_line = start_line
            end

            def fingerprint_data
              "#{file_path}:#{start_line}:#{end_line}"
            end
          end
        end
      end
    end
  end
end