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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ea30bb9feaa68c1aa5a90c8888ff341f6d67f38f7a113a43d80cadfc25e6ec1
4
- data.tar.gz: 7c417745acb025337f8f9d1843691acc37569bacdaf83e6d5423a218c9af6eae
3
+ metadata.gz: 6a7f47022478c23d46ab98689197a4f986b4dd9b0c31f8b735196e7cb6367f43
4
+ data.tar.gz: '09b8c94ee155aec24c9b33912cc2a547cb0be6e022e4a5bbdcce6cce3ed72877'
5
5
  SHA512:
6
- metadata.gz: e9eb11461d22069eb2f26da22dece1ad3d641d253b7aa231b107807e3d001fa86e5049b50d9ee2b9df4052519935d156bed2dfddef15caf24e6f94ed9948394b
7
- data.tar.gz: 9e311bddbd3632829c109815ef6ff8a65eff147a855eaae347147b2af301d33c5837c9423536c119058a6af0864cf4ffd02a599b6d98f51a0193fdbf5a71ae9e
6
+ metadata.gz: 98f874c9b86214db1e351aeba46d23c7fbf1c33e88bd3164f1002a17b4643a3b46f65b6702efef41a90083c38631ac737661f98f867049165c8ba4c66a3b28dc
7
+ data.tar.gz: c2d70e2d05ee8e9161a8f90d2d066744205e55b0c383c1c8246f827aa1a8f75fa4651745612471f2d6baf0474a46b8e28d1a50bb336f759f3e9437cf36f4ce91
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aws_recon (0.2.3)
4
+ aws_recon (0.2.5)
5
5
  aws-sdk (~> 3.0)
6
6
  parallel (~> 1.19)
7
7
 
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module AwsRecon
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
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
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 00:00:00.000000000 Z
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"