Module: VulnerabilityFindingSignatureHelpers

Extended by:
ActiveSupport::Concern
Included in:
Gitlab::Ci::Reports::Security::FindingSignature
Defined in:
app/models/concerns/vulnerability_finding_signature_helpers.rb

Constant Summary collapse

ALGORITHM_TYPES =

If the location object describes a physical location within a file (filename + line numbers), the ‘location’ algorithm_type should be used If the location object describes arbitrary data, then the ‘hash’ algorithm_type should be used.

{
  hash: 1,
  location: 2,
  scope_offset: 3,
  scope_offset_compressed: 4
}.with_indifferent_access.freeze

Instance Method Summary collapse

Instance Method Details

#algorithm_typesObject



33
34
35
# File 'app/models/concerns/vulnerability_finding_signature_helpers.rb', line 33

def algorithm_types
  self.class.algorithm_types
end

#priorityObject



29
30
31
# File 'app/models/concerns/vulnerability_finding_signature_helpers.rb', line 29

def priority
  self.class.priority(algorithm_type)
end