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

sast_spec.rb « locations « security « reports « ci « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: effa7a6040079f775d3b3158998ce9f97896acca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Ci::Reports::Security::Locations::Sast do
  let(:params) do
    {
      file_path: 'src/main/App.java',
      start_line: 29,
      end_line: 31,
      class_name: 'com.gitlab.security_products.tests.App',
      method_name: 'insecureCypher'
    }
  end

  let(:mandatory_params) { %i[file_path start_line] }
  let(:expected_fingerprint) { Digest::SHA1.hexdigest('src/main/App.java:29:31') }
  let(:expected_fingerprint_path) { 'App.java' }

  it_behaves_like 'vulnerability location'
end