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,
  rule_value: 5
}.with_indifferent_access.freeze

Instance Method Summary collapse

Instance Method Details

#algorithm_typesObject



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

def algorithm_types
  self.class.algorithm_types
end

#priorityObject



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

def priority
  self.class.priority(algorithm_type)
end