Sha256: 6b1a9504794f6cb4fea01981cbb415bb45a43b9a4533f724ce69acb0d02b9d57

Contents?: true

Size: 1.08 KB

Versions: 6

Compression:

Stored size: 1.08 KB

Contents

# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'contrast/agent/reporting/details/protect_rule_details'

module Contrast
  module Agent
    module Reporting
      module Details
        # XssDetails IA result details info.
        class XxeDetails < ProtectRuleDetails
          # @return [String]
          attr_accessor :xml
          # @return [<Array<Contrast::Agent::Reporting::Details::XxeMatch>]
          attr_accessor :declared_entities
          # @return [<Array<Contrast::Agent::Reporting::Details::XxeWrapper>]
          attr_accessor :entities_resolved

          def initialize
            @declared_entities = []
            @entities_resolved = []
            super
          end

          def to_controlled_hash
            {
                xml: xml,
                declaredEntities: declared_entities&.map(&:to_controlled_hash),
                entitiesResolved: entities_resolved&.map(&:to_controlled_hash)
            }
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
contrast-agent-6.11.0 lib/contrast/agent/reporting/details/xxe_details.rb
contrast-agent-6.10.0 lib/contrast/agent/reporting/details/xxe_details.rb
contrast-agent-6.9.0 lib/contrast/agent/reporting/details/xxe_details.rb
contrast-agent-6.8.0 lib/contrast/agent/reporting/details/xxe_details.rb
contrast-agent-6.7.0 lib/contrast/agent/reporting/details/xxe_details.rb
contrast-agent-6.6.5 lib/contrast/agent/reporting/details/xxe_details.rb