-
Notifications
You must be signed in to change notification settings - Fork 51
/
PSRule-options.schema.json
1243 lines (1243 loc) · 64.1 KB
/
PSRule-options.schema.json
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
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "PSRule options",
"description": "PSRule options configuration file.",
"$ref": "#/definitions/options",
"definitions": {
"configuration": {
"type": "object",
"title": "Configuration values",
"description": "A set of key/ value configuration options for rules.",
"markdownDescription": "A set of key/ value configuration options for rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#configuration)",
"properties": {
"AZURE_PARAMETER_FILE_EXPANSION": {
"type": "boolean",
"title": "Parameter file expansion",
"description": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules.",
"markdownDescription": "Determines if Azure template parameter files will automatically be expanded. By default, parameter files will not be automatically expanded. When enabled, PSRule will discover and expand JSON parameter files for Azure templates or Bicep modules. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#parameterfileexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"default": false
},
"AZURE_BICEP_FILE_EXPANSION": {
"type": "boolean",
"title": "Bicep source expansion",
"description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.",
"markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"default": false
},
"AZURE_BICEP_FILE_EXPANSION_TIMEOUT": {
"type": "integer",
"title": "Bicep compilation timeout",
"description": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds.",
"markdownDescription": "This configuration option determines the maximum time to spend building a single Bicep source file. The timeout is configured in seconds. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepcompilationtimeout)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"default": 5,
"minimum": 1,
"maximum": 120
},
"AZURE_BICEP_CHECK_TOOL": {
"type": "boolean",
"title": "Checking Bicep Tool",
"description": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to true.",
"markdownDescription": "This configuration option determines if the Azure Bicep CLI is checked during initialization. By default, this option is disabled. To enable, set this option to `true`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#checking-bicep-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"default": false
},
"AZURE_BICEP_MINIMUM_VERSION": {
"type": "string",
"title": "Bicep Minimum Version",
"description": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is 0.4.451.",
"markdownDescription": "This configuration option determines the minimum version of the Bicep CLI that should be used. If the minimum version is less then the expected version an error is reported. By default, this is `0.4.451`. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/setup-bicep/#configuring-minimum-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"default": "0.4.451"
},
"AZURE_AKS_CLUSTER_MINIMUM_VERSION": {
"type": "string",
"title": "AKS cluster minimum version",
"description": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified.",
"markdownDescription": "This configuration option determines the minimum version of Kubernetes for AKS clusters and node pools. Rules that check the Kubernetes version fail when the version is older than the version specified. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-rules/#aks-minimum-kubernetes-version)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"default": "1.27.7"
},
"AZURE_PARAMETER_FILE_METADATA_LINK": {
"type": "boolean",
"title": "Bicep source expansion",
"description": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded.",
"markdownDescription": "This configuration option determines if Azure Bicep source files will automatically be expanded. By default, Bicep files will not be automatically expanded. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#bicepsourceexpansion)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"default": false
},
"AZURE_DEPLOYMENT": {
"type": "object",
"title": "Deployment properties",
"description": "This configuration option sets the deployment object use by the deployment() function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default.",
"markdownDescription": "This configuration option sets the deployment object use by the `deployment()` function. Configure this option to change the details of the deployment when exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentproperties)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"properties": {
"name": {
"type": "string",
"default": "ps-rule-test-deployment"
}
},
"additionalProperties": false
},
"AZURE_RESOURCE_GROUP": {
"type": "object",
"title": "Deployment resource group",
"description": "This configuration option sets the resource group object used by the resourceGroup() function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default.",
"markdownDescription": "This configuration option sets the resource group object used by the `resourceGroup()` function. Configure this option to change the resource group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentresourcegroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"properties": {
"name": {
"type": "string",
"default": "ps-rule-test-rg"
},
"location": {
"type": "string",
"default": "eastus"
},
"tags": {
"type": "object",
"default": {}
},
"properties": {
"type": "object",
"properties": {
"provisioningState": {
"type": "string",
"default": "Succeeded"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"AZURE_SUBSCRIPTION": {
"type": "object",
"title": "Deployment subscription",
"description": "This configuration option sets the subscription object used by the subscription() function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default.",
"markdownDescription": "This configuration option sets the subscription object used by the `subscription()` function. Configure this option to change the subscription object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentsubscription)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"properties": {
"subscriptionId": {
"type": "string",
"default": "ffffffff-ffff-ffff-ffff-ffffffffffff"
},
"displayName": {
"type": "string",
"default": "PSRule Test Subscription"
},
"state": {
"type": "string",
"default": "NotDefined"
}
},
"additionalProperties": false
},
"AZURE_TENANT": {
"type": "object",
"title": "Deployment tenant",
"description": "This configuration option sets the tenant object used by the tenant() function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default.",
"markdownDescription": "This configuration option sets the tenant object used by the `tenant()` function. Configure this option to change the tenant object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymenttenant)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"properties": {
"countryCode": {
"type": "string",
"default": "US"
},
"tenantId": {
"type": "string",
"default": "ffffffff-ffff-ffff-ffff-ffffffffffff"
},
"displayName": {
"type": "string",
"default": "PSRule"
}
},
"additionalProperties": false
},
"AZURE_MANAGEMENT_GROUP": {
"type": "object",
"title": "Deployment management group",
"description": "This configuration option sets the management group object used by the managementGroup() function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default.",
"markdownDescription": "This configuration option sets the management group object used by the `managementGroup()` function. Configure this option to change the management group object when using exporting templates for analysis. Provided properties will override the default. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#deploymentmanagementgroup)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)",
"properties": {
"name": {
"type": "string",
"default": "psrule-test"
},
"properties": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"default": "PSRule Test Management Group"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"AZURE_PARAMETER_DEFAULTS": {
"type": "object",
"title": "Required parameter defaults",
"description": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used.",
"markdownDescription": "This configuration option allows a fallback value to be configured for required parameters. When a parameter value is not provided and a default is not set, the fallback value will be used. [See help](https://azure.github.io/PSRule.Rules.Azure/setup/configuring-expansion/#requiredparameterdefaults)\r\rApplies to: [PSRule for Azure](https://aka.ms/ps-rule-azure)"
}
},
"additionalProperties": true,
"defaultSnippets": [
{
"label": "Custom configuration value",
"body": {
"${1:Key}": "${2:Value}"
}
}
]
},
"convention-option": {
"type": "object",
"title": "Convention options",
"description": "Options that configure conventions.",
"properties": {
"include": {
"type": "array",
"title": "Include conventions",
"description": "An ordered list of conventions to include.",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"baseline-option": {
"type": "object",
"title": "Baseline options",
"description": "Options that configure baselines.",
"properties": {
"group": {
"type": "object",
"title": "Baseline group",
"description": "Configure baseline group names.",
"markdownDescription": "Configure baseline group names.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/baselines/#baseline-groups)",
"additionalProperties": {
"title": "Group mapping",
"description": "Maps a group name to a baseline.",
"markdownDescription": "Maps a group name to a baseline.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/baselines/#baseline-groups)",
"type": "string"
},
"defaultSnippets": [
{
"label": "Baseline group",
"body": {
"${1:Group}": "${2:Baseline}"
}
}
]
}
},
"additionalProperties": false
},
"binding-option": {
"type": "object",
"title": "Object binding",
"description": "Configure property/ object binding options.",
"properties": {
"field": {
"type": "object",
"title": "Field",
"description": "Custom fields to bind.",
"markdownDescription": "Custom fields to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)",
"additionalProperties": {
"type": "array",
"description": "A custom field to bind.",
"markdownDescription": "Custom field to bind. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingfield)",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"ignoreCase": {
"type": "boolean",
"title": "Ignore case",
"description": "Determines if custom binding uses ignores case when matching properties. The default is true.",
"markdownDescription": "Determines if custom binding uses ignores case when matching properties. The default is `true`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingignorecase)",
"default": true
},
"nameSeparator": {
"type": "string",
"title": "Name separator",
"description": "Configures the separator to use for building a qualified name. The default is '/'.",
"markdownDescription": "Configures the separator to use for building a qualified name. The default is `/`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingnameseparator)",
"default": "/"
},
"preferTargetInfo": {
"type": "boolean",
"title": "Prefer target info",
"description": "Determines if binding prefers target info provided by the object over custom configuration. The default is false.",
"markdownDescription": "Determines if binding prefers target info provided by the object over custom configuration. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingprefertargetinfo)",
"default": false
},
"targetName": {
"type": "array",
"title": "Bind TargetName",
"description": "Specifies one or more property names to bind TargetName to.",
"markdownDescription": "Specifies one or more property names to bind TargetName to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargetname)",
"items": {
"type": "string"
},
"uniqueItems": true
},
"targetType": {
"type": "array",
"title": "Bind TargetType",
"description": "Specifies one or more property names to bind TargetType to.",
"markdownDescription": "Specifies one or more property names to bind TargetType to. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingtargettype)",
"items": {
"type": "string"
},
"uniqueItems": true
},
"useQualifiedName": {
"type": "boolean",
"title": "Use qualified name",
"description": "Determines if a qualified TargetName is used. The default is false.",
"markdownDescription": "Determines if a qualified TargetName is used. The default is `false`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#bindingusequalifiedname)",
"default": false
}
},
"additionalProperties": false
},
"format-option": {
"type": "object",
"title": "Format options",
"description": "Define and configure format options.",
"markdownDescription": "Define and configure format options.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#format)",
"properties": {
"yaml": {
"type": "object",
"title": "YAML",
"description": "Support for the YAML format.",
"properties": {
"type": {
"type": "array",
"title": "Type",
"description": "Configures the types to process as YAML.",
"markdownDescription": "Configures the types to process as YAML.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#format)",
"items": {
"type": "string"
},
"default": [
".yaml",
".yml"
]
}
},
"additionalProperties": false
},
"json": {
"type": "object",
"title": "JSON",
"description": "Support for the JSON format including support for JSON with comments.",
"properties": {
"type": {
"type": "array",
"title": "Type",
"description": "Configures the types to process as JSON.",
"markdownDescription": "Configures the types to process as JSON.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#format)",
"items": {
"type": "string"
},
"default": [
".json",
".jsonc",
".sarif"
]
}
},
"additionalProperties": false
},
"markdown": {
"type": "object",
"title": "Markdown",
"description": "Support for the Markdown format.",
"properties": {
"type": {
"type": "array",
"title": "Type",
"description": "Configures the types to process as Markdown.",
"markdownDescription": "Configures the types to process as Markdown.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#format)",
"items": {
"type": "string"
},
"default": [
".md",
".markdown"
]
}
},
"additionalProperties": false
},
"powershell_data": {
"type": "object",
"title": "PowerShell Data",
"description": "Support for the PowerShell Data format.",
"properties": {
"type": {
"type": "array",
"title": "Type",
"description": "Configures the types to process as PowerShell Data.",
"markdownDescription": "Configures the types to process as PowerShell Data.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#format)",
"items": {
"type": "string"
},
"default": [
".psd1"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": {
"type": "object",
"title": "Custom format",
"description": "Define a custom emitter format.",
"properties": {
"type": {
"oneOf": [
{
"type": "array",
"title": "Type",
"description": "The types to process as this emitter format. This is usually the file extension such as .xml.",
"markdownDescription": "The types to process as this emitter format. This is usually the file extension such as `.xml`.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#format)",
"items": {
"type": "string"
}
},
{
"type": "string",
"title": "Type",
"description": "The type to process as this emitter format. This is usually the file extension such as .xml.",
"markdownDescription": "The type to process as this emitter format. This is usually the file extension such as `.xml`.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#format)",
"minLength": 1
}
]
}
},
"required": [
"type"
]
},
"defaultSnippets": [
{
"label": "Custom format",
"description": "Define a custom format by name.",
"body": {
"${1:format_name}": {
"type": [
"${2:mapped_type}"
]
}
}
}
]
},
"execution-option": {
"type": "object",
"title": "Execution options",
"description": "Options that affect execution.",
"markdownDescription": "Options that affect execution. [See help](https://aka.ms/ps-rule/options)",
"properties": {
"break": {
"type": "string",
"title": "Break",
"description": "Determines the minimum rule severity level that breaks the pipeline. By default, the pipeline will break if a rule of error severity fails.",
"markdownDescription": "Determines the minimum rule severity level that breaks the pipeline. By default, the pipeline will break if a rule of error severity fails.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#executionbreak)",
"enum": [
"Never",
"OnError",
"OnWarning",
"OnInformation"
],
"default": "OnError"
},
"duplicateResourceId": {
"type": "string",
"title": "Duplicate resource identifiers",
"description": "Determines how to handle duplicate resources identifiers during execution. Regardless of the value, only the first resource will be used. By default, an error is thrown. When set to Warn, a warning is generated. When set to Ignore, no output will be displayed.",
"markdownDescription": "Determines how to handle duplicate resources identifiers during execution.\n\nRegardless of the value, only the first resource will be used. By default, an error is thrown.\n\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionduplicateresourceid)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Error"
},
"hashAlgorithm": {
"type": "string",
"title": "Hash Algorithm",
"description": "Configures the hashing algorithm used by the PSRule runtime. The default is SHA512.",
"markdownDescription": "Configures the hashing algorithm used by the PSRule runtime. The default is `SHA512`.\n- When set to `SHA512` the SHA-512 algorithm is used for hashing functions.\n- When set to `SHA384` the SHA-384 algorithm is used for hashing functions.\n- When set to `SHA256` the SHA-256 algorithm is used for hashing functions.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionhashalgorithm)",
"enum": [
"SHA512",
"SHA384",
"SHA256"
],
"default": "SHA512"
},
"languageMode": {
"type": "string",
"title": "Language Mode",
"description": "The PowerShell language mode to use for rule execution. The default is FullLanguage.",
"markdownDescription": "The PowerShell language mode to use for rule execution. The default is `FullLanguage`.\n- `FullLanguage` - Executes with all language features.\n- `ConstrainedLanguage` - Executes in constrained language mode that restricts the types and methods that can be used.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionlanguagemode)",
"enum": [
"FullLanguage",
"ConstrainedLanguage"
],
"default": "FullLanguage"
},
"restrictScriptSource": {
"type": "string",
"title": "Restrict Script Source",
"description": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is Unrestricted.",
"markdownDescription": "Configures where to allow PowerShell language features (such as rules and conventions) to run from. The default is `Unrestricted`.\n- When set to `Unrestricted` PowerShell language features are allowed from workspace and modules.\n- When set to `ModuleOnly` PowerShell language features are allowed from loaded modules, but script files within the workspace are ignored.\n- When set to `DisablePowerShell` no PowerShell language features are used during PSRule run.\n\n[See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#executionrestrictscriptsource)",
"enum": [
"Unrestricted",
"ModuleOnly",
"DisablePowerShell"
],
"default": "Unrestricted"
},
"initialSessionState": {
"type": "string",
"title": "Initial Session State",
"description": "Determines how the initial session state for executing PowerShell code is created. The default is BuiltIn.",
"markdownDescription": "Determines how the initial session state for executing PowerShell code is created. The default is `BuiltIn`.\n- When set to `BuiltIn` all built-in cmdlets are loaded.\n- When set to `Minimal` only cmdlets for hosting PowerShell will be loaded.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninitialsessionstate)",
"enum": [
"BuiltIn",
"Minimal"
],
"default": "BuiltIn"
},
"suppressionGroupExpired": {
"type": "string",
"title": "Expired suppression groups",
"description": "Determines how to handle expired suppression groups. Regardless of the value, an expired suppression group will be ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.",
"markdownDescription": "Determines how to handle expired suppression groups.\n\nRegardless of the value, an expired suppression group will be ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionsuppressiongroupexpired)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Warn"
},
"ruleExcluded": {
"type": "string",
"title": "Rule excluded",
"description": "Determines how to handle excluded rules. Regardless of the value, excluded rules are ignored. By default, rules are excluded silently. When set to Error, an error is thrown. When set to Warn, a warning is generated. When set to Debug, a message is written to the debug log.",
"markdownDescription": "Determines how to handle excluded rules.\n\nRegardless of the value, excluded rules are ignored. By default, rules are excluded silently.\n\n- When set to `Error`, an error is thrown.\n- When set to `Warn`, a warning is generated.\n- When set to `Debug`, a message is written to the debug log.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleexcluded)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Ignore"
},
"ruleSuppressed": {
"type": "string",
"title": "Rule suppressed",
"description": "Determines how to handle suppressed rules. Regardless of the value, a suppressed rule is ignored. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.",
"markdownDescription": "Determines how to handle suppressed rules.\n\nRegardless of the value, a suppressed rule is ignored. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionrulesuppressed)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Warn"
},
"aliasReference": {
"type": "string",
"title": "Alias references",
"description": "Determines how to handle when an alias to a resource is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.",
"markdownDescription": "Determines how to handle when an alias to a resource is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionaliasreference)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Warn"
},
"ruleInconclusive": {
"type": "string",
"title": "Inconclusive rules",
"description": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.",
"markdownDescription": "Determines how to handle rules that generate inconclusive results. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionruleinconclusive)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Warn"
},
"invariantCulture": {
"type": "string",
"title": "Invariant culture",
"description": "Determines how to report when an invariant culture is used. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.",
"markdownDescription": "Determines how to report when an invariant culture is used. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executioninvariantculture)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Warn"
},
"unprocessedObject": {
"type": "string",
"title": "Unprocessed object",
"description": "Determines how to report objects that are not processed by any rule. By default, a warning is generated. When set to Error, an error is thrown. When set to Debug, a message is written to the debug log. When set to Ignore, no output will be displayed.",
"markdownDescription": "Determines how to report objects that are not processed by any rule. By default, a warning is generated.\n\n- When set to `Error`, an error is thrown.\n- When set to `Debug`, a message is written to the debug log.\n- When set to `Ignore`, no output will be displayed.\n\n[See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#executionunprocessedobject)",
"enum": [
"Ignore",
"Warn",
"Error",
"Debug"
],
"default": "Warn"
}
},
"additionalProperties": false
},
"include-option": {
"type": "object",
"title": "Include options",
"description": "Options that affect source locations imported for execution.",
"properties": {
"module": {
"type": "array",
"title": "Include module",
"description": "Automatically include rules and resources from the specified modules.",
"markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)",
"items": {
"type": "string",
"title": "Include module",
"description": "Automatically include rules and resources from the specified modules.",
"markdownDescription": "Automatically include rules and resources from the specified modules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includemodule)"
},
"uniqueItems": true
},
"path": {
"type": "array",
"title": "Include path",
"description": "Automatically include rules and resources from the specified paths.",
"markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)",
"items": {
"type": "string",
"title": "Include path",
"description": "Automatically include rules and resources from the specified paths.",
"markdownDescription": "Automatically include rules and resources from the specified paths. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#includepath)"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"input-option": {
"type": "object",
"title": "Input options",
"description": "Options that affect how input types are processed.",
"markdownDescription": "Options that affect how input types are processed.",
"properties": {
"fileObjects": {
"type": "boolean",
"title": "File objects",
"description": "Determines if file objects are processed by rules.",
"markdownDescription": "Determines if file objects are processed by rules. [See help](https://microsoft.github.io/PSRule/v3/concepts/PSRule/en-US/about_PSRule_Options/#inputfileobjects)",
"default": false
},
"format": {
"type": "string",
"title": "Input format",
"description": "The input string format. The default is Detect, which will try to detect the format when the -InputPath parameter is used.",
"markdownDescription": "The input string format. The default is `Detect`, which will try to detect the format when the `-InputPath` parameter is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputformat)",
"enum": [
"None",
"Yaml",
"Json",
"Markdown",
"PowerShellData",
"File",
"Detect"
],
"default": "Detect"
},
"ignoreGitPath": {
"type": "boolean",
"title": "Ignore .git path",
"description": "Determine if files within the .git path are ignored when the -InputPath parameter is used. This is enabled by default.",
"markdownDescription": "Determine if files within the `.git` path are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoregitpath)",
"default": true
},
"ignoreRepositoryCommon": {
"type": "boolean",
"title": "Ignore common files",
"description": "Determine if common repository files are ignored when the -InputPath parameter is used. This is enabled by default.",
"markdownDescription": "Determine if common repository files are ignored when the `-InputPath` parameter is used. This is enabled by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignorerepositorycommon)",
"default": true
},
"ignoreObjectSource": {
"type": "boolean",
"title": "Ignore object source",
"description": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of pathIgnore, ignoreGitPath, and ignoreRepositoryCommon options.",
"markdownDescription": "Determines if objects are ignore based on their file source path. When set, objects from the pipeline or read from files will be exclude based on their source path and the configuration of `pathIgnore`, `ignoreGitPath`, and `ignoreRepositoryCommon` options. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreobjectsource)",
"default": false
},
"ignoreUnchangedPath": {
"type": "boolean",
"title": "Ignore unchanged path",
"description": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed.",
"markdownDescription": "Determine if unchanged files are ignored. By default, PSRule will process all files within an input path. For large repositories, this can result in a large number of files being processed. Additionally, for a pull request you may only be interested in files that have changed. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputignoreunchangedpath)",
"default": false
},
"objectPath": {
"type": "string",
"title": "Object path",
"description": "The object path to a property to use instead of the pipeline object.",
"markdownDescription": "The object path to a property to use instead of the pipeline object. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputobjectpath)"
},
"pathIgnore": {
"type": "array",
"title": "Path ignore",
"description": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use ! at the start of the entry. Wildcards are supported.",
"markdownDescription": "Exclude input files that match the path spec. To exclude a file specify the path prefix or file name. To re-include previously excluded paths use `!` at the start of the entry. Wildcards are supported. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputpathignore)",
"items": {
"type": "string"
},
"uniqueItems": true
},
"targetType": {
"type": "array",
"title": "Target type",
"description": "Only process objects that match one of the included types.",
"markdownDescription": "Only process objects that match one of the included types. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#inputtargettype)",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false
},
"logging-option": {
"type": "object",
"title": "Logging options",
"description": "Options for configuring information logging.",
"properties": {
"limitDebug": {
"type": "array",
"title": "Scopes for debug messages",
"description": "Limits debug messages to a list of named debug scopes. No scopes are set by default.",
"markdownDescription": "Limits debug messages to a list of named debug scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitdebug)",
"items": {
"type": "string"
},
"uniqueItems": true
},
"limitVerbose": {
"type": "array",
"title": "Scopes for verbose messages",
"description": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default.",
"markdownDescription": "Limits verbose messages to a list of named verbose scopes. No scopes are set by default. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#logginglimitverbose)",
"items": {
"type": "string"
},
"uniqueItems": true
},
"ruleFail": {
"type": "string",
"title": "Report fail to stream",
"description": "Log fail outcomes for each rule to a specific informational stream. The default is None.",
"markdownDescription": "Log fail outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulefail)",
"enum": [
"None",
"Error",
"Warning",
"Information"
],
"default": "None"
},
"rulePass": {
"type": "string",
"title": "Report pass to stream",
"description": "Log pass outcomes for each rule to a specific informational stream. The default is None.",
"markdownDescription": "Log pass outcomes for each rule to a specific informational stream. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#loggingrulepass)",
"enum": [
"None",
"Error",
"Warning",
"Information"
],
"default": "None"
}
},
"additionalProperties": false
},
"suppression-option": {
"type": "object",
"title": "Suppress rules",
"description": "Specifies suppression rules.",
"markdownDescription": "Specifies suppression rules. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)",
"uniqueItems": true,
"additionalProperties": {
"oneOf": [
{
"type": "array",
"title": "Suppressed rule",
"description": "The name of the rule to suppress.",
"markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)",
"items": {
"type": "string",
"title": "Suppress when",
"description": "Suppress the rule on TargetNames to suppress.",
"markdownDescription": "Suppress the rule on TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)"
},
"uniqueItems": true
},
{
"type": "object",
"title": "Suppressed rule",
"description": "The name of the rule to suppress.",
"markdownDescription": "The name of the rule to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)",
"properties": {
"targetName": {
"type": "array",
"title": "Suppress when",
"description": "One or more TargetNames to suppress.",
"markdownDescription": "One or more TargetNames to suppress. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#suppression)",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"additionalProperties": false,
"required": [
"targetName"
]
}
]
}
},
"output-option": {
"type": "object",
"title": "Output options",
"description": "Options that affect how output is generated.",
"properties": {
"as": {
"type": "string",
"title": "Result type",
"description": "Determine if detailed or summary results are generated. The default is Detail.",
"markdownDescription": "Determine if detailed or summary results are generated. The default is `Detail`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputas)",
"enum": [
"Detail",
"Summary"
],
"default": "Detail"
},
"banner": {
"title": "Banner format",
"description": "The information displayed for Assert-PSRule banner. The default is Default which includes Title, Source, SupportLinks, and RepositoryInfo.",
"markdownDescription": "The information displayed for Assert-PSRule banner. The default is `Default` which includes `Title`, `Source`, `SupportLinks`, and `RepositoryInfo`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputbanner)",
"oneOf": [
{
"type": "string",
"enum": [
"None",
"Title",
"Source",
"SupportLinks",
"RepositoryInfo",
"Default",
"Minimal"
]
},
{
"type": "integer"
}
],
"default": "Default"
},
"culture": {
"type": "array",
"title": "Culture",
"description": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used.",
"markdownDescription": "One or more cultures to use for generating output. When multiple cultures are specified, the first matching culture will be used. By default, the current PowerShell culture is used. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputculture)",
"items": {
"type": "string",
"description": "A culture for generating output.",
"minLength": 2
},
"uniqueItems": true,
"defaultSnippets": [
{
"label": "en-AU",
"bodyText": [
"en-AU"
]
},
{
"label": "en-US",
"bodyText": [
"en-US"
]
},
{
"label": "en-GB",
"bodyText": [
"en-GB"
]
}
]
},
"encoding": {
"type": "string",
"title": "Encoding",
"description": "The encoding to use when writing results to file. The default is Default, UTF-8 without BOM.",
"markdownDescription": "The encoding to use when writing results to file. The default is `Default`, UTF-8 without BOM. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputencoding)",
"enum": [
"Default",
"UTF8",
"UTF7",
"Unicode",
"UTF32",
"ASCII"
],
"default": "Default"
},
"footer": {
"title": "Footer format",
"description": "The information displayed for Assert-PSRule footer. The default is Default which includes RuleCount, RunInfo, and OutputFile.",
"markdownDescription": "The information displayed for Assert-PSRule footer. The default is `Default` which includes `RuleCount`, `RunInfo`, and `OutputFile`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputfooter)",
"oneOf": [
{
"type": "string",
"enum": [
"None",
"RuleCount",
"RunInfo",
"OutputFile",
"Default"
]
},
{
"type": "integer",
"minimum": 0
}
],
"default": "Default"
},
"format": {
"type": "string",
"title": "Output format",
"description": "The output format to use when returning results. The default is None.",
"markdownDescription": "The output format to use when returning results. The default is `None`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputformat)",
"enum": [
"None",
"Yaml",
"Json",
"Markdown",
"NUnit3",
"Csv",
"Wide",
"Sarif"
],
"default": "None"
},
"jobSummaryPath": {
"type": "string",
"title": "Job Summary Path",
"description": "The path to a job summary output file.",
"markdownDescription": "The path to a job summary output file. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjobsummarypath)"
},
"jsonIndent": {
"type": "integer",
"title": "Output Json Indent",
"description": "The indentation level for JSON output. The default is 0.",
"markdownDescription": "The indentation level for JSON output. The default is `0`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputjsonindent)",
"minimum": 0,
"maximum": 4,
"default": 0
},
"outcome": {
"type": "string",
"title": "Output outcome",
"description": "The outcome of rule results to return. The default is Processed.",
"markdownDescription": "The outcome of rule results to return. The default is `Processed`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputoutcome)",
"enum": [
"None",
"Fail",
"Pass",
"Error",
"Processed",
"All"
],
"default": "Processed"
},
"path": {
"type": "string",
"title": "Output path",
"description": "The file path location to save results.",
"markdownDescription": "The file path location to save results. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputpath)"
},
"style": {
"type": "string",
"title": "Output Style",
"description": "The style that results will be presented in. The default is Detect.",
"markdownDescription": "The style that results will be presented in. The default is `Detect`. [See help](https://microsoft.github.io/PSRule/v2/concepts/PSRule/en-US/about_PSRule_Options/#outputstyle)",
"enum": [
"Client",