vpcatlas 0.4.2__py3-none-any.whl

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.
Files changed (82) hide show
  1. vpcatlas/__init__.py +3 -0
  2. vpcatlas/__main__.py +8 -0
  3. vpcatlas/auditor-policy.json +264 -0
  4. vpcatlas/cli.py +1054 -0
  5. vpcatlas/collectors/__init__.py +22 -0
  6. vpcatlas/collectors/_dns_targets.py +321 -0
  7. vpcatlas/collectors/account_services.py +379 -0
  8. vpcatlas/collectors/acm.py +94 -0
  9. vpcatlas/collectors/apigw.py +350 -0
  10. vpcatlas/collectors/base.py +465 -0
  11. vpcatlas/collectors/cloudfront.py +107 -0
  12. vpcatlas/collectors/discover.py +333 -0
  13. vpcatlas/collectors/dynamodb.py +41 -0
  14. vpcatlas/collectors/ec2_instances.py +191 -0
  15. vpcatlas/collectors/ec2_peering.py +55 -0
  16. vpcatlas/collectors/ec2_tgw.py +236 -0
  17. vpcatlas/collectors/ec2_vpc.py +499 -0
  18. vpcatlas/collectors/ecs.py +151 -0
  19. vpcatlas/collectors/efs.py +66 -0
  20. vpcatlas/collectors/eks.py +106 -0
  21. vpcatlas/collectors/elasticache.py +159 -0
  22. vpcatlas/collectors/elb.py +107 -0
  23. vpcatlas/collectors/endpoints.py +126 -0
  24. vpcatlas/collectors/lambda_fn.py +120 -0
  25. vpcatlas/collectors/linker.py +1044 -0
  26. vpcatlas/collectors/network_firewall.py +102 -0
  27. vpcatlas/collectors/prefix_lists.py +48 -0
  28. vpcatlas/collectors/ram.py +104 -0
  29. vpcatlas/collectors/rds.py +167 -0
  30. vpcatlas/collectors/route53.py +183 -0
  31. vpcatlas/collectors/route53_resolver.py +90 -0
  32. vpcatlas/collectors/s3.py +182 -0
  33. vpcatlas/collectors/session.py +162 -0
  34. vpcatlas/collectors/shield.py +65 -0
  35. vpcatlas/collectors/targets.py +159 -0
  36. vpcatlas/collectors/vpn_dx.py +262 -0
  37. vpcatlas/collectors/wafv2.py +155 -0
  38. vpcatlas/dashboard/__init__.py +6 -0
  39. vpcatlas/dashboard/app.py +724 -0
  40. vpcatlas/dashboard/healthcheck.py +23 -0
  41. vpcatlas/dashboard/history.py +232 -0
  42. vpcatlas/dashboard/lambda_handler.py +62 -0
  43. vpcatlas/dashboard/scan.py +304 -0
  44. vpcatlas/dashboard/security.py +197 -0
  45. vpcatlas/dashboard/service.py +1038 -0
  46. vpcatlas/dashboard/settings.py +245 -0
  47. vpcatlas/dashboard/snapshot.py +207 -0
  48. vpcatlas/dashboard/static/app.css +261 -0
  49. vpcatlas/dashboard/static/app.js +575 -0
  50. vpcatlas/dashboard/static/vendor/NOTICE.txt +15 -0
  51. vpcatlas/dashboard/static/vendor/viewer-static.min.js +9176 -0
  52. vpcatlas/dashboard/store.py +392 -0
  53. vpcatlas/dashboard/templates/base.html +20 -0
  54. vpcatlas/dashboard/templates/diff.html +181 -0
  55. vpcatlas/dashboard/templates/history.html +410 -0
  56. vpcatlas/dashboard/templates/index.html +150 -0
  57. vpcatlas/exporters/__init__.py +105 -0
  58. vpcatlas/exporters/behind.py +176 -0
  59. vpcatlas/exporters/drawio.py +623 -0
  60. vpcatlas/exporters/families.py +94 -0
  61. vpcatlas/exporters/graphview.py +504 -0
  62. vpcatlas/exporters/layout.py +3988 -0
  63. vpcatlas/exporters/lucid.py +573 -0
  64. vpcatlas/exporters/lucid_classes.json +38 -0
  65. vpcatlas/exporters/registry.py +1080 -0
  66. vpcatlas/exporters/service_rows.py +762 -0
  67. vpcatlas/exporters/vpc_level.py +1038 -0
  68. vpcatlas/inventory/__init__.py +27 -0
  69. vpcatlas/inventory/build.py +816 -0
  70. vpcatlas/inventory/render.py +541 -0
  71. vpcatlas/inventory/schema.py +147 -0
  72. vpcatlas/model/__init__.py +155 -0
  73. vpcatlas/model/diff.py +321 -0
  74. vpcatlas/model/graph.py +399 -0
  75. vpcatlas/model/redact.py +57 -0
  76. vpcatlas/model/resources.py +1188 -0
  77. vpcatlas/services.py +131 -0
  78. vpcatlas-0.4.2.dist-info/METADATA +350 -0
  79. vpcatlas-0.4.2.dist-info/RECORD +82 -0
  80. vpcatlas-0.4.2.dist-info/WHEEL +4 -0
  81. vpcatlas-0.4.2.dist-info/entry_points.txt +2 -0
  82. vpcatlas-0.4.2.dist-info/licenses/LICENSE +21 -0
vpcatlas/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """vpcatlas: read-only AWS network discovery, inventory and AWS-style diagrams."""
2
+
3
+ __version__ = "0.4.2"
vpcatlas/__main__.py ADDED
@@ -0,0 +1,8 @@
1
+ """``python -m vpcatlas`` runs the same command line as the ``vpcatlas`` script."""
2
+
3
+ import sys
4
+
5
+ from vpcatlas.cli import app
6
+
7
+ if __name__ == "__main__":
8
+ sys.exit(app())
@@ -0,0 +1,264 @@
1
+ {
2
+ "Version": "2012-10-17",
3
+ "Statement": [
4
+ {
5
+ "Sid": "CoreIdentity",
6
+ "Effect": "Allow",
7
+ "Action": [
8
+ "sts:GetCallerIdentity"
9
+ ],
10
+ "Resource": "*"
11
+ },
12
+ {
13
+ "Sid": "CoreEc2Network",
14
+ "Effect": "Allow",
15
+ "Action": [
16
+ "ec2:DescribeAvailabilityZones",
17
+ "ec2:DescribeCustomerGateways",
18
+ "ec2:DescribeEgressOnlyInternetGateways",
19
+ "ec2:DescribeInternetGateways",
20
+ "ec2:DescribeManagedPrefixLists",
21
+ "ec2:DescribeNatGateways",
22
+ "ec2:DescribeNetworkAcls",
23
+ "ec2:DescribeNetworkInterfaces",
24
+ "ec2:DescribeRegions",
25
+ "ec2:DescribeRouteTables",
26
+ "ec2:DescribeSecurityGroups",
27
+ "ec2:DescribeSubnets",
28
+ "ec2:DescribeTransitGatewayAttachments",
29
+ "ec2:DescribeTransitGatewayPeeringAttachments",
30
+ "ec2:DescribeTransitGatewayRouteTables",
31
+ "ec2:DescribeTransitGateways",
32
+ "ec2:DescribeTransitGatewayVpcAttachments",
33
+ "ec2:DescribeVpcEndpointConnections",
34
+ "ec2:DescribeVpcEndpoints",
35
+ "ec2:DescribeVpcEndpointServiceConfigurations",
36
+ "ec2:DescribeVpcPeeringConnections",
37
+ "ec2:DescribeVpcs",
38
+ "ec2:DescribeVpnConnections",
39
+ "ec2:DescribeVpnGateways",
40
+ "ec2:GetManagedPrefixListEntries",
41
+ "ec2:GetTransitGatewayRouteTableAssociations",
42
+ "ec2:GetTransitGatewayRouteTablePropagations",
43
+ "ec2:SearchTransitGatewayRoutes"
44
+ ],
45
+ "Resource": "*"
46
+ },
47
+ {
48
+ "Sid": "CoreElasticLoadBalancing",
49
+ "Effect": "Allow",
50
+ "Action": [
51
+ "elasticloadbalancing:DescribeLoadBalancers",
52
+ "elasticloadbalancing:DescribeTags"
53
+ ],
54
+ "Resource": "*"
55
+ },
56
+ {
57
+ "Sid": "CoreNetworkFirewall",
58
+ "Effect": "Allow",
59
+ "Action": [
60
+ "network-firewall:DescribeFirewall",
61
+ "network-firewall:DescribeFirewallPolicy",
62
+ "network-firewall:ListFirewallPolicies",
63
+ "network-firewall:ListFirewalls"
64
+ ],
65
+ "Resource": "*"
66
+ },
67
+ {
68
+ "Sid": "CoreRoute53Resolver",
69
+ "Effect": "Allow",
70
+ "Action": [
71
+ "route53resolver:ListResolverEndpointIpAddresses",
72
+ "route53resolver:ListResolverEndpoints",
73
+ "route53resolver:ListResolverRuleAssociations",
74
+ "route53resolver:ListResolverRules"
75
+ ],
76
+ "Resource": "*"
77
+ },
78
+ {
79
+ "Sid": "CoreResourceAccessManager",
80
+ "Effect": "Allow",
81
+ "Action": [
82
+ "ram:GetResourceShares",
83
+ "ram:ListPrincipals",
84
+ "ram:ListResources"
85
+ ],
86
+ "Resource": "*"
87
+ },
88
+ {
89
+ "Sid": "CoreDirectConnect",
90
+ "Effect": "Allow",
91
+ "Action": [
92
+ "directconnect:DescribeConnections",
93
+ "directconnect:DescribeDirectConnectGatewayAssociations",
94
+ "directconnect:DescribeDirectConnectGatewayAttachments",
95
+ "directconnect:DescribeDirectConnectGateways",
96
+ "directconnect:DescribeVirtualInterfaces"
97
+ ],
98
+ "Resource": "*"
99
+ },
100
+ {
101
+ "Sid": "OptionalEc2Network",
102
+ "Effect": "Allow",
103
+ "Action": [
104
+ "ec2:DescribeInstances",
105
+ "ec2:DescribeVpcEndpointServices"
106
+ ],
107
+ "Resource": "*"
108
+ },
109
+ {
110
+ "Sid": "OptionalElasticLoadBalancing",
111
+ "Effect": "Allow",
112
+ "Action": [
113
+ "elasticloadbalancing:DescribeListeners",
114
+ "elasticloadbalancing:DescribeRules",
115
+ "elasticloadbalancing:DescribeTargetGroups",
116
+ "elasticloadbalancing:DescribeTargetHealth"
117
+ ],
118
+ "Resource": "*"
119
+ },
120
+ {
121
+ "Sid": "OptionalRoute53PrivateZones",
122
+ "Effect": "Allow",
123
+ "Action": [
124
+ "route53:GetHostedZone",
125
+ "route53:ListHostedZones"
126
+ ],
127
+ "Resource": "*"
128
+ },
129
+ {
130
+ "Sid": "OptionalResourceAccessManager",
131
+ "Effect": "Allow",
132
+ "Action": [
133
+ "ram:GetResourceShareInvitations"
134
+ ],
135
+ "Resource": "*"
136
+ },
137
+ {
138
+ "Sid": "OptionalAccountNames",
139
+ "Effect": "Allow",
140
+ "Action": [
141
+ "iam:ListAccountAliases",
142
+ "organizations:ListAccounts"
143
+ ],
144
+ "Resource": "*"
145
+ },
146
+ {
147
+ "Sid": "OptionalAccountServices",
148
+ "Effect": "Allow",
149
+ "Action": [
150
+ "cloudtrail:DescribeTrails",
151
+ "cloudtrail:GetTrailStatus",
152
+ "cloudwatch:DescribeAlarms",
153
+ "config:DescribeConfigurationRecorderStatus",
154
+ "config:DescribeConfigurationRecorders",
155
+ "config:DescribeDeliveryChannels",
156
+ "ecr:DescribeRepositories",
157
+ "guardduty:GetDetector",
158
+ "guardduty:ListDetectors",
159
+ "kms:DescribeKey",
160
+ "kms:ListAliases",
161
+ "kms:ListKeys",
162
+ "logs:DescribeLogGroups"
163
+ ],
164
+ "Resource": "*"
165
+ },
166
+ {
167
+ "Sid": "OptionalApiGateway",
168
+ "Effect": "Allow",
169
+ "Action": [
170
+ "apigateway:GET"
171
+ ],
172
+ "Resource": [
173
+ "arn:aws:apigateway:*::/restapis",
174
+ "arn:aws:apigateway:*::/restapis/*",
175
+ "arn:aws:apigateway:*::/apis",
176
+ "arn:aws:apigateway:*::/apis/*",
177
+ "arn:aws:apigateway:*::/domainnames",
178
+ "arn:aws:apigateway:*::/domainnames/*",
179
+ "arn:aws:apigateway:*::/vpclinks",
180
+ "arn:aws:apigateway:*::/vpclinks/*"
181
+ ]
182
+ },
183
+ {
184
+ "Sid": "DenyApiGatewaySecrets",
185
+ "Effect": "Deny",
186
+ "Action": [
187
+ "apigateway:GET"
188
+ ],
189
+ "Resource": [
190
+ "arn:aws:apigateway:*::/apikeys",
191
+ "arn:aws:apigateway:*::/apikeys/*",
192
+ "arn:aws:apigateway:*::/clientcertificates",
193
+ "arn:aws:apigateway:*::/clientcertificates/*"
194
+ ]
195
+ },
196
+ {
197
+ "Sid": "OptionalCompute",
198
+ "Effect": "Allow",
199
+ "Action": [
200
+ "autoscaling:DescribeAutoScalingGroups",
201
+ "ecs:DescribeClusters",
202
+ "ecs:DescribeServices",
203
+ "ecs:ListClusters",
204
+ "ecs:ListServices",
205
+ "eks:DescribeCluster",
206
+ "eks:DescribeNodegroup",
207
+ "eks:ListClusters",
208
+ "eks:ListFargateProfiles",
209
+ "eks:ListNodegroups",
210
+ "lambda:GetPolicy",
211
+ "lambda:ListFunctions"
212
+ ],
213
+ "Resource": "*"
214
+ },
215
+ {
216
+ "Sid": "OptionalDataStores",
217
+ "Effect": "Allow",
218
+ "Action": [
219
+ "dynamodb:ListTables",
220
+ "elasticache:DescribeCacheClusters",
221
+ "elasticache:DescribeCacheSubnetGroups",
222
+ "elasticache:DescribeReplicationGroups",
223
+ "elasticfilesystem:DescribeFileSystems",
224
+ "elasticfilesystem:DescribeMountTargetSecurityGroups",
225
+ "elasticfilesystem:DescribeMountTargets",
226
+ "rds:DescribeDBClusters",
227
+ "rds:DescribeDBInstances",
228
+ "rds:DescribeDBSubnetGroups",
229
+ "s3:GetBucketLocation",
230
+ "s3:GetBucketPublicAccessBlock",
231
+ "s3:GetBucketWebsite",
232
+ "s3:ListAllMyBuckets"
233
+ ],
234
+ "Resource": "*"
235
+ },
236
+ {
237
+ "Sid": "OptionalEdge",
238
+ "Effect": "Allow",
239
+ "Action": [
240
+ "acm:DescribeCertificate",
241
+ "acm:ListCertificates",
242
+ "acm:ListTagsForCertificate",
243
+ "cloudfront:ListDistributions",
244
+ "cloudfront:ListTagsForResource",
245
+ "shield:GetSubscriptionState",
246
+ "shield:ListProtections",
247
+ "wafv2:GetLoggingConfiguration",
248
+ "wafv2:GetWebACL",
249
+ "wafv2:ListResourcesForWebACL",
250
+ "wafv2:ListWebACLs"
251
+ ],
252
+ "Resource": "*"
253
+ },
254
+ {
255
+ "Sid": "OptionalRoute53Records",
256
+ "Effect": "Allow",
257
+ "Action": [
258
+ "route53:ListResourceRecordSets",
259
+ "route53:ListTagsForResources"
260
+ ],
261
+ "Resource": "*"
262
+ }
263
+ ]
264
+ }