aws_recon 0.4.3 → 0.4.4
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/version.rb +1 -1
- data/utils/cloudformation/aws-recon-cfn-template.yml +151 -0
- data/{terraform → utils/terraform}/cloudwatch.tf +0 -0
- data/{terraform → utils/terraform}/ecs.tf +0 -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 +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48ccf03d964fff678dc732fcf74d4dcd9c7c06293845bbb9a4f54e9e1ce61a24
|
4
|
+
data.tar.gz: 7c39747a7845fe497be052baae41af8ee45014166d97114abb797d5f6c06e5b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b6c26ff3b38dd58c63313b70a609e6b08fe6d16762afb9651bbc81d6cef21d7c46e8b11ad73d40caf0e6abbfd877ef5d5f2fde1536425b70a25afe82b7a4a78
|
7
|
+
data.tar.gz: a74af8ad1b868895d997110a4688bc88266536ad2187c235ba27a0720e3ccce0d18d6959981ab3e82e40bb738944d1402380761f9c3c65ce33cc1649bfddbc4e
|
data/lib/aws_recon/version.rb
CHANGED
@@ -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
|
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.
|
4
|
+
version: 0.4.4
|
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-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
@@ -244,15 +244,16 @@ files:
|
|
244
244
|
- lib/aws_recon/services.yaml
|
245
245
|
- lib/aws_recon/version.rb
|
246
246
|
- readme.md
|
247
|
-
-
|
248
|
-
- terraform/
|
249
|
-
- terraform/
|
250
|
-
- terraform/
|
251
|
-
- terraform/
|
252
|
-
- terraform/
|
253
|
-
- terraform/
|
254
|
-
- terraform/
|
255
|
-
- terraform/
|
247
|
+
- utils/cloudformation/aws-recon-cfn-template.yml
|
248
|
+
- utils/terraform/cloudwatch.tf
|
249
|
+
- utils/terraform/ecs.tf
|
250
|
+
- utils/terraform/iam.tf
|
251
|
+
- utils/terraform/main.tf
|
252
|
+
- utils/terraform/output.tf
|
253
|
+
- utils/terraform/readme.md
|
254
|
+
- utils/terraform/s3.tf
|
255
|
+
- utils/terraform/vars.tf
|
256
|
+
- utils/terraform/vpc.tf
|
256
257
|
homepage: https://github.com/darkbitio/aws-recon
|
257
258
|
licenses:
|
258
259
|
- MIT
|