aws_recon 0.2.19 → 0.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws_recon/collectors/guardduty.rb +14 -1
- data/lib/aws_recon/collectors/secretsmanager.rb +26 -0
- data/lib/aws_recon/collectors/securityhub.rb +23 -0
- data/lib/aws_recon/services.yaml +4 -0
- data/lib/aws_recon/version.rb +1 -1
- data/readme.md +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b945e5c44370658e13ee470fee26d7e0b46fb6102a661485be9513af305f45d
|
4
|
+
data.tar.gz: 969330b10b9a8264bdb5759b1c910b74ccf05e855f8f380cdebdac8b3694fb11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7d26039b60a21370bd7000d7ccaca93cfc5efc7c0dba88ae5d7ea12d63d3a7b8f973b06d3a1a2633fb82804a716f163ffda23f96a00ee73251eb85956f14dfd
|
7
|
+
data.tar.gz: 61b1aa696e9ec44fd6b93d4ced975be8a2bb514537ed232db8a11cb840045bc52132a215a21a99e573f4df0b557b1612eb4dda458c249c0e5f86939b83049680
|
@@ -21,8 +21,21 @@ class GuardDuty < Mapper
|
|
21
21
|
struct.type = 'detector'
|
22
22
|
struct.arn = "arn:aws:guardduty:#{@region}:detector/#{detector}"
|
23
23
|
|
24
|
+
# get_findings_statistics (only active findings)
|
25
|
+
struct.findings_statistics = @client.get_findings_statistics({
|
26
|
+
detector_id: detector,
|
27
|
+
finding_statistic_types: ['COUNT_BY_SEVERITY'],
|
28
|
+
finding_criteria: {
|
29
|
+
criterion: {
|
30
|
+
'service.archived': {
|
31
|
+
eq: ['false']
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}).finding_statistics.to_h
|
36
|
+
|
24
37
|
# get_master_account
|
25
|
-
struct.master_account = @client.get_master_account({ detector_id: detector }).to_h
|
38
|
+
struct.master_account = @client.get_master_account({ detector_id: detector }).master.to_h
|
26
39
|
|
27
40
|
resources.push(struct.to_h)
|
28
41
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class SecretsManager < Mapper
|
2
|
+
#
|
3
|
+
# Returns an array of resources.
|
4
|
+
#
|
5
|
+
def collect
|
6
|
+
resources = []
|
7
|
+
|
8
|
+
#
|
9
|
+
# describe_auto_scaling_groups
|
10
|
+
#
|
11
|
+
@client.list_secrets.each_with_index do |response, page|
|
12
|
+
log(response.context.operation_name, page)
|
13
|
+
|
14
|
+
response.secret_list.each_with_index do |secret, i|
|
15
|
+
log(response.context.operation_name, i)
|
16
|
+
|
17
|
+
struct = OpenStruct.new(secret.to_h)
|
18
|
+
struct.type = 'secret'
|
19
|
+
|
20
|
+
resources.push(struct.to_h)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
resources
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class SecurityHub < Mapper
|
2
|
+
#
|
3
|
+
# Returns an array of resources.
|
4
|
+
#
|
5
|
+
def collect
|
6
|
+
resources = []
|
7
|
+
|
8
|
+
#
|
9
|
+
# describe_hub
|
10
|
+
#
|
11
|
+
@client.describe_hub.each do |response|
|
12
|
+
log(response.context.operation_name)
|
13
|
+
|
14
|
+
struct = OpenStruct.new(response.to_h)
|
15
|
+
struct.type = 'hub'
|
16
|
+
struct.arn = response.hub_arn
|
17
|
+
|
18
|
+
resources.push(struct.to_h)
|
19
|
+
end
|
20
|
+
|
21
|
+
resources
|
22
|
+
end
|
23
|
+
end
|
data/lib/aws_recon/services.yaml
CHANGED
data/lib/aws_recon/version.rb
CHANGED
data/readme.md
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.2.
|
4
|
+
version: 0.2.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: 2020-11-
|
12
|
+
date: 2020-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -223,6 +223,8 @@ files:
|
|
223
223
|
- lib/aws_recon/collectors/route53domains.rb
|
224
224
|
- lib/aws_recon/collectors/s3.rb
|
225
225
|
- lib/aws_recon/collectors/sagemaker.rb
|
226
|
+
- lib/aws_recon/collectors/secretsmanager.rb
|
227
|
+
- lib/aws_recon/collectors/securityhub.rb
|
226
228
|
- lib/aws_recon/collectors/servicequotas.rb
|
227
229
|
- lib/aws_recon/collectors/ses.rb
|
228
230
|
- lib/aws_recon/collectors/shield.rb
|