-
Notifications
You must be signed in to change notification settings - Fork 2
/
mondoo-aws-inventory.mql.yaml
331 lines (278 loc) · 10.1 KB
/
mondoo-aws-inventory.mql.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1
packs:
- uid: mondoo-asset-inventory-aws
name: AWS Asset Inventory Pack
version: 1.1.0
license: BUSL-1.1
authors:
- name: Mondoo, Inc
email: [email protected]
tags:
mondoo.com/platform: aws,cloud
mondoo.com/category: best-practices
docs:
desc: |
The AWS Asset Inventory Pack retrieves information about AWS accounts for asset inventory.
groups:
- uid: mondoo-asset-inventory-aws-group
title: AWS Asset Inventory Pack Group
filters: |
asset.runtime == "aws"
queries:
- uid: mondoo-asset-inventory-aws-account-id
- uid: mondoo-asset-inventory-aws-enabled-regions
- uid: mondoo-asset-inventory-aws-vpcs
- uid: mondoo-asset-inventory-aws-iam-users
- uid: mondoo-asset-inventory-aws-iam-groups
- uid: mondoo-asset-inventory-aws-iam-roles
- uid: mondoo-asset-inventory-aws-iam-policies
- uid: mondoo-asset-inventory-aws-ec2-security-groups
- uid: mondoo-asset-inventory-aws-ec2-volumes
- uid: mondoo-asset-inventory-aws-ec2-retrieve-all-data
- uid: mondoo-asset-inventory-aws-rds-dbclusters-all-data
- uid: mondoo-asset-inventory-aws-rds-dbinstances-all-data
- uid: mondoo-asset-inventory-aws-s3-retrieve-all-data
- uid: mondoo-asset-inventory-aws-eks-clusters
- uid: mondoo-asset-inventory-aws-lambda
- uid: mondoo-asset-inventory-aws-access-analyzer
- uid: mondoo-asset-inventory-aws-acm-certificates
- uid: mondoo-asset-inventory-aws-cloudtrail-trails
queries:
- uid: mondoo-asset-inventory-aws-account-id
filters: |
asset.platform == "aws"
title: AWS account ID
mql: |
aws.account.id
- uid: mondoo-asset-inventory-aws-enabled-regions
title: Regions enabled in the AWS account
filters: |
asset.platform == "aws"
docs:
desc: |
This query retrieves all AWS regions enabled in the account
mql: |
aws { regions }
- uid: mondoo-asset-inventory-aws-vpcs
title: VPCs
docs:
desc: |
This query retrieves all of the configuration data for AWS VPCs
variants:
- uid: mondoo-asset-inventory-aws-vpcs-all
- uid: mondoo-asset-inventory-aws-vpcs-single
- uid: mondoo-asset-inventory-aws-vpcs-all
filters: |
asset.platform == "aws"
mql: |
aws.vpcs
- uid: mondoo-asset-inventory-aws-vpcs-single
filters: |
asset.platform == "aws-vpc"
mql: |
aws.vpc
- uid: mondoo-asset-inventory-aws-iam-users
title: IAM users
docs:
desc: |
This query retrieves data for all IAM users
variants:
- uid: mondoo-asset-inventory-aws-iam-users-all
- uid: mondoo-asset-inventory-aws-iam-users-single
- uid: mondoo-asset-inventory-aws-iam-users-all
filters: |
asset.platform == "aws"
mql: |
aws.iam.users
- uid: mondoo-asset-inventory-aws-iam-users-single
filters: |
asset.platform == "aws-iam-user"
mql: |
aws.iam.user
- uid: mondoo-asset-inventory-aws-iam-groups
title: IAM groups
docs:
desc: |
This query retrieves all of the IAM groups.
variants:
- uid: mondoo-asset-inventory-aws-iam-groups-all
- uid: mondoo-asset-inventory-aws-iam-groups-single
- uid: mondoo-asset-inventory-aws-iam-groups-all
filters: |
asset.platform == "aws"
mql: |
aws.iam.groups
- uid: mondoo-asset-inventory-aws-iam-groups-single
filters: |
asset.platform == "aws-iam-group"
mql: |
aws.iam.group
- uid: mondoo-asset-inventory-aws-iam-roles
title: IAM roles
docs:
desc: |
This query retrieves all IAM Roles
variants:
- uid: mondoo-asset-inventory-aws-iam-roles-all
- uid: mondoo-asset-inventory-aws-iam-roles-all
filters: |
asset.platform == "aws"
mql: |
aws.iam.roles
- uid: mondoo-asset-inventory-aws-iam-policies
title: Attached IAM policies
filters: |
asset.platform == "aws"
docs:
desc: |
This query retrieves all IAM policies attached to a user, group, or role.
mql: aws.iam.policies.where( attachmentCount > 0 )
- uid: mondoo-asset-inventory-aws-ec2-security-groups
title: EC2 Security Groups
docs:
desc: |
This query retrieves all AWS EC2 Security Groups
variants:
- uid: mondoo-asset-inventory-aws-ec2-security-groups-all
- uid: mondoo-asset-inventory-aws-ec2-security-groups-single
- uid: mondoo-asset-inventory-aws-ec2-security-groups-all
filters: |
asset.platform == "aws"
mql: |
aws.ec2.securityGroups
- uid: mondoo-asset-inventory-aws-ec2-security-groups-single
filters: |
asset.platform == "aws-security-group"
mql: |
aws.ec2.securitygroup
- uid: mondoo-asset-inventory-aws-ec2-volumes
title: EBS volumes
docs:
desc: |
This query retrieves all AWS EBS volumes
variants:
- uid: mondoo-asset-inventory-aws-ec2-volumes-all
- uid: mondoo-asset-inventory-aws-ec2-volumes-single
- uid: mondoo-asset-inventory-aws-ec2-volumes-all
filters: |
asset.platform == "aws"
mql: |
aws.ec2.volumes
- uid: mondoo-asset-inventory-aws-ec2-volumes-single
filters: |
asset.platform == "aws-ebs-volume"
mql: |
aws.ec2.volume
- uid: mondoo-asset-inventory-aws-ec2-retrieve-all-data
title: Running EC2 instances
variants:
- uid: mondoo-asset-inventory-aws-ec2-retrieve-all-data-all
- uid: mondoo-asset-inventory-aws-ec2-retrieve-all-data-single
- uid: mondoo-asset-inventory-aws-ec2-retrieve-all-data-all
filters: |
asset.platform == "aws"
mql: |
aws.ec2.instances.where(state != "terminated")
- uid: mondoo-asset-inventory-aws-ec2-retrieve-all-data-single
filters: |
asset.platform == "aws-ec2-instance"
aws.ec2.instance.state != "terminated"
mql: |
aws.ec2.instance
- uid: mondoo-asset-inventory-aws-rds-dbclusters-all-data
title: RDS database clusters configuration
variants:
- uid: mondoo-asset-inventory-aws-rds-dbclusters-all-data-all
- uid: mondoo-asset-inventory-aws-rds-dbclusters-all-data-all
filters: |
asset.platform == "aws"
mql: |
aws.rds.clusters
- uid: mondoo-asset-inventory-aws-rds-dbinstances-all-data
title: RDS database instances
variants:
- uid: mondoo-asset-inventory-aws-rds-dbinstances-all-data-all
- uid: mondoo-asset-inventory-aws-rds-dbinstances-all-data-single
- uid: mondoo-asset-inventory-aws-rds-dbinstances-all-data-all
filters: |
asset.platform == "aws"
mql: |
aws.rds.instances
- uid: mondoo-asset-inventory-aws-rds-dbinstances-all-data-single
filters: |
asset.platform == "aws-rds-dbinstance"
mql: |
aws.rds.dbinstance
- uid: mondoo-asset-inventory-aws-s3-retrieve-all-data
title: S3 buckets
variants:
- uid: mondoo-asset-inventory-aws-s3-retrieve-all-data-all
- uid: mondoo-asset-inventory-aws-s3-retrieve-all-data-single
- uid: mondoo-asset-inventory-aws-s3-retrieve-all-data-all
filters: |
asset.platform == "aws"
mql: |
aws.s3.buckets
- uid: mondoo-asset-inventory-aws-s3-retrieve-all-data-single
filters: |
asset.platform == "aws-s3-bucket"
mql: |
aws.s3.bucket
- uid: mondoo-asset-inventory-aws-eks-clusters
title: EKS clusters
variants:
- uid: mondoo-asset-inventory-aws-eks-clusters-all
- uid: mondoo-asset-inventory-aws-eks-clusters-all
filters: |
asset.platform == "aws"
mql: |
aws.eks.clusters
- uid: mondoo-asset-inventory-aws-lambda
title: Lambda functions
variants:
- uid: mondoo-asset-inventory-aws-lambda-all
- uid: mondoo-asset-inventory-aws-lambda-single
- uid: mondoo-asset-inventory-aws-lambda-all
filters: |
asset.platform == "aws"
mql: |
aws.lambda.functions
- uid: mondoo-asset-inventory-aws-lambda-single
filters: |
asset.platform == "aws-lambda-function"
mql: |
aws.lambda.function
- uid: mondoo-asset-inventory-aws-access-analyzer
title: Access Analyzers
variants:
- uid: mondoo-asset-inventory-aws-access-analyzer-all
- uid: mondoo-asset-inventory-aws-access-analyzer-all
filters: |
asset.platform == "aws"
mql: |
aws.accessAnalyzer.analyzers
- uid: mondoo-asset-inventory-aws-acm-certificates
title: Certificate Manager certificates
variants:
- uid: mondoo-asset-inventory-aws-acm-certificates-all
- uid: mondoo-asset-inventory-aws-acm-certificates-all
filters: |
asset.platform == "aws"
mql: |
aws.acm.certificates
- uid: mondoo-asset-inventory-aws-cloudtrail-trails
title: CloudTrail trails
variants:
- uid: mondoo-asset-inventory-aws-cloudtrail-trails-all
- uid: mondoo-asset-inventory-aws-cloudtrail-trails-single
- uid: mondoo-asset-inventory-aws-cloudtrail-trails-all
filters: |
asset.platform == "aws"
mql: |
aws.cloudtrail.trails
- uid: mondoo-asset-inventory-aws-cloudtrail-trails-single
filters: |
asset.platform == "aws-cloudtrail-trail"
mql: |
aws.cloudtrail.trail