debian-mirror-gitlab/lib/gitlab/ci/parsers/security/concerns/deprecated_syntax.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
752 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
module Parsers
module Security
module Concerns
module DeprecatedSyntax
extend ActiveSupport::Concern
included do
extend ::Gitlab::Utils::Override
override :parse_report
end
def report_data
@report_data ||= begin
data = super
if data.is_a?(Array)
data = {
"version" => self.class::DEPRECATED_REPORT_VERSION,
"vulnerabilities" => data
}
end
data
end
end
end
end
end
end
end
end