aws_recon 0.4.3 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.solargraph.yml +15 -0
- data/lib/aws_recon/aws_recon.rb +13 -2
- data/lib/aws_recon/collectors/dynamodb.rb +1 -1
- data/lib/aws_recon/collectors/ec2.rb +17 -16
- data/lib/aws_recon/options.rb +7 -0
- data/lib/aws_recon/version.rb +1 -1
- data/readme.md +5 -4
- data/utils/cloudformation/aws-recon-cfn-template.yml +151 -0
- data/{terraform → utils/terraform}/cloudwatch.tf +0 -0
- data/{terraform → utils/terraform}/ecs.tf +1 -0
- data/{terraform → utils/terraform}/iam.tf +0 -0
- data/{terraform → utils/terraform}/main.tf +0 -0
- data/{terraform → utils/terraform}/output.tf +0 -0
- data/{terraform → utils/terraform}/readme.md +0 -0
- data/{terraform → utils/terraform}/s3.tf +0 -0
- data/{terraform → utils/terraform}/vars.tf +1 -0
- data/{terraform → utils/terraform}/vpc.tf +3 -4
- metadata +13 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02f62713767ee1d437543e7684f844a1a9a922179bf6be3688ef7ccb114de345
|
4
|
+
data.tar.gz: d71ef31099b1fbee477b482a9aa84bfe6c9e091aacf2772678cbdf3b9dbfb7ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9215bf848adbd54d2652b35429897ac23e5f7140d6c7aa79db941622c95dee3468bd0354aedcdb3378086592740ea496b435a32adc138ce491a999b56ea4fc59
|
7
|
+
data.tar.gz: f151740b1e793abcae34a948f6375f8ff3a496d52a4df596cd115f59260b0afbbc1710400646c77eece2220fe399aef6ef5f181d2ad5a6cf326ebf51b4ea75d9
|
data/.solargraph.yml
ADDED
data/lib/aws_recon/aws_recon.rb
CHANGED
@@ -65,6 +65,17 @@ module AwsRecon
|
|
65
65
|
@resources.concat(collection) if @options.output_file
|
66
66
|
end
|
67
67
|
|
68
|
+
#
|
69
|
+
# Format @resources as either
|
70
|
+
#
|
71
|
+
def formatted_json
|
72
|
+
if @options.jsonl
|
73
|
+
@resources.map { |r| JSON.generate(r) }.join("\n")
|
74
|
+
else
|
75
|
+
@resources.to_json
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
68
79
|
#
|
69
80
|
# main wrapper
|
70
81
|
#
|
@@ -112,7 +123,7 @@ module AwsRecon
|
|
112
123
|
if @options.output_file && !@options.s3
|
113
124
|
puts "Saving resources to #{@options.output_file}.\n\n"
|
114
125
|
|
115
|
-
File.write(@options.output_file,
|
126
|
+
File.write(@options.output_file, formatted_json)
|
116
127
|
end
|
117
128
|
|
118
129
|
# write output file to S3 bucket
|
@@ -128,7 +139,7 @@ module AwsRecon
|
|
128
139
|
# build IO object and gzip it
|
129
140
|
io = StringIO.new
|
130
141
|
gzip_data = Zlib::GzipWriter.new(io)
|
131
|
-
gzip_data.write(
|
142
|
+
gzip_data.write(formatted_json)
|
132
143
|
gzip_data.close
|
133
144
|
|
134
145
|
# send it to S3
|
@@ -18,7 +18,7 @@ class DynamoDB < Mapper
|
|
18
18
|
|
19
19
|
struct = OpenStruct.new(response)
|
20
20
|
struct.type = 'limits'
|
21
|
-
struct.arn = "arn:aws:dynamodb:#{@region}:#{@account}
|
21
|
+
struct.arn = "arn:aws:dynamodb:#{@region}:#{@account}/limits"
|
22
22
|
|
23
23
|
resources.push(struct.to_h)
|
24
24
|
end
|
@@ -29,7 +29,7 @@ class EC2 < Mapper
|
|
29
29
|
struct = OpenStruct.new
|
30
30
|
struct.attributes = response.account_attributes.map(&:to_h)
|
31
31
|
struct.type = 'account'
|
32
|
-
struct.arn = "arn:aws::#{@account}"
|
32
|
+
struct.arn = "arn:aws:ec2::#{@account}:attributes/account_attributes"
|
33
33
|
|
34
34
|
resources.push(struct.to_h)
|
35
35
|
end
|
@@ -45,6 +45,7 @@ class EC2 < Mapper
|
|
45
45
|
|
46
46
|
struct = OpenStruct.new(response.to_h)
|
47
47
|
struct.type = 'ebs_encryption_settings'
|
48
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:settings/ebs_encryption_settings"
|
48
49
|
|
49
50
|
resources.push(struct.to_h)
|
50
51
|
end
|
@@ -63,7 +64,7 @@ class EC2 < Mapper
|
|
63
64
|
reservation.instances.each do |instance|
|
64
65
|
struct = OpenStruct.new(instance.to_h)
|
65
66
|
struct.type = 'instance'
|
66
|
-
struct.arn = instance.instance_id # no true ARN
|
67
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:instance/#{instance.instance_id}" # no true ARN
|
67
68
|
struct.reservation_id = reservation.reservation_id
|
68
69
|
|
69
70
|
# collect instance user_data
|
@@ -95,7 +96,7 @@ class EC2 < Mapper
|
|
95
96
|
response.vpcs.each do |vpc|
|
96
97
|
struct = OpenStruct.new(vpc.to_h)
|
97
98
|
struct.type = 'vpc'
|
98
|
-
struct.arn = vpc.vpc_id # no true ARN
|
99
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:vpc/#{vpc.vpc_id}" # no true ARN
|
99
100
|
struct.flow_logs = @client
|
100
101
|
.describe_flow_logs({ filter: [{ name: 'resource-id', values: [vpc.vpc_id] }] })
|
101
102
|
.flow_logs.first.to_h
|
@@ -113,7 +114,7 @@ class EC2 < Mapper
|
|
113
114
|
response.security_groups.each do |security_group|
|
114
115
|
struct = OpenStruct.new(security_group.to_h)
|
115
116
|
struct.type = 'security_group'
|
116
|
-
struct.arn = security_group.group_id # no true ARN
|
117
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:security_group/#{security_group.group_id}" # no true ARN
|
117
118
|
|
118
119
|
resources.push(struct.to_h)
|
119
120
|
end
|
@@ -128,7 +129,7 @@ class EC2 < Mapper
|
|
128
129
|
response.network_interfaces.each do |network_interface|
|
129
130
|
struct = OpenStruct.new(network_interface.to_h)
|
130
131
|
struct.type = 'network_interface'
|
131
|
-
struct.arn = network_interface.network_interface_id # no true ARN
|
132
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:network_interface/#{network_interface.network_interface_id}" # no true ARN
|
132
133
|
|
133
134
|
resources.push(struct.to_h)
|
134
135
|
end
|
@@ -143,7 +144,7 @@ class EC2 < Mapper
|
|
143
144
|
response.network_acls.each do |network_acl|
|
144
145
|
struct = OpenStruct.new(network_acl.to_h)
|
145
146
|
struct.type = 'network_acl'
|
146
|
-
struct.arn = network_acl.network_acl_id # no true ARN
|
147
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:network_acl/#{network_acl.network_acl_id}" # no true ARN
|
147
148
|
|
148
149
|
resources.push(struct.to_h)
|
149
150
|
end
|
@@ -173,7 +174,7 @@ class EC2 < Mapper
|
|
173
174
|
response.addresses.each do |address|
|
174
175
|
struct = OpenStruct.new(address.to_h)
|
175
176
|
struct.type = 'eip_address'
|
176
|
-
struct.arn = address.allocation_id
|
177
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:eip_address/#{address.allocation_id}" # no true ARN
|
177
178
|
|
178
179
|
resources.push(struct.to_h)
|
179
180
|
end
|
@@ -188,7 +189,7 @@ class EC2 < Mapper
|
|
188
189
|
response.nat_gateways.each do |gateway|
|
189
190
|
struct = OpenStruct.new(gateway.to_h)
|
190
191
|
struct.type = 'nat_gateway'
|
191
|
-
struct.arn = gateway.nat_gateway_id # no true ARN
|
192
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:nat_gateway/#{gateway.nat_gateway_id}" # no true ARN
|
192
193
|
|
193
194
|
resources.push(struct.to_h)
|
194
195
|
end
|
@@ -203,7 +204,7 @@ class EC2 < Mapper
|
|
203
204
|
response.internet_gateways.each do |gateway|
|
204
205
|
struct = OpenStruct.new(gateway.to_h)
|
205
206
|
struct.type = 'internet_gateway'
|
206
|
-
struct.arn = gateway.internet_gateway_id # no true ARN
|
207
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:internet_gateway/#{gateway.internet_gateway_id}" # no true ARN
|
207
208
|
|
208
209
|
resources.push(struct.to_h)
|
209
210
|
end
|
@@ -218,7 +219,7 @@ class EC2 < Mapper
|
|
218
219
|
response.route_tables.each do |table|
|
219
220
|
struct = OpenStruct.new(table.to_h)
|
220
221
|
struct.type = 'route_table'
|
221
|
-
struct.arn = table.route_table_id # no true ARN
|
222
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:route_table/#{table.route_table_id}" # no true ARN
|
222
223
|
|
223
224
|
resources.push(struct.to_h)
|
224
225
|
end
|
@@ -233,7 +234,7 @@ class EC2 < Mapper
|
|
233
234
|
response.images.each do |image|
|
234
235
|
struct = OpenStruct.new(image.to_h)
|
235
236
|
struct.type = 'image'
|
236
|
-
struct.arn = image.image_id # no true ARN
|
237
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:image/#{image.image_id}" # no true ARN
|
237
238
|
|
238
239
|
resources.push(struct.to_h)
|
239
240
|
end
|
@@ -248,7 +249,7 @@ class EC2 < Mapper
|
|
248
249
|
response.snapshots.each do |snapshot|
|
249
250
|
struct = OpenStruct.new(snapshot.to_h)
|
250
251
|
struct.type = 'snapshot'
|
251
|
-
struct.arn = snapshot.snapshot_id # no true ARN
|
252
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:snapshot/#{snapshot.snapshot_id}" # no true ARN
|
252
253
|
struct.create_volume_permissions = @client.describe_snapshot_attribute({
|
253
254
|
attribute: 'createVolumePermission',
|
254
255
|
snapshot_id: snapshot.snapshot_id
|
@@ -267,7 +268,7 @@ class EC2 < Mapper
|
|
267
268
|
response.flow_logs.each do |flow_log|
|
268
269
|
struct = OpenStruct.new(flow_log.to_h)
|
269
270
|
struct.type = 'flow_log'
|
270
|
-
struct.arn = flow_log.flow_log_id # no true ARN
|
271
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:flow_log/#{flow_log.flow_log_id}" # no true ARN
|
271
272
|
|
272
273
|
resources.push(struct.to_h)
|
273
274
|
end
|
@@ -282,7 +283,7 @@ class EC2 < Mapper
|
|
282
283
|
response.volumes.each do |volume|
|
283
284
|
struct = OpenStruct.new(volume.to_h)
|
284
285
|
struct.type = 'volume'
|
285
|
-
struct.arn = volume.volume_id # no true ARN
|
286
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:volume/#{volume.volume_id}" # no true ARN
|
286
287
|
|
287
288
|
resources.push(struct.to_h)
|
288
289
|
end
|
@@ -297,7 +298,7 @@ class EC2 < Mapper
|
|
297
298
|
response.vpn_gateways.each do |gateway|
|
298
299
|
struct = OpenStruct.new(gateway.to_h)
|
299
300
|
struct.type = 'vpn_gateway'
|
300
|
-
struct.arn = gateway.vpn_gateway_id # no true ARN
|
301
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:vpn_gateway/#{gateway.vpn_gateway_id}" # no true ARN
|
301
302
|
|
302
303
|
resources.push(struct.to_h)
|
303
304
|
end
|
@@ -312,7 +313,7 @@ class EC2 < Mapper
|
|
312
313
|
response.vpc_peering_connections.each do |peer|
|
313
314
|
struct = OpenStruct.new(peer.to_h)
|
314
315
|
struct.type = 'peering_connection'
|
315
|
-
struct.arn = peer.vpc_peering_connection_id # no true ARN
|
316
|
+
struct.arn = "arn:aws:ec2:#{@region}:#{@account}:peering_connection/#{peer.vpc_peering_connection_id}" # no true ARN
|
316
317
|
|
317
318
|
resources.push(struct.to_h)
|
318
319
|
end
|
data/lib/aws_recon/options.rb
CHANGED
@@ -20,6 +20,7 @@ class Parser
|
|
20
20
|
:output_file,
|
21
21
|
:output_format,
|
22
22
|
:threads,
|
23
|
+
:jsonl,
|
23
24
|
:collect_user_data,
|
24
25
|
:skip_slow,
|
25
26
|
:skip_credential_report,
|
@@ -55,6 +56,7 @@ class Parser
|
|
55
56
|
false,
|
56
57
|
false,
|
57
58
|
false,
|
59
|
+
false,
|
58
60
|
false
|
59
61
|
)
|
60
62
|
|
@@ -116,6 +118,11 @@ class Parser
|
|
116
118
|
args.threads = threads.to_i if (0..Parser::MAX_THREADS).include?(threads.to_i)
|
117
119
|
end
|
118
120
|
|
121
|
+
# output NDJSON/JSONL format
|
122
|
+
opts.on('-l', '--json-lines', 'Output NDJSON/JSONL format (default: false)') do
|
123
|
+
args.jsonl = true
|
124
|
+
end
|
125
|
+
|
119
126
|
# collect EC2 instance user data
|
120
127
|
opts.on('-u', '--user-data', 'Collect EC2 instance user data (default: false)') do
|
121
128
|
args.collect_user_data = true
|
data/lib/aws_recon/version.rb
CHANGED
data/readme.md
CHANGED
@@ -54,13 +54,13 @@ To run locally, first install the gem:
|
|
54
54
|
|
55
55
|
```
|
56
56
|
$ gem install aws_recon
|
57
|
-
Fetching aws_recon-0.4.
|
57
|
+
Fetching aws_recon-0.4.5.gem
|
58
58
|
Fetching aws-sdk-3.0.1.gem
|
59
59
|
Fetching parallel-1.20.1.gem
|
60
60
|
...
|
61
61
|
Successfully installed aws-sdk-3.0.1
|
62
62
|
Successfully installed parallel-1.20.1
|
63
|
-
Successfully installed aws_recon-0.4.
|
63
|
+
Successfully installed aws_recon-0.4.5
|
64
64
|
```
|
65
65
|
|
66
66
|
Or add it to your Gemfile using `bundle`:
|
@@ -72,7 +72,7 @@ Resolving dependencies...
|
|
72
72
|
...
|
73
73
|
Using aws-sdk 3.0.1
|
74
74
|
Using parallel-1.20.1
|
75
|
-
Using aws_recon 0.4.
|
75
|
+
Using aws_recon 0.4.5
|
76
76
|
```
|
77
77
|
|
78
78
|
## Usage
|
@@ -249,7 +249,7 @@ Most users will want to limit collection to relevant services and regions. Runni
|
|
249
249
|
```
|
250
250
|
$ aws_recon -h
|
251
251
|
|
252
|
-
AWS Recon - AWS Inventory Collector (0.4.
|
252
|
+
AWS Recon - AWS Inventory Collector (0.4.5)
|
253
253
|
|
254
254
|
Usage: aws_recon [options]
|
255
255
|
-r, --regions [REGIONS] Regions to scan, separated by comma (default: all)
|
@@ -261,6 +261,7 @@ Usage: aws_recon [options]
|
|
261
261
|
-o, --output [OUTPUT] Specify output file (default: output.json)
|
262
262
|
-f, --format [FORMAT] Specify output format (default: aws)
|
263
263
|
-t, --threads [THREADS] Specify max threads (default: 8, max: 128)
|
264
|
+
-l, --json-lines Output NDJSON/JSONL format (default: false)
|
264
265
|
-u, --user-data Collect EC2 instance user data (default: false)
|
265
266
|
-z, --skip-slow Skip slow operations (default: false)
|
266
267
|
-g, --skip-credential-report Skip generating IAM credential report (default: false)
|
@@ -0,0 +1,151 @@
|
|
1
|
+
AWSTemplateFormatVersion: '2010-09-09'
|
2
|
+
Description: 'Deploys AWS Recon inventory collection resources, scheduled ECS task and corresponding IAM roles and policies.'
|
3
|
+
Resources:
|
4
|
+
AWSReconVPC:
|
5
|
+
Type: AWS::EC2::VPC
|
6
|
+
Properties:
|
7
|
+
CidrBlock: '10.75.0.0/27'
|
8
|
+
Tags:
|
9
|
+
- Key: Name
|
10
|
+
Value: aws-recon-CFN
|
11
|
+
AWSReconSubnet:
|
12
|
+
Type: AWS::EC2::Subnet
|
13
|
+
Properties:
|
14
|
+
CidrBlock: '10.75.0.0/28'
|
15
|
+
VpcId: !Ref AWSReconVPC
|
16
|
+
Tags:
|
17
|
+
- Key: Name
|
18
|
+
Value: aws-recon-CFN
|
19
|
+
DependsOn: AWSReconVPC
|
20
|
+
AWSReconSecurityGroup:
|
21
|
+
Type: AWS::EC2::SecurityGroup
|
22
|
+
Properties:
|
23
|
+
GroupDescription: AWS Recon collection egress
|
24
|
+
VpcId: !Ref AWSReconVPC
|
25
|
+
SecurityGroupEgress:
|
26
|
+
- IpProtocol: -1
|
27
|
+
FromPort: 0
|
28
|
+
ToPort: 0
|
29
|
+
CidrIp: 0.0.0.0/0
|
30
|
+
Tags:
|
31
|
+
- Key: Name
|
32
|
+
Value: aws-recon-CFN
|
33
|
+
AWSReconInternetGateway:
|
34
|
+
Type: AWS::EC2::InternetGateway
|
35
|
+
Properties:
|
36
|
+
Tags:
|
37
|
+
- Key: Name
|
38
|
+
Value: aws-recon-CFN
|
39
|
+
AWSReconInternetGatewayAttachment:
|
40
|
+
Type: AWS::EC2::VPCGatewayAttachment
|
41
|
+
Properties:
|
42
|
+
InternetGatewayId: !Ref AWSReconInternetGateway
|
43
|
+
VpcId: !Ref AWSReconVPC
|
44
|
+
AWSReconEgressRouteTable:
|
45
|
+
Type: AWS::EC2::RouteTable
|
46
|
+
Properties:
|
47
|
+
VpcId: !Ref AWSReconVPC
|
48
|
+
Tags:
|
49
|
+
- Key: Name
|
50
|
+
Value: aws-recon-CFN
|
51
|
+
AWSReconSubnetRouteTableAssociation:
|
52
|
+
Type: AWS::EC2::SubnetRouteTableAssociation
|
53
|
+
Properties:
|
54
|
+
SubnetId: !Ref AWSReconSubnet
|
55
|
+
RouteTableId: !Ref AWSReconEgressRouteTable
|
56
|
+
AWSReconEgressRoute:
|
57
|
+
Type: AWS::EC2::Route
|
58
|
+
Properties:
|
59
|
+
DestinationCidrBlock: '0.0.0.0/0'
|
60
|
+
GatewayId: !Ref AWSReconInternetGateway
|
61
|
+
RouteTableId: !Ref AWSReconEgressRouteTable
|
62
|
+
AWSReconECSCluster:
|
63
|
+
Type: AWS::ECS::Cluster
|
64
|
+
Properties:
|
65
|
+
ClusterName: aws-recon-CFN
|
66
|
+
CapacityProviders:
|
67
|
+
- FARGATE
|
68
|
+
Tags:
|
69
|
+
- Key: Name
|
70
|
+
Value: aws-recon-CFN
|
71
|
+
DependsOn: AWSReconSubnet
|
72
|
+
AWSReconECSTask:
|
73
|
+
Type: AWS::ECS::TaskDefinition
|
74
|
+
Properties:
|
75
|
+
Family: aws-recon-CFN
|
76
|
+
RequiresCompatibilities:
|
77
|
+
- FARGATE
|
78
|
+
NetworkMode: awsvpc
|
79
|
+
Cpu: 1024
|
80
|
+
Memory: 2048
|
81
|
+
TaskRoleArn: !Ref AWSReconECSTaskRole
|
82
|
+
ExecutionRoleArn: !Ref AWSReconECSExecutionRole
|
83
|
+
ContainerDefinitions:
|
84
|
+
- Name: aws-recon-CFN
|
85
|
+
Image: 'darkbitio/aws_recon:latest'
|
86
|
+
EntryPoint:
|
87
|
+
- 'aws_recon'
|
88
|
+
- '--verbose'
|
89
|
+
- '--format'
|
90
|
+
- 'custom'
|
91
|
+
AWSReconECSTaskRole:
|
92
|
+
Type: AWS::IAM::Role
|
93
|
+
Properties:
|
94
|
+
RoleName: aws-recon-ecs-task-role
|
95
|
+
ManagedPolicyArns:
|
96
|
+
- 'arn:aws:iam::aws:policy/ReadOnlyAccess'
|
97
|
+
Policies:
|
98
|
+
- PolicyName: AWSReconECSTaskRole
|
99
|
+
PolicyDocument:
|
100
|
+
Version: '2012-10-17'
|
101
|
+
Statement:
|
102
|
+
- Effect: Allow
|
103
|
+
Action: 's3:PutObject'
|
104
|
+
Resource: 'arn:aws:s3:::CHANGEME/*'
|
105
|
+
AssumeRolePolicyDocument:
|
106
|
+
Version: '2012-10-17'
|
107
|
+
Statement:
|
108
|
+
- Effect: Allow
|
109
|
+
Principal:
|
110
|
+
Service:
|
111
|
+
- ecs.amazonaws.com
|
112
|
+
- ecs-tasks.amazonaws.com
|
113
|
+
Action: 'sts:AssumeRole'
|
114
|
+
AWSReconECSExecutionRole:
|
115
|
+
Type: AWS::IAM::Role
|
116
|
+
Properties:
|
117
|
+
RoleName: aws-recon-ecs-execution-role
|
118
|
+
Policies:
|
119
|
+
- PolicyName: AWSReconECSTaskExecutionPolicy
|
120
|
+
PolicyDocument:
|
121
|
+
Version: '2012-10-17'
|
122
|
+
Statement:
|
123
|
+
- Effect: Allow
|
124
|
+
Action:
|
125
|
+
- 'ecr:GetAuthorizationToken'
|
126
|
+
- 'ecr:BatchCheckLayerAvailability'
|
127
|
+
- 'ecr:GetDownloadUrlForLayer'
|
128
|
+
- 'ecr:BatchGetImage'
|
129
|
+
- 'logs:CreateLogStream'
|
130
|
+
- 'logs:PutLogEvents'
|
131
|
+
Resource: '*'
|
132
|
+
AssumeRolePolicyDocument:
|
133
|
+
Version: '2012-10-17'
|
134
|
+
Statement:
|
135
|
+
- Effect: Allow
|
136
|
+
Principal:
|
137
|
+
Service:
|
138
|
+
- ecs-tasks.amazonaws.com
|
139
|
+
Action: 'sts:AssumeRole'
|
140
|
+
AWSReconCloudWatchEventsRole:
|
141
|
+
Type: AWS::IAM::Role
|
142
|
+
Properties:
|
143
|
+
RoleName: aws-recon-events-role
|
144
|
+
AssumeRolePolicyDocument:
|
145
|
+
Version: '2012-10-17'
|
146
|
+
Statement:
|
147
|
+
- Effect: Allow
|
148
|
+
Principal:
|
149
|
+
Service:
|
150
|
+
- events.amazonaws.com
|
151
|
+
Action: 'sts:AssumeRole'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -9,10 +9,9 @@ resource "aws_vpc" "vpc" {
|
|
9
9
|
|
10
10
|
# Create subnet
|
11
11
|
resource "aws_subnet" "subnet" {
|
12
|
-
vpc_id
|
13
|
-
cidr_block
|
14
|
-
availability_zone
|
15
|
-
map_public_ip_on_launch = true
|
12
|
+
vpc_id = aws_vpc.vpc.id
|
13
|
+
cidr_block = local.subnet_cidr_block
|
14
|
+
availability_zone = data.aws_availability_zones.available.names[0]
|
16
15
|
|
17
16
|
tags = {
|
18
17
|
Name = "${var.aws_recon_base_name}-${random_id.aws_recon.hex}-public"
|
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.
|
4
|
+
version: 0.5.1
|
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-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -167,6 +167,7 @@ files:
|
|
167
167
|
- ".github/workflows/smoke-test.yml"
|
168
168
|
- ".gitignore"
|
169
169
|
- ".rubocop.yml"
|
170
|
+
- ".solargraph.yml"
|
170
171
|
- Dockerfile
|
171
172
|
- Gemfile
|
172
173
|
- LICENSE.txt
|
@@ -244,15 +245,16 @@ files:
|
|
244
245
|
- lib/aws_recon/services.yaml
|
245
246
|
- lib/aws_recon/version.rb
|
246
247
|
- readme.md
|
247
|
-
-
|
248
|
-
- terraform/
|
249
|
-
- terraform/
|
250
|
-
- terraform/
|
251
|
-
- terraform/
|
252
|
-
- terraform/
|
253
|
-
- terraform/
|
254
|
-
- terraform/
|
255
|
-
- terraform/
|
248
|
+
- utils/cloudformation/aws-recon-cfn-template.yml
|
249
|
+
- utils/terraform/cloudwatch.tf
|
250
|
+
- utils/terraform/ecs.tf
|
251
|
+
- utils/terraform/iam.tf
|
252
|
+
- utils/terraform/main.tf
|
253
|
+
- utils/terraform/output.tf
|
254
|
+
- utils/terraform/readme.md
|
255
|
+
- utils/terraform/s3.tf
|
256
|
+
- utils/terraform/vars.tf
|
257
|
+
- utils/terraform/vpc.tf
|
256
258
|
homepage: https://github.com/darkbitio/aws-recon
|
257
259
|
licenses:
|
258
260
|
- MIT
|