aws_recon 0.5.16 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66cba0c2c0bc93735b9ee7547da9fb3b06b52c15e4098b6f5ecac18aa6fedbcd
4
- data.tar.gz: 722f84d929baee05208ae9d4891abe825fb58f71c5c7d6171084be1341a99aff
3
+ metadata.gz: 2035a8262fecb131f3f0726f3865ea501653883b0dde2dbd23b4d3af1bdd823d
4
+ data.tar.gz: 25cac714f41b1618f116b9c3797551e1890f973875cfeb50a9c1201a9e32683e
5
5
  SHA512:
6
- metadata.gz: 4b34683b887d83a78c2a654801aea22104d70edda3af53ffd780d67965649fddbeedee5490925aa05677c398ce9e88056a9d412748f0aedb57c95d166a7f4fd9
7
- data.tar.gz: 31134a27476677883326c689da50147294f5ce2a6a41ad0ae3604793da6c3d502fee2b13e8acd5a4d71e8aecfdb94d4563f73f6029f757e9902f00e454d785f6
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: [{ name: 'resource-id', values: [vpc.vpc_id] }] })
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)
@@ -318,8 +321,52 @@ class EC2 < Mapper
318
321
  resources.push(struct.to_h)
319
322
  end
320
323
  end
324
+
325
+ #
326
+ # describe_vpc_endpoints
327
+ #
328
+ @client.describe_vpc_endpoints.each_with_index do |response, page|
329
+ log(response.context.operation_name, page)
330
+
331
+ response.vpc_endpoints.each do |point|
332
+ struct = OpenStruct.new(point.to_h)
333
+ struct.type = 'vpc_endpoint'
334
+ struct.arn = "arn:aws:ec2:#{@region}:#{@account}:vpc_endpoint/#{point.vpc_endpoint_id}" # no true ARN
335
+
336
+ resources.push(struct.to_h)
337
+ end
338
+ end
339
+
340
+ #
341
+ # describe_managed_prefix_lists
342
+ #
343
+ begin
344
+ @client.describe_managed_prefix_lists.each_with_index do |response, page|
345
+ log(response.context.operation_name, page)
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
351
+
352
+ resources.push(struct.to_h)
353
+ end
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
359
+ end
321
360
  end
322
361
 
323
362
  resources
324
363
  end
364
+
365
+ private
366
+
367
+ def suppressed_errors
368
+ %w[
369
+ InvalidAction
370
+ ]
371
+ end
325
372
  end
@@ -87,7 +87,6 @@
87
87
  alias: ses
88
88
  excluded_regions:
89
89
  - ap-east-1
90
- - ap-northeast-3
91
90
  - name: CloudWatch
92
91
  alias: cloudwatch
93
92
  - name: CloudWatchLogs
@@ -138,8 +137,6 @@
138
137
  - us-west-1
139
138
  - name: SageMaker
140
139
  alias: sagemaker
141
- excluded_regions:
142
- - ap-northeast-3
143
140
  - name: ServiceQuotas
144
141
  alias: servicequotas
145
142
  - name: Transfer
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.5.16"
2
+ VERSION = "0.5.20"
3
3
  end
data/readme.md CHANGED
@@ -76,13 +76,13 @@ To run locally, first install the gem:
76
76
 
77
77
  ```
78
78
  $ gem install aws_recon
79
- Fetching aws_recon-0.5.16.gem
79
+ Fetching aws_recon-0.5.17.gem
80
80
  Fetching aws-sdk-3.0.1.gem
81
81
  Fetching parallel-1.20.1.gem
82
82
  ...
83
83
  Successfully installed aws-sdk-3.0.1
84
84
  Successfully installed parallel-1.20.1
85
- Successfully installed aws_recon-0.5.16
85
+ Successfully installed aws_recon-0.5.17
86
86
  ```
87
87
 
88
88
  Or add it to your Gemfile using `bundle`:
@@ -94,7 +94,7 @@ Resolving dependencies...
94
94
  ...
95
95
  Using aws-sdk 3.0.1
96
96
  Using parallel-1.20.1
97
- Using aws_recon 0.5.16
97
+ Using aws_recon 0.5.17
98
98
  ```
99
99
 
100
100
  ## Usage
@@ -280,7 +280,7 @@ Most users will want to limit collection to relevant services and regions. Runni
280
280
  ```
281
281
  $ aws_recon -h
282
282
 
283
- AWS Recon - AWS Inventory Collector (0.5.16)
283
+ AWS Recon - AWS Inventory Collector (0.5.17)
284
284
 
285
285
  Usage: aws_recon [options]
286
286
  -r, --regions [REGIONS] Regions to scan, separated by comma (default: all)
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.16
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-08-11 00:00:00.000000000 Z
12
+ date: 2021-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk