aws_recon 0.5.26 → 0.5.29

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff3d14f71d26d19cfee5137ed0257d5b2c620a00fd378dd2f289411451abeb3b
4
- data.tar.gz: 118f02623ca139db1bd4da2a6425534b1f896b59ac464e21985519fb3527a09c
3
+ metadata.gz: 371ab77cf78113d22bfaaa5ec83a75582f0454ad70418b93ac028015e79f9c74
4
+ data.tar.gz: b708833de5ba18b610919d1f0c0601a27051af57effa38c068fc787d1ae87a2f
5
5
  SHA512:
6
- metadata.gz: b98e02e9fc9258cc70e9c91a12260795cec288c9e442a711c039841608ad0eaa37ebcf74fa6f1b4112fc163230bae1a879e40e5cb5a79d4a620b069f6c1d94bf
7
- data.tar.gz: 7e08840e1604decccc201b6e327aceedac4dcf37c6b306bac3868750c5d69c72144f6fbd1a12f7ab291fb7eea0e9e01196d02c3eda4a106102054e6c7204f652
6
+ metadata.gz: 44236d1c9dd63e3b6fd0f1e522e924fb4ae49cb05745b60ca7cc58b8fecd13ee010238a9f5b65726c6b7b00151c14c1428903bde37bcede570c48cef6f5ccf35
7
+ data.tar.gz: d2d01f99466f4f93d7f25648dd714bf7c96950935bda0e31e3381fdf29b17aca323f84458c77e6d8b718b75f5793e185fcdbbe25eb6568db732d805e4ff48aa6
@@ -1,6 +1,7 @@
1
1
  name: docker-build
2
2
 
3
3
  on:
4
+ workflow_dispatch:
4
5
  push:
5
6
  branches: build
6
7
  paths:
@@ -0,0 +1,116 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Collect Glue resources
5
+ #
6
+ class Glue < Mapper
7
+ #
8
+ # Returns an array of resources.
9
+ #
10
+ def collect
11
+ resources = []
12
+ #
13
+ # get_data_catalog_encryption_settings
14
+ #
15
+ @client.get_data_catalog_encryption_settings.each_with_index do |response, page|
16
+ log(response.context.operation_name, page)
17
+
18
+ struct = OpenStruct.new(response.to_h)
19
+ struct.type = 'catalog_encryption_settings'
20
+ struct.arn = "arn:aws:glue:#{@region}:#{@account}:data-catalog-encryption-settings" # no true ARN
21
+ resources.push(struct.to_h)
22
+ end
23
+
24
+ #
25
+ # get_security_configurations
26
+ #
27
+ @client.get_security_configurations.each_with_index do |response, page|
28
+ log(response.context.operation_name, page)
29
+
30
+ response.security_configurations.each do |security_configuration|
31
+ struct = OpenStruct.new(security_configuration.to_h)
32
+ struct.type = 'security_configuration'
33
+ struct.arn = "arn:aws:glue:#{@region}:#{@account}:security-configuration/#{security_configuration.name}" # no true ARN
34
+ resources.push(struct.to_h)
35
+ end
36
+ end
37
+
38
+ #
39
+ # get_databases
40
+ #
41
+ @client.get_databases.each_with_index do |response, page|
42
+ log(response.context.operation_name, page)
43
+
44
+ response.database_list.each do |database|
45
+ struct = OpenStruct.new(database.to_h)
46
+ struct.type = 'database'
47
+ struct.arn = "arn:aws:glue:#{@region}:#{@account}:database/#{database.name}"
48
+
49
+ #
50
+ # get_tables
51
+ #
52
+ tables = @client.get_tables({ database_name: database.name })
53
+ struct.tables = tables.to_h
54
+
55
+ resources.push(struct.to_h)
56
+ end
57
+ end
58
+
59
+ #
60
+ # get_jobs
61
+ #
62
+ @client.get_jobs.each_with_index do |response, page|
63
+ log(response.context.operation_name, page)
64
+
65
+ response.jobs.each do |job|
66
+ struct = OpenStruct.new(job.to_h)
67
+ struct.type = 'job'
68
+ struct.arn = "arn:aws:glue:#{@region}:#{@account}:job/#{job.name}"
69
+ resources.push(struct.to_h)
70
+ end
71
+ end
72
+
73
+ #
74
+ # get_dev_endpoints
75
+ #
76
+ @client.get_dev_endpoints.each_with_index do |response, page|
77
+ log(response.context.operation_name, page)
78
+
79
+ response.dev_endpoints.each do |dev_endpoint|
80
+ struct = OpenStruct.new(dev_endpoint.to_h)
81
+ struct.type = 'dev_endpoint'
82
+ struct.arn = "arn:aws:glue:#{@region}:#{@account}:devEndpoint/#{dev_endpoint.endpoint_name}"
83
+ resources.push(struct.to_h)
84
+ end
85
+ end
86
+
87
+ #
88
+ # get_crawlers
89
+ #
90
+ @client.get_crawlers.each_with_index do |response, page|
91
+ log(response.context.operation_name, page)
92
+
93
+ response.crawlers.each do |crawler|
94
+ struct = OpenStruct.new(crawler.to_h)
95
+ struct.type = 'crawler'
96
+ struct.arn = "arn:aws:glue:#{@region}:#{@account}:crawler/#{crawler.name}"
97
+ resources.push(struct.to_h)
98
+ end
99
+ end
100
+
101
+ #
102
+ # get_connections
103
+ #
104
+ @client.get_connections.each_with_index do |response, page|
105
+ log(response.context.operation_name, page)
106
+
107
+ response.connection_list.each do |connection|
108
+ struct = OpenStruct.new(connection.to_h)
109
+ struct.type = 'connection'
110
+ struct.arn = "arn:aws:glue:#{@region}:#{@account}:connection/#{connection.name}"
111
+ resources.push(struct.to_h)
112
+ end
113
+ end
114
+ resources
115
+ end
116
+ end
@@ -41,6 +41,8 @@
41
41
  alias: elasticache
42
42
  - name: EMR
43
43
  alias: emr
44
+ - name: Glue
45
+ alias: glue
44
46
  - name: IAM
45
47
  global: true
46
48
  alias: iam
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.5.26"
2
+ VERSION = "0.5.29"
3
3
  end
data/readme.md CHANGED
@@ -368,6 +368,7 @@ AWS Recon aims to collect all resources and metadata that are relevant in determ
368
368
  - [x] Firehose
369
369
  - [ ] FMS
370
370
  - [ ] Glacier
371
+ - [x] Glue
371
372
  - [x] IAM
372
373
  - [x] KMS
373
374
  - [x] Kafka
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.26
4
+ version: 0.5.29
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: 2022-03-15 00:00:00.000000000 Z
12
+ date: 2022-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
@@ -212,6 +212,7 @@ files:
212
212
  - lib/aws_recon/collectors/elasticsearch.rb
213
213
  - lib/aws_recon/collectors/emr.rb
214
214
  - lib/aws_recon/collectors/firehose.rb
215
+ - lib/aws_recon/collectors/glue.rb
215
216
  - lib/aws_recon/collectors/guardduty.rb
216
217
  - lib/aws_recon/collectors/iam.rb
217
218
  - lib/aws_recon/collectors/kafka.rb