aws_recon 0.5.7 → 0.5.8
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/aws_recon.rb +3 -3
- data/lib/aws_recon/collectors/lambda.rb +4 -0
- data/lib/aws_recon/options.rb +3 -2
- 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: cacdfedc9b86afcaaa776b95751ddbd3799dde854ed190b7e79668cbda08ce8d
|
4
|
+
data.tar.gz: 30f07c6ab93754deb298981aa3f8f2d71692c4537dc0de98f4e259208b734395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55370f9a76e8fb31e426c5af9b9cd768ae201305aed403abfd7f1e5c724aae9c88bd49c233c928bf64d7e5ded395b1741a0663c0264a8c62b3ea08363d5c228f
|
7
|
+
data.tar.gz: 63e30b67a206a3ee631eaddb3aa558e85f2d1f7316d1b3a75b9079c18af4a5e98d234900bc75e69615609d646c8ccd17d3d9c7dc39ff5f5bc3a564bc64c0ee7e
|
data/lib/aws_recon/aws_recon.rb
CHANGED
@@ -34,7 +34,7 @@ module AwsRecon
|
|
34
34
|
# formatter
|
35
35
|
@formatter = Formatter.new
|
36
36
|
|
37
|
-
return
|
37
|
+
return if @options.stream_output
|
38
38
|
|
39
39
|
puts "\nStarting collection with #{@options.threads} threads...\n"
|
40
40
|
end
|
@@ -66,7 +66,7 @@ module AwsRecon
|
|
66
66
|
end
|
67
67
|
|
68
68
|
#
|
69
|
-
# Format @resources as either
|
69
|
+
# Format @resources as either JSON or JSONL
|
70
70
|
#
|
71
71
|
def formatted_json
|
72
72
|
if @options.jsonl
|
@@ -117,7 +117,7 @@ module AwsRecon
|
|
117
117
|
ensure
|
118
118
|
elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - @starting
|
119
119
|
|
120
|
-
puts "\nFinished in #{elapsed.to_i} seconds.\n\n"
|
120
|
+
puts "\nFinished in #{elapsed.to_i} seconds.\n\n" unless @options.stream_output
|
121
121
|
|
122
122
|
# write output file
|
123
123
|
if @options.output_file && !@options.s3
|
@@ -17,6 +17,9 @@ class Lambda < Mapper
|
|
17
17
|
struct = OpenStruct.new(function)
|
18
18
|
struct.type = 'function'
|
19
19
|
struct.arn = function.function_arn
|
20
|
+
struct.vpc_config = function.vpc_config.to_h
|
21
|
+
struct.tracing_config = function.tracing_config.to_h
|
22
|
+
struct.layers = function.layers ? function.layers.map(&:to_h) : []
|
20
23
|
struct.policy = @client.get_policy({ function_name: function.function_name }).policy.parse_policy
|
21
24
|
|
22
25
|
rescue Aws::Lambda::Errors::ResourceNotFoundException => e
|
@@ -36,6 +39,7 @@ class Lambda < Mapper
|
|
36
39
|
struct = OpenStruct.new(layer)
|
37
40
|
struct.type = 'layer'
|
38
41
|
struct.arn = layer.layer_arn
|
42
|
+
struct.latest_matching_version = layer.latest_matching_version.to_h
|
39
43
|
|
40
44
|
# list_layer_versions
|
41
45
|
struct.versions = @client.list_layer_versions({ layer_name: layer.layer_name }).layer_versions.map(&:to_h)
|
data/lib/aws_recon/options.rb
CHANGED
@@ -100,6 +100,7 @@ class Parser
|
|
100
100
|
|
101
101
|
# write output file to S3 bucket
|
102
102
|
opts.on('-b', '--s3-bucket [BUCKET:REGION]', 'Write output file to S3 bucket (default: \'\')') do |bucket_with_region|
|
103
|
+
args.stream_output = false
|
103
104
|
args.s3 = bucket_with_region
|
104
105
|
end
|
105
106
|
|
@@ -109,8 +110,8 @@ class Parser
|
|
109
110
|
end
|
110
111
|
|
111
112
|
# output format
|
112
|
-
opts.on('-f', '--format [FORMAT]', 'Specify output format (default: aws)') do |
|
113
|
-
args.output_format =
|
113
|
+
opts.on('-f', '--format [FORMAT]', 'Specify output format (default: aws)') do |f|
|
114
|
+
args.output_format = f.downcase if %w[aws custom].include?(f.downcase)
|
114
115
|
end
|
115
116
|
|
116
117
|
# threads
|
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.8
|
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-04-
|
12
|
+
date: 2021-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|