aws_recon 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/stale.yml +17 -0
- data/Gemfile.lock +1 -1
- data/lib/aws_recon/collectors/ec2.rb +17 -0
- data/lib/aws_recon/options.rb +7 -0
- data/lib/aws_recon/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a7f47022478c23d46ab98689197a4f986b4dd9b0c31f8b735196e7cb6367f43
|
4
|
+
data.tar.gz: '09b8c94ee155aec24c9b33912cc2a547cb0be6e022e4a5bbdcce6cce3ed72877'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98f874c9b86214db1e351aeba46d23c7fbf1c33e88bd3164f1002a17b4643a3b46f65b6702efef41a90083c38631ac737661f98f867049165c8ba4c66a3b28dc
|
7
|
+
data.tar.gz: c2d70e2d05ee8e9161a8f90d2d066744205e55b0c383c1c8246f827aa1a8f75fa4651745612471f2d6baf0474a46b8e28d1a50bb336f759f3e9437cf36f4ce91
|
data/.github/stale.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Number of days of inactivity before an issue becomes stale
|
2
|
+
daysUntilStale: 30
|
3
|
+
# Number of days of inactivity before a stale issue is closed
|
4
|
+
daysUntilClose: 5
|
5
|
+
# Issues with these labels will never be considered stale
|
6
|
+
exemptLabels:
|
7
|
+
- pinned
|
8
|
+
- security
|
9
|
+
# Label to use when marking an issue as stale
|
10
|
+
staleLabel: wontfix
|
11
|
+
# Comment to post when marking an issue as stale. Set to `false` to disable
|
12
|
+
markComment: >
|
13
|
+
This issue has been automatically marked as stale because it has not had
|
14
|
+
recent activity. It will be closed if no further activity occurs. Thank you
|
15
|
+
for your contributions.
|
16
|
+
# Comment to post when closing a stale issue. Set to `false` to disable
|
17
|
+
closeComment: false
|
data/Gemfile.lock
CHANGED
@@ -48,6 +48,23 @@ class EC2 < Mapper
|
|
48
48
|
struct.arn = instance.instance_id # no true ARN
|
49
49
|
struct.reservation_id = reservation.reservation_id
|
50
50
|
|
51
|
+
# collect instance user_data
|
52
|
+
if @options.collect_user_data
|
53
|
+
user_data_raw = @client.describe_instance_attribute({
|
54
|
+
attribute: 'userData',
|
55
|
+
instance_id: instance.instance_id
|
56
|
+
}).user_data.to_h[:value]
|
57
|
+
|
58
|
+
# don't save non-string user_data
|
59
|
+
if user_data_raw
|
60
|
+
user_data = Base64.decode64(user_data_raw)
|
61
|
+
|
62
|
+
if user_data.force_encoding('UTF-8').ascii_only?
|
63
|
+
struct.user_data = user_data
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
51
68
|
resources.push(struct.to_h)
|
52
69
|
end
|
53
70
|
end
|
data/lib/aws_recon/options.rb
CHANGED
@@ -15,6 +15,7 @@ class Parser
|
|
15
15
|
:output_file,
|
16
16
|
:output_format,
|
17
17
|
:threads,
|
18
|
+
:collect_user_data,
|
18
19
|
:skip_slow,
|
19
20
|
:stream_output,
|
20
21
|
:verbose,
|
@@ -43,6 +44,7 @@ class Parser
|
|
43
44
|
false,
|
44
45
|
false,
|
45
46
|
false,
|
47
|
+
false,
|
46
48
|
false
|
47
49
|
)
|
48
50
|
|
@@ -103,6 +105,11 @@ class Parser
|
|
103
105
|
end
|
104
106
|
end
|
105
107
|
|
108
|
+
# collect EC2 instance user data
|
109
|
+
opts.on('-u', '--user-data', 'Collect EC2 instance user data (default: false)') do
|
110
|
+
args.collect_user_data = true
|
111
|
+
end
|
112
|
+
|
106
113
|
# skip slow operations
|
107
114
|
opts.on('-z', '--skip-slow', 'Skip slow operations (default: false)') do
|
108
115
|
args.skip_slow = true
|
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.2.
|
4
|
+
version: 0.2.5
|
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-08-
|
12
|
+
date: 2020-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -148,6 +148,7 @@ executables:
|
|
148
148
|
extensions: []
|
149
149
|
extra_rdoc_files: []
|
150
150
|
files:
|
151
|
+
- ".github/stale.yml"
|
151
152
|
- ".gitignore"
|
152
153
|
- ".rubocop.yml"
|
153
154
|
- ".travis.yml"
|