-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathaws.lr
More file actions
9127 lines (8705 loc) · 289 KB
/
aws.lr
File metadata and controls
9127 lines (8705 loc) · 289 KB
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) Mondoo, Inc.
// SPDX-License-Identifier: BUSL-1.1
import "../../network/resources/network.lr"
option provider = "go.mondoo.com/cnquery/v9/providers/aws"
option go_package = "go.mondoo.com/mql/v13/providers/aws/resources"
alias aws.accessAnalyzer = aws.iam.accessAnalyzer
alias aws.accessAnalyzer.analyzer = aws.iam.accessanalyzer.analyzer
// AWS resource
aws @defaults("account.id") {
// List of `aws.vpc` objects representing all VPCs in the account across all enabled regions
vpcs() []aws.vpc
// List of all enabled regions in the account
regions() []string
}
// AWS Account
aws.account @defaults("id aliases.first organization.id") {
// Account ID
id string
// Account aliases
aliases() []string
// Information about the associated organization, if any
organization() aws.organization
// Tags on the account
// Note: This operation can only be called from the organization's management
// account or by a member account that is a delegated administrator for an
// Amazon Web Services service.
tags() map[string]string
// Primary contact information for the account
contactInformation() dict
// All alternate contacts configured for the account
alternateContacts() []aws.account.alternateContact
// Security alternate contact for the account
securityContact() aws.account.alternateContact
// Billing alternate contact for the account
billingContact() aws.account.alternateContact
// Operations alternate contact for the account
operationsContact() aws.account.alternateContact
}
// AWS Account alternate contact
private aws.account.alternateContact @defaults("contactType name emailAddress") {
// Account ID this contact belongs to
accountId string
// Type of alternate contact: BILLING, OPERATIONS, or SECURITY
contactType string
// Email address of the contact
emailAddress string
// Name of the contact
name string
// Phone number of the contact
phoneNumber string
// Title of the contact
title string
// Whether this contact exists and is configured
exists bool
}
// AWS Organization resource
aws.organization @defaults("id masterAccountEmail") {
// ARN of the organization
arn string
// Functionality available to org: ALL or CONSOLIDATED_BILLING
featureSet string
// ID of the organization's master account
masterAccountId string
// Email owner of the organization's master account
masterAccountEmail string
// List of accounts that belong to the organization, if available to the caller
accounts() []aws.account
// Organization ID
id string
// List of delegated administrator accounts in the organization
delegatedAdministrators() []aws.organization.delegatedAdministrator
}
// AWS Organization delegated administrator
private aws.organization.delegatedAdministrator @defaults("name email") {
// ARN of the delegated administrator account
arn string
// Account ID of the delegated administrator
accountId string
// Friendly name of the account
name string
// Email address associated with the account
email string
// Account status: ACTIVE, SUSPENDED, or PENDING_CLOSURE
status string
// Method the account joined the organization: INVITED or CREATED
joinedMethod string
// Date the account joined the organization
joinedTimestamp time
// Date the account was made a delegated administrator
delegationEnabledDate time
// AWS services for which this account is a delegated administrator
delegatedServices() []aws.organization.delegatedService
// The account resource
account() aws.account
}
// AWS Organization delegated service
private aws.organization.delegatedService @defaults("servicePrincipal") {
// Service principal name (e.g., "guardduty.amazonaws.com")
servicePrincipal string
// Date the account became a delegated administrator for this service
delegationEnabledDate time
}
// Amazon Virtual Private Cloud (VPC)
aws.vpc @defaults("id isDefault cidrBlock region") {
// ARN of the VPC
arn string
// ID of the VPC
id string
// Name of the VPC
name string
// IPv4 CIDR block of the VPC
cidrBlock string
// State of the VPC: pending or available
state string
// Whether the VPC is the default VPC
isDefault bool
// How instance hardware tenancy settings are enforced on instances launched in this VPC
instanceTenancy string
// Region in which the VPC exists
region string
// List of endpoints for the VPC
endpoints() []aws.vpc.endpoint
// List of flow logs for the VPC
flowLogs() []aws.vpc.flowlog
// List of route tables for the VPC
routeTables() []aws.vpc.routetable
// List of subnets for the VPC
subnets() []aws.vpc.subnet
// Tags on the VPC
tags map[string]string
// NAT gateways
natGateways() []aws.vpc.natgateway
// List of service endpoints associated with the VPC
serviceEndpoints() []aws.vpc.serviceEndpoint
// List of peering connections associated with the VPC
peeringConnections() []aws.vpc.peeringConnection
// Internet gateway blocking mode: block-bidirectional, block-ingress, or off
internetGatewayBlockMode string
// ID of the set of DHCP options associated with the VPC
dhcpOptionsId string
// Internet gateways attached to the VPC
internetGateways() []aws.ec2.internetgateway
// Security groups in this VPC
securityGroups() []aws.ec2.securitygroup
// Network ACLs in this VPC
networkAcls() []aws.ec2.networkacl
// Virtual private gateways attached to the VPC
vpnGateways() []aws.vpc.vpnGateway
}
// Amazon Virtual Private Cloud (VPC) route table
private aws.vpc.routetable @defaults("id routes.length") {
// ARN of the route table
arn string
// A list of association descriptions
associations() []aws.vpc.routetable.association
// Unique ID of the route table
id string
// Region where the route table exists
region string
// Deprecated: Use `routeEntries` instead
routes []dict
// List of routes in the route table
routeEntries() []aws.vpc.routetable.route
// Tags on the route table
tags map[string]string
}
// Amazon Virtual Private Cloud (VPC) route table route entry
private aws.vpc.routetable.route @defaults("destinationCidrBlock state") {
// Unique ID for this route (route table ID + destination)
id string
// IPv4 CIDR block used for the destination match
destinationCidrBlock string
// IPv6 CIDR block used for the destination match
destinationIpv6CidrBlock string
// Prefix list ID for the destination match
destinationPrefixListId string
// ID of a gateway attached to the VPC
gatewayId string
// ID of a NAT instance in the VPC
instanceId string
// ID of the Amazon Web Services account that owns the instance
instanceOwnerId string
// ID of the network interface
networkInterfaceId string
// ID of a NAT gateway
natGatewayId string
// ID of a transit gateway
transitGatewayId string
// ID of a VPC peering connection
vpcPeeringConnectionId string
// ID of the egress-only internet gateway
egressOnlyInternetGatewayId string
// ID of the local gateway
localGatewayId string
// ID of the carrier gateway
carrierGatewayId string
// ARN of the core network
coreNetworkArn string
// How the route was created (CreateRouteTable, CreateRoute, EnableVgwRoutePropagation)
origin string
// State of the route (active, blackhole)
state string
}
// Amazon Virtual Private Cloud (VPC) route table association
private aws.vpc.routetable.association @defaults("routeTableAssociationId gatewayId") {
// Unique ID of the association
routeTableAssociationId string
// Association state
associationsState dict
// Unique ID of the associated gateway
gatewayId string
// Whether this is the main association
main bool
// Unique ID of the route table
routeTableId string
// Subnet of the route table association
subnet() aws.vpc.subnet
}
// Amazon Virtual Private Cloud (VPC) subnet
private aws.vpc.subnet @defaults("id cidrs region availabilityZone defaultForAvailabilityZone") {
// ARN of the subnet
arn string
// Unique ID of the subnet
id string
// Name of the subnet (from tags)
name string
// List of CIDR descriptions
cidrs string
// Whether instances launched in this subnet receive public IPv4 addresses
mapPublicIpOnLaunch bool
// Availability zone where this subnet is located
availabilityZone string
// Whether this is the default subnet for the availability zone
defaultForAvailabilityZone bool
// Whether a network interface created in this subnet (including a network interface created by RunInstances ) receives an IPv6 address
assignIpv6AddressOnCreation bool
// State of the subnet: pending, available, unavailable, failed, or failed-insufficient-capacity
state string
// Region in which the VPC subnet exists
region string
// The number of available IP addresses in the subnet
availableIpAddressCount int
// Internet gateway blocking mode: block-bidirectional, block-ingress, or off
internetGatewayBlockMode string
// Tags on the subnet
tags map[string]string
// Route table associated with this subnet
routeTable() aws.vpc.routetable
}
// Amazon Virtual Private Cloud (VPC) endpoint
private aws.vpc.endpoint @defaults("id type region") {
// Unique ID of the endpoint
id string
// Type of the endpoint
type string
// VPC in which the endpoint exists
vpc string
// Region in which the VPC endpoint exists
region string
// Endpoint service name
serviceName string
// Policy document associated with the endpoint, if applicable
policyDocument string
// Subnets for the (interface) endpoint
subnets []string
// Whether to associate a private hosted zone with the specified VPC
privateDnsEnabled bool
// VPC endpoint state
state string
// Creation timestamp
createdAt time
}
// Amazon Virtual Private Cloud (VPC) flow log
private aws.vpc.flowlog @defaults("id region status") {
// Unique ID of the flow log
id string
// VPC in which the flow log exists
vpc string
// Region in which the VPC flow log exists
region string
// Status of the flow log
status string
// Tags on the flow log
tags map[string]string
// Creation timestamp
createdAt time
// Destination for the flow log data
destination string
// Destination type for the flow log data
destinationType string
// Delivery log status for the flow log data
deliverLogsStatus string
// Format for the flow log
logFormat string
// Maximum interval of time during which a flow of packets is captured and aggregated into a flow log record: 60 seconds (1 minute) or 600 seconds (10 minutes)
maxAggregationInterval int
// Type of traffic to monitor: ACCEPT, ALL, and REJECT
trafficType string
}
// Amazon Virtual Private Cloud (VPC) virtual private gateway
private aws.vpc.vpnGateway @defaults("id state") {
// ID of the virtual private gateway
id string
// ARN of the virtual private gateway
arn string
// Region where the virtual private gateway exists
region string
// State of the virtual private gateway: pending, available, deleting, or deleted
state string
// Type of VPN connection the virtual private gateway supports (ipsec.1)
type string
// Private Autonomous System Number (ASN) for the Amazon side of a BGP session
amazonSideAsn int
// Availability zone for the virtual private gateway
availabilityZone string
// VPC attachments for the virtual private gateway
attachments []dict
// Tags on the virtual private gateway
tags map[string]string
}
// Amazon WAF v2
aws.waf {
// List of WAF ACLs
acls() []aws.waf.acl
// List of WAF rules
ruleGroups() []aws.waf.rulegroup
// List of WAF IP sets
ipSets() []aws.waf.ipset
// List of WAF regex pattern sets
regexPatternSets() []aws.waf.regexPatternSet
// Scope either REGIONAL or CLOUDFRONT
scope string
}
// Amazon WAF v2 ACL
private aws.waf.acl @defaults("name") {
// ARN of the ACL
arn string
// ID of the ACL
id string
// Name of the ACL
name string
// Description of the ACL
description string
// Whether the ACL is managed by Firewall Manager
managedByFirewallManager() bool
// List of WAF rules
rules() []aws.waf.rule
// Scope either REGIONAL or CLOUDFRONT
scope string
// Logging configuration for the ACL
loggingConfiguration() aws.waf.acl.loggingConfiguration
// ARNs of resources associated with this web ACL
associatedResources() []string
}
// Amazon WAF v2 RuleGroup
private aws.waf.rulegroup @defaults("name") {
// ARN of the rulegroup
arn string
// ID of the rulegroup
id string
// Name of the rulegroup
name string
// Description of the rulegroup
description string
// List of waf rules
rules() []aws.waf.rule
// Scope either REGIONAL or CLOUDFRONT
scope string
}
// Amazon WAF rule
private aws.waf.rule @defaults("name") {
// ARN of the ACL/rule group combined with the rule name
id string
// Name of the rule
name string
// Priority from lowest to highest number
priority int
// Part of the rule that tells WAF how to inspect a web request
statement aws.waf.rule.statement
// Part of the rule that tells WAF what to do with a web request when it matches the criteria defined in the rule
action aws.waf.rule.action
// ARN of either rule ACL or the RuleGroup that this rule belongs to
belongsTo string
}
// Action that happens if a rule statement matches
private aws.waf.rule.action @defaults("action") {
// Name of the rule this action belongs to
ruleName string
// One of Block, Allow, Count, Captcha, Challenge, Excluded_as_Count
action string
// HTTP Response Code, only if the action is Block
responseCode string
}
private aws.waf.rule.statement @defaults("kind") {
// ID of the statement
id string
// Kind of statement, e.g., "sqliMatchStatement"
kind string
// Entire statement as JSON
json dict
// Statement that detects SQL injection attacks
sqliMatchStatement aws.waf.rule.statement.sqlimatchstatement
// Statement that detects XSS attacks
xssMatchStatement aws.waf.rule.statement.xssmatchstatement
// Statement that matches certain bytes
byteMatchStatement aws.waf.rule.statement.bytematchstatement
// Statement that matches a regex pattern
regexMatchStatement aws.waf.rule.statement.regexmatchstatement
// Statement that matches requests from certain countries
geoMatchStatement aws.waf.rule.statement.geomatchstatement
// Statement that matches requests from certain ips defined in an IPSet
ipSetReferenceStatement aws.waf.rule.statement.ipsetreferencestatement
// Statement that matches requests with certain labels
labelMatchStatement aws.waf.rule.statement.labelmatchstatement
// Statement managed by AWS
managedRuleGroupStatement aws.waf.rule.statement.managedrulegroupstatement
// Statement that matches if the conditions are not met
notStatement aws.waf.rule.statement.notstatement
// Statement that matches if one or many sub-statements match
orStatement aws.waf.rule.statement.orstatement
// Statement that matches if all sub-statements match
andStatement aws.waf.rule.statement.andstatement
// Statement that matches if a request comes in at a certain rate (rate limiting)
rateBasedStatement aws.waf.rule.statement.ratebasedstatement
// Statement that matches a regex pattern defined in a regex pattern set
regexPatternSetReferenceStatement aws.waf.rule.statement.regexpatternsetreferencestatement
// Statement that refers to the rules in a rule group
ruleGroupReferenceStatement aws.waf.rule.statement.rulegroupreferencestatement
// Statement that matches the size of the request
sizeConstraintStatement aws.waf.rule.statement.sizeconstraintstatement
}
// Rule statement that checks for requests from certain countries
private aws.waf.rule.statement.geomatchstatement @defaults("countryCodes") {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Country codes
countryCodes []string
}
// Rule statement that checks for requests from IP addresses defined in an IPSet
private aws.waf.rule.statement.ipsetreferencestatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// ARN of the ipset
arn string
// ipSetForwardedIPConfig
ipSetForwardedIPConfig aws.waf.rule.statement.ipsetreferencestatement.ipsetforwardedipconfig
}
private aws.waf.rule.statement.ipsetreferencestatement.ipsetforwardedipconfig {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Name of the header
headerName string
// Position
position string
// Fallback behavior
fallbackBehavior string
}
private aws.waf.rule.statement.labelmatchstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Key
key string
// Scope
scope string
}
// Rule statement that is managed by AWS
private aws.waf.rule.statement.managedrulegroupstatement @defaults("name") {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Name
name string
// Vendor name
vendorName string
}
// Rule statement that matches if all of the rule statements inside it match
private aws.waf.rule.statement.andstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Sub-statements
statements []aws.waf.rule.statement
}
// Rule statement that negates another rule statement
private aws.waf.rule.statement.notstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Sub-statement (will be negated)
statement aws.waf.rule.statement
}
// Rule statement that matches if one of the rule statements inside it matches
private aws.waf.rule.statement.orstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Sub-statements
statements []aws.waf.rule.statement
}
// Rule statement that matches at a certain rate of requests (rate limiting)
private aws.waf.rule.statement.ratebasedstatement {}
// Rule statement that checks for a regex pattern defined in a regex pattern set
private aws.waf.rule.statement.regexpatternsetreferencestatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// ARN of the regex pattern set
arn string
// Field that is matched
fieldToMatch aws.waf.rule.fieldtomatch
}
// Rule statement that refers to a group of rules
private aws.waf.rule.statement.rulegroupreferencestatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// ARN of the rule group
arn string
// List of rules to exclude
excludeRules []string
}
// Rule statement that checks the size of the specified field
private aws.waf.rule.statement.sizeconstraintstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Size that triggers this statement
size int
// How to compare the size
comparisonOperator string
// Field to match
fieldToMatch aws.waf.rule.fieldtomatch
}
// Rule statement that matches a specified regex pattern
private aws.waf.rule.statement.regexmatchstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Field to match
fieldToMatch aws.waf.rule.fieldtomatch
// Regex pattern to match
regexString string
}
// Rule statement that matches a specified sequence of bytes
private aws.waf.rule.statement.bytematchstatement @defaults("searchString") {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Field to match
fieldToMatch aws.waf.rule.fieldtomatch
// String to search for
searchString string
}
// Field to match
private aws.waf.rule.fieldtomatch @defaults("target") {
target string
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Whether to match the HTTP method: GET or POST
method bool
// Whether to match the URI path
uriPath bool
// Whether to match the query string
queryString bool
// Whether to match all query arguments
allQueryArguments bool
// Whether to match the body (match if not null)
body aws.waf.rule.fieldtomatch.body
// Whether to match the cookie (match if not null)
cookie aws.waf.rule.fieldtomatch.cookie
// Whether to match the single header (match if not null)
singleHeader aws.waf.rule.fieldtomatch.singleheader
// Whether to match the header order (match if not null)
headerOrder aws.waf.rule.fieldtomatch.headerorder
// Whether to match the header (match if not null)
headers aws.waf.rule.fieldtomatch.headers
// Whether to match the JA3 fingerprint (match if not null)
ja3Fingerprint aws.waf.rule.fieldtomatch.ja3fingerprint
// Whether to match the JSON body (match if not null)
jsonBody aws.waf.rule.fieldtomatch.jsonbody
// Whether to match the single query argument of the field (match if not null)
singleQueryArgument aws.waf.rule.fieldtomatch.singlequeryargument
}
// Body of the field to match
private aws.waf.rule.fieldtomatch.body {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// What to do if the body is over size
overSizeHandling string
}
// Cookie of the field to match
private aws.waf.rule.fieldtomatch.cookie {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// What to do if the cookie is over size
overSizeHandling string
}
// Order of headers of the field to match
private aws.waf.rule.fieldtomatch.headerorder {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// What to do if the order of headers is over size
overSizeHandling string
}
// Single header of the field to match
private aws.waf.rule.fieldtomatch.singleheader {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Name of the header
name string
}
// Single query argument
private aws.waf.rule.fieldtomatch.singlequeryargument {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Name of the query argument
name string
}
// JA3 fingerprint
private aws.waf.rule.fieldtomatch.ja3fingerprint {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// FallbackBehavior
fallbackBehavior string
}
// Request body as JSON
private aws.waf.rule.fieldtomatch.jsonbody {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// What to do if the body is over size
overSizeHandling string
// Match scope
matchScope string
// What to do if the body is not valid JSON
invalidFallbackBehavior string
// Match pattern
matchPattern aws.waf.rule.fieldtomatch.jsonbody.matchpattern
}
// Pattern to match
private aws.waf.rule.fieldtomatch.jsonbody.matchpattern {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Whether to match all
all bool
// Paths to include
includePaths []string
}
// Headers
private aws.waf.rule.fieldtomatch.headers {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Match scope
matchScope string
// What to do if the headers are over size
overSizeHandling string
// Match pattern
matchPattern aws.waf.rule.fieldtomatch.headers.matchpattern
}
// Pattern to match
private aws.waf.rule.fieldtomatch.headers.matchpattern {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Whether to match all
all bool
// Headers to include
includeHeaders []string
// Headers to exclude
excludeHeaders []string
}
// Statement that matches XSS attacks
private aws.waf.rule.statement.xssmatchstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Field to match
fieldToMatch aws.waf.rule.fieldtomatch
}
// Statement that matches SQLI attacks
private aws.waf.rule.statement.sqlimatchstatement {
// Name of the rule this statement belongs to
ruleName string
// ID of the statement
statementID string
// Field to match
fieldToMatch aws.waf.rule.fieldtomatch
// How aggressive the statement matches
sensitivityLevel string
}
// Amazon WAF IP set (defining IP Ranges)
private aws.waf.ipset @defaults("name") {
// ARN of the IP set
arn string
// ID of the IP set
id string
// Scope: REGIONAL or CLOUDFRONT
scope string
// Name of the IP set
name string
// Description of the IP set
description string
// Address type: ipv4 or ipv6
addressType() string
// List of IP addresses
addresses() dict
}
// Amazon WAF regex pattern set
private aws.waf.regexPatternSet @defaults("name") {
// ARN of the regex pattern set
arn string
// ID of the regex pattern set
id string
// Scope: REGIONAL or CLOUDFRONT
scope string
// Name of the regex pattern set
name string
// Description of the regex pattern set
description string
// List of regular expression patterns
regularExpressions []string
}
// Amazon WAF ACL logging configuration
private aws.waf.acl.loggingConfiguration @defaults("arn") {
// ARN of the web ACL this logging config belongs to
arn string
// Log destination ARNs (CloudWatch, S3, or Firehose)
logDestinationConfigs []string
// Whether managed by Firewall Manager
managedByFirewallManager bool
// Fields that are redacted from logs
redactedFields []string
}
// AWS Network Firewall
aws.networkfirewall @defaults("firewalls") {
// List of Network Firewall firewalls
firewalls() []aws.networkfirewall.firewall
// List of Network Firewall policies
policies() []aws.networkfirewall.policy
// List of Network Firewall rule groups
ruleGroups() []aws.networkfirewall.rulegroup
}
// AWS Network Firewall firewall
private aws.networkfirewall.firewall @defaults("arn name region") {
// ARN of the firewall
arn string
// Name of the firewall
name string
// Description of the firewall
description string
// Region of the firewall
region string
// VPC where the firewall is deployed
vpc() aws.vpc
// Whether delete protection is enabled
deleteProtection bool
// Whether subnet change protection is enabled
subnetChangeProtection bool
// Whether the firewall policy change protection is enabled
firewallPolicyChangeProtection bool
// ARN of the firewall policy associated with the firewall
firewallPolicyArn string
// Firewall policy associated with this firewall
policy() aws.networkfirewall.policy
// Subnet mappings for the firewall
subnetMappings []dict
// Encryption configuration
encryptionConfiguration dict
// Tags on the firewall
tags map[string]string
}
// AWS Network Firewall policy
private aws.networkfirewall.policy @defaults("arn name region") {
// ARN of the firewall policy
arn string
// Name of the firewall policy
name string
// Description of the firewall policy
description string
// Region of the firewall policy
region string
// Stateless default actions for packets
statelessDefaultActions []string
// Stateless default actions for fragmented packets
statelessFragmentDefaultActions []string
// Stateless rule group references
statelessRuleGroupReferences []dict
// Stateful default actions
statefulDefaultActions []string
// Stateful rule group references
statefulRuleGroupReferences []dict
// Stateful engine options
statefulEngineOptions dict
// Tags on the firewall policy
tags map[string]string
}
// AWS Network Firewall rule group
private aws.networkfirewall.rulegroup @defaults("arn name region") {
// ARN of the rule group
arn string
// Name of the rule group
name string
// Description of the rule group
description string
// Region of the rule group
region string
// Capacity of the rule group
capacity int
// Type of the rule group (STATELESS or STATEFUL)
type string
// Rules definition
rules dict
// Tags on the rule group
tags map[string]string
}
// AWS Elastic File System (EFS) service
aws.efs @defaults("filesystems") {
// A list of file systems managed by the service
filesystems() []aws.efs.filesystem
}
// AWS Elastic File System (EFS) file system
private aws.efs.filesystem @defaults("name id region") {
// Name of the file system
name string
// ID of the file system
id string
// ARN of the file system
arn string
// Whether the file system is encrypted
encrypted bool
// KMS key used for encryption of the file system
kmsKey() aws.kms.key
// Backup policy for the file system
backupPolicy() dict
// Region in which the file system exists
region string
// Availability zone where the file system exists if a specific AZ is defined
availabilityZone string
// Tags for the file system
tags map[string]string
// Creation timestamp
createdAt time
// Mount targets for the file system
mountTargets() []aws.efs.mountTarget
// Access points for the file system
accessPoints() []aws.efs.accessPoint
// Resource-based policy document (JSON)
fileSystemPolicy() string
}
// AWS EFS mount target
private aws.efs.mountTarget @defaults("mountTargetId subnetId") {
// Mount target ID
mountTargetId string
// Associated file system ID
fileSystemId string
// Subnet ID where mount target resides
subnetId string
// Availability zone
availabilityZone string
// IP address of mount target
ipAddress string
// Security groups attached to mount target
securityGroups() []aws.ec2.securitygroup
// Mount target state (creating, available, deleting)
lifecycleState string
// Network interface ID
networkInterfaceId string
// Region where the mount target exists
region string
}
// AWS EFS access point
private aws.efs.accessPoint @defaults("accessPointId name") {
// Access point ID
accessPointId string
// Access point ARN
arn string
// Associated file system ID
fileSystemId string
// Access point name
name string
// POSIX user identity (uid, gid, secondaryGids)
posixUser dict
// Root directory configuration (path, creationInfo)
rootDirectory dict
// Access point state
lifecycleState string
// Resource tags
tags map[string]string
// Region where the access point exists
region string
}
// AWS FSx service
aws.fsx @defaults("fileSystems") {