aws_recon 0.5.19 → 0.5.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/aws_recon/collectors/ec2.rb +25 -8
 - data/lib/aws_recon/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2035a8262fecb131f3f0726f3865ea501653883b0dde2dbd23b4d3af1bdd823d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 25cac714f41b1618f116b9c3797551e1890f973875cfeb50a9c1201a9e32683e
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9b2ca23229fc2bf7b16fdab17661ba3af40445c6e15339a78c873f64b8cdedfb31d258b2b35802d15807cd0d8bb56c338d85f1e1192bdf0623b5a018d513102b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: fbde3eeccae95217fda68a0c0e82778506dc67e51f684fb4b0540350da8452b57c1430658c57c39db3c1ae5531a5bbebc262d5dcafcedf9b6696b371226897e1
         
     | 
| 
         @@ -98,7 +98,10 @@ class EC2 < Mapper 
     | 
|
| 
       98 
98 
     | 
    
         
             
                      struct.type = 'vpc'
         
     | 
| 
       99 
99 
     | 
    
         
             
                      struct.arn = "arn:aws:ec2:#{@region}:#{@account}:vpc/#{vpc.vpc_id}" # no true ARN
         
     | 
| 
       100 
100 
     | 
    
         
             
                      struct.flow_logs = @client
         
     | 
| 
       101 
     | 
    
         
            -
                                         .describe_flow_logs({ filter: [{ 
     | 
| 
      
 101 
     | 
    
         
            +
                                         .describe_flow_logs({ filter: [{
         
     | 
| 
      
 102 
     | 
    
         
            +
                                                               name: 'resource-id',
         
     | 
| 
      
 103 
     | 
    
         
            +
                                                               values: [vpc.vpc_id]
         
     | 
| 
      
 104 
     | 
    
         
            +
                                                             }] })
         
     | 
| 
       102 
105 
     | 
    
         
             
                                         .flow_logs.first.to_h
         
     | 
| 
       103 
106 
     | 
    
         | 
| 
       104 
107 
     | 
    
         
             
                      resources.push(struct.to_h)
         
     | 
| 
         @@ -337,19 +340,33 @@ class EC2 < Mapper 
     | 
|
| 
       337 
340 
     | 
    
         
             
                  #
         
     | 
| 
       338 
341 
     | 
    
         
             
                  # describe_managed_prefix_lists
         
     | 
| 
       339 
342 
     | 
    
         
             
                  #
         
     | 
| 
       340 
     | 
    
         
            -
                   
     | 
| 
       341 
     | 
    
         
            -
                     
     | 
| 
      
 343 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 344 
     | 
    
         
            +
                    @client.describe_managed_prefix_lists.each_with_index do |response, page|
         
     | 
| 
      
 345 
     | 
    
         
            +
                      log(response.context.operation_name, page)
         
     | 
| 
       342 
346 
     | 
    
         | 
| 
       343 
     | 
    
         
            -
             
     | 
| 
       344 
     | 
    
         
            -
             
     | 
| 
       345 
     | 
    
         
            -
             
     | 
| 
       346 
     | 
    
         
            -
             
     | 
| 
      
 347 
     | 
    
         
            +
                      response.prefix_lists.each do |list|
         
     | 
| 
      
 348 
     | 
    
         
            +
                        struct = OpenStruct.new(list.to_h)
         
     | 
| 
      
 349 
     | 
    
         
            +
                        struct.type = 'prefix_list'
         
     | 
| 
      
 350 
     | 
    
         
            +
                        struct.arn = list.prefix_list_arn
         
     | 
| 
       347 
351 
     | 
    
         | 
| 
       348 
     | 
    
         
            -
             
     | 
| 
      
 352 
     | 
    
         
            +
                        resources.push(struct.to_h)
         
     | 
| 
      
 353 
     | 
    
         
            +
                      end
         
     | 
| 
       349 
354 
     | 
    
         
             
                    end
         
     | 
| 
      
 355 
     | 
    
         
            +
                  rescue Aws::EC2::Errors::ServiceError => e
         
     | 
| 
      
 356 
     | 
    
         
            +
                    log_error(e.code)
         
     | 
| 
      
 357 
     | 
    
         
            +
             
     | 
| 
      
 358 
     | 
    
         
            +
                    raise e unless suppressed_errors.include?(e.code) && !@options.quit_on_exception
         
     | 
| 
       350 
359 
     | 
    
         
             
                  end
         
     | 
| 
       351 
360 
     | 
    
         
             
                end
         
     | 
| 
       352 
361 
     | 
    
         | 
| 
       353 
362 
     | 
    
         
             
                resources
         
     | 
| 
       354 
363 
     | 
    
         
             
              end
         
     | 
| 
      
 364 
     | 
    
         
            +
             
     | 
| 
      
 365 
     | 
    
         
            +
              private
         
     | 
| 
      
 366 
     | 
    
         
            +
             
     | 
| 
      
 367 
     | 
    
         
            +
              def suppressed_errors
         
     | 
| 
      
 368 
     | 
    
         
            +
                %w[
         
     | 
| 
      
 369 
     | 
    
         
            +
                  InvalidAction
         
     | 
| 
      
 370 
     | 
    
         
            +
                ]
         
     | 
| 
      
 371 
     | 
    
         
            +
              end
         
     | 
| 
       355 
372 
     | 
    
         
             
            end
         
     | 
    
        data/lib/aws_recon/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: aws_recon
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.5. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.5.20
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Josh Larsen
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire:
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2021- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2021-10-22 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: aws-sdk
         
     |