Sha256: 939b760455790f80e0030fee9ec882e855a7c831618b849014d58f722bd8888d

Contents?: true

Size: 577 Bytes

Versions: 10

Compression:

Stored size: 577 Bytes

Contents

module Outliers
  module Resources
    module Aws
      module Ec2
        class SecurityGroup < Resource
          def no_public_internet_ingress?
            logger.debug "Verifying '#{id}'."
            source.ip_permissions.select do |i|
              if !i.egress? && (i.ip_ranges.include? "0.0.0.0/0")
                logger.debug "Security Group '#{id}' is open to '#{i.ip_ranges.join(', ')}' via '#{i.protocol}'."
                false
              else
                true
              end
            end.any?
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
outliers-0.6.0 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.5.1 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.5.0 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.5.0.beta3 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.5.0.beta2 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.5.0.beta1 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.3.3 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.3.2 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.3.1 lib/outliers/resources/aws/ec2/security_group.rb
outliers-0.3.0 lib/outliers/resources/aws/ec2/security_group.rb