@aws/cloudformation-validate 1.7.0-beta → 1.9.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE ADDED
@@ -0,0 +1,8 @@
1
+ AWS CloudFormation Validate
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+
4
+ This product includes software developed at
5
+ Amazon Web Services (https://aws.amazon.com/).
6
+
7
+ This software includes components licensed under various open source licenses.
8
+ You can find a full list of third-party licenses in the THIRD-PARTY-LICENSES.txt file included with this distribution.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # CloudFormation Validate for Node.js
2
2
 
3
3
  Validate AWS CloudFormation templates from JavaScript or TypeScript and catch schema violations, security risks, and
4
- best-practice findings before deployment in your editor, build, or CI.
4
+ best-practice findings before deployment - in your editor, build, or CI.
5
5
 
6
- - **Offline** all rules and resource schemas are bundled.
7
- - **Fast** sub-second validation per template.
6
+ - **Offline** - all rules and resource schemas are bundled.
7
+ - **Fast** - sub-second validation per template.
8
8
 
9
9
  ## Installation
10
10
 
@@ -16,7 +16,7 @@ npm install @aws/cloudformation-validate
16
16
 
17
17
  ## Quick start
18
18
 
19
- Engines, models, and validators hold off-heap memory call `.free()` when done with each object:
19
+ Engines, models, and validators hold off-heap memory - call `.free()` when done with each object:
20
20
 
21
21
  ```typescript
22
22
  import { RegoEngine, TemplateFile } from "@aws/cloudformation-validate";
@@ -32,13 +32,13 @@ try {
32
32
  }
33
33
  ```
34
34
 
35
- Each diagnostic identifies the rule, severity, affected resource and property, and source location see
35
+ Each diagnostic identifies the rule, severity, affected resource and property, and source location - see
36
36
  [StandardDiagnostic](#standarddiagnostic). A complete, runnable project is in
37
37
  [examples](https://github.com/aws-cloudformation/cloudformation-validate/tree/main/src/bindings-wasm/examples).
38
38
 
39
39
  ## Engine
40
40
 
41
- `RegoEngine` and `CelEngine` both implement the `Engine` interface and are interchangeable they produce identical
41
+ `RegoEngine` and `CelEngine` both implement the `Engine` interface and are interchangeable - they produce identical
42
42
  diagnostics for the same template and config.
43
43
 
44
44
  ### `Engine` interface
@@ -59,7 +59,7 @@ Passed to the constructor. All fields are optional; omitted rule arrays are empt
59
59
  ```typescript
60
60
  interface EngineConfig {
61
61
  customRules?: RuleSource[]; // engine-native rules (Rego for RegoEngine, CEL for CelEngine)
62
- guardRules?: RuleSource[]; // CloudFormation Guard DSL rules translated internally
62
+ guardRules?: RuleSource[]; // CloudFormation Guard DSL rules - translated internally
63
63
  schemaValidatorConfig?: SchemaValidatorConfig; // schema validation and overlay configuration
64
64
  }
65
65
 
@@ -89,7 +89,7 @@ interface AdditionalSchemaSource {
89
89
  }
90
90
  ```
91
91
 
92
- Pass a `RuleFile` to load a rule from disk the same pattern as `TemplateFile` for templates or an
92
+ Pass a `RuleFile` to load a rule from disk - the same pattern as `TemplateFile` for templates - or an
93
93
  `ExternalRuleSource` when you already have the rule text in memory. `SchemaFile` does the same for an additional
94
94
  resource provider schema. Its optional constructor `typeName` may be omitted when the schema JSON contains its own
95
95
  `typeName`.
@@ -109,7 +109,7 @@ const engine = new CelEngine({
109
109
 
110
110
  ## ValidateConfig
111
111
 
112
- Controls filtering, severity, parameter overrides, and behavior. All fields optional omitting the config or passing
112
+ Controls filtering, severity, parameter overrides, and behavior. All fields optional - omitting the config or passing
113
113
  `{}` uses defaults.
114
114
 
115
115
  ```typescript
@@ -136,7 +136,7 @@ interface ValidateConfig {
136
136
 
137
137
  ### RuleFilterConfig
138
138
 
139
- Both `include` and `exclude` use this structure. All fields are additive a rule matches if it hits any criterion.
139
+ Both `include` and `exclude` use this structure. All fields are additive - a rule matches if it hits any criterion.
140
140
 
141
141
  ```typescript
142
142
  interface RuleFilterConfig {
@@ -158,7 +158,7 @@ interface ResourceTypeFilter { ruleId?: string; resourceType: string; }
158
158
  interface ServiceFilter { ruleId?: string; service: string; }
159
159
  ```
160
160
 
161
- The `service` is matched verbatim against the `service-provider::service-name` prefix of the resource type its first
161
+ The `service` is matched verbatim against the `service-provider::service-name` prefix of the resource type - its first
162
162
  two `::`-delimited segments (e.g. `AWS::AutoScaling` in `AWS::AutoScaling::LaunchConfiguration`).
163
163
 
164
164
  The `resourceIds` dimension matches only diagnostics attributed to a resource; `logicalIds` additionally matches
@@ -168,7 +168,7 @@ the same value). An optional `entityType` scopes a `LogicalIdFilter` to entities
168
168
 
169
169
  ### PseudoParameterOverrides
170
170
 
171
- Override CloudFormation pseudo-parameters used during intrinsic function resolution. All fields optional when
171
+ Override CloudFormation pseudo-parameters used during intrinsic function resolution. All fields optional - when
172
172
  `undefined`, the engine uses built-in defaults (e.g. region defaults to `us-east-1`).
173
173
 
174
174
  ```typescript
@@ -193,7 +193,7 @@ const template = new TemplateFile("path/to/template.yaml");
193
193
 
194
194
  ## TemplateModel
195
195
 
196
- Parses a template into the resolved `SemanticModel` for direct inspection the same model the engines evaluate rules
196
+ Parses a template into the resolved `SemanticModel` for direct inspection - the same model the engines evaluate rules
197
197
  against.
198
198
 
199
199
  ```typescript
@@ -238,7 +238,7 @@ validator.free();
238
238
  ```typescript
239
239
  interface StandardReport {
240
240
  filePath: string;
241
- status: "OK" | "ERROR"; // ERROR when the template fails to parse
241
+ status: "OK" | "ANALYSIS_INCOMPLETE" | "ERROR"; // ERROR is a pipeline failure; ANALYSIS_INCOMPLETE may omit findings
242
242
  version: string;
243
243
  metadata: ReportMetadata;
244
244
  performance: PerformanceMetrics;
@@ -250,6 +250,11 @@ interface StandardReport {
250
250
  `ruleDescription`, `phase` (`PARSE` | `SCHEMA` | `LINT`), and `context` (`ViolationContext` with
251
251
  `actualValue`, `expectedConstraint`, `resolutionSource`, etc.).
252
252
 
253
+ Each optional budget-exhaustion record retains a stable machine-readable kind and also includes a
254
+ human-readable description sentence, the numeric limit, and whether that specific exhaustion makes analysis
255
+ incomplete. `requiredPropertyCombinations` is context-only, so its `analysisIncomplete` value is `false` and the
256
+ report can remain `"OK"`.
257
+
253
258
  ### StandardDiagnostic
254
259
 
255
260
  ```typescript
@@ -2301,6 +2301,85 @@ limitations under the License.
2301
2301
 
2302
2302
 
2303
2303
 
2304
+ ******************************
2305
+
2306
+ cloudformation-guard-lang
2307
+ 1.0.0 <https://github.com/aws-cloudformation/cloudformation-guard>
2308
+ Apache License
2309
+ Version 2.0, January 2004
2310
+ http://www.apache.org/licenses/
2311
+
2312
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
2313
+
2314
+ 1. Definitions.
2315
+
2316
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
2317
+
2318
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
2319
+
2320
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
2321
+
2322
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
2323
+
2324
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
2325
+
2326
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
2327
+
2328
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
2329
+
2330
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
2331
+
2332
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
2333
+
2334
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2335
+
2336
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
2337
+
2338
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
2339
+
2340
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
2341
+
2342
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
2343
+
2344
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
2345
+
2346
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
2347
+
2348
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
2349
+
2350
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
2351
+
2352
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
2353
+
2354
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
2355
+
2356
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
2357
+
2358
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
2359
+
2360
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
2361
+
2362
+ END OF TERMS AND CONDITIONS
2363
+
2364
+ APPENDIX: How to apply the Apache License to your work.
2365
+
2366
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
2367
+
2368
+ Copyright [yyyy] [name of copyright owner]
2369
+
2370
+ Licensed under the Apache License, Version 2.0 (the "License");
2371
+ you may not use this file except in compliance with the License.
2372
+ You may obtain a copy of the License at
2373
+
2374
+ http://www.apache.org/licenses/LICENSE-2.0
2375
+
2376
+ Unless required by applicable law or agreed to in writing, software
2377
+ distributed under the License is distributed on an "AS IS" BASIS,
2378
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2379
+ See the License for the specific language governing permissions and
2380
+ limitations under the License.
2381
+
2382
+
2304
2383
  ******************************
2305
2384
 
2306
2385
  colored
@@ -4352,85 +4431,6 @@ See the License for the specific language governing permissions and
4352
4431
  limitations under the License.
4353
4432
 
4354
4433
 
4355
- ******************************
4356
-
4357
- guard-lang
4358
- 1.0.0 <https://github.com/aws-cloudformation/cloudformation-guard>
4359
- Apache License
4360
- Version 2.0, January 2004
4361
- http://www.apache.org/licenses/
4362
-
4363
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
4364
-
4365
- 1. Definitions.
4366
-
4367
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
4368
-
4369
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
4370
-
4371
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
4372
-
4373
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
4374
-
4375
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
4376
-
4377
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
4378
-
4379
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
4380
-
4381
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
4382
-
4383
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
4384
-
4385
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
4386
-
4387
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
4388
-
4389
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4390
-
4391
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
4392
-
4393
- (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
4394
-
4395
- (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
4396
-
4397
- (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
4398
-
4399
- (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
4400
-
4401
- You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
4402
-
4403
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
4404
-
4405
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
4406
-
4407
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
4408
-
4409
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
4410
-
4411
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
4412
-
4413
- END OF TERMS AND CONDITIONS
4414
-
4415
- APPENDIX: How to apply the Apache License to your work.
4416
-
4417
- To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
4418
-
4419
- Copyright [yyyy] [name of copyright owner]
4420
-
4421
- Licensed under the Apache License, Version 2.0 (the "License");
4422
- you may not use this file except in compliance with the License.
4423
- You may obtain a copy of the License at
4424
-
4425
- http://www.apache.org/licenses/LICENSE-2.0
4426
-
4427
- Unless required by applicable law or agreed to in writing, software
4428
- distributed under the License is distributed on an "AS IS" BASIS,
4429
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4430
- See the License for the specific language governing permissions and
4431
- limitations under the License.
4432
-
4433
-
4434
4434
  ******************************
4435
4435
 
4436
4436
  hashbrown
@@ -306,6 +306,28 @@ export interface DiagnosticRuleAssertion {
306
306
  assertDescription?: string;
307
307
  }
308
308
 
309
+ /**
310
+ * A single budget-exhaustion record in report metadata.
311
+ */
312
+ export interface BudgetExhaustionRecord {
313
+ /**
314
+ * Stable lower camelCase budget kind identifier.
315
+ */
316
+ kind: string;
317
+ /**
318
+ * Human-readable explanation of the exhausted budget.
319
+ */
320
+ description?: string;
321
+ /**
322
+ * The numeric limit that was exhausted.
323
+ */
324
+ limit: number;
325
+ /**
326
+ * Whether exhausting this budget makes the overall analysis incomplete.
327
+ */
328
+ analysisIncomplete: boolean;
329
+ }
330
+
309
331
  /**
310
332
  * A single edge in the template\'s reference graph, from a referencing resource to its target.
311
333
  */
@@ -428,7 +450,7 @@ export interface ResolvedResource {
428
450
  * A top-level CloudFormation template section, as documented in the template
429
451
  * anatomy (<https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html>).
430
452
  *
431
- * This is the canonical, single definition of the section names section
453
+ * This is the canonical, single definition of the section names - section
432
454
  * constants in other crates derive from it.
433
455
  */
434
456
  export type TopLevelSection =
@@ -692,10 +714,12 @@ export interface IdRange {
692
714
  }
693
715
 
694
716
  /**
695
- * Outcome of a validation run. `Ok` means the engine completed; `Error` means
696
- * the pipeline could not run (e.g. parse failure).
717
+ * Outcome of a validation run. `Ok` means validation completed without
718
+ * correctness-affecting curtailment. `AnalysisIncomplete` means a deterministic
719
+ * budget curtailed analysis in a way that could omit findings. `Error` means
720
+ * the validation pipeline could not run, such as when parsing fails.
697
721
  */
698
- export type ReportStatus = 'OK' | 'ERROR';
722
+ export type ReportStatus = 'OK' | 'ANALYSIS_INCOMPLETE' | 'ERROR';
699
723
 
700
724
  /**
701
725
  * Per-resource observations collected while resolving intrinsics, used to drive lint checks.
@@ -788,8 +812,8 @@ export interface ResourceIdFilter {
788
812
  }
789
813
 
790
814
  /**
791
- * Suppress a rule for a specific named template entity a resource,
792
- * parameter, output, mapping, condition, or template rule identified by its
815
+ * Suppress a rule for a specific named template entity - a resource,
816
+ * parameter, output, mapping, condition, or template rule - identified by its
793
817
  * logical ID. An absent `rule_id` scopes the filter to every rule on that
794
818
  * entity; an absent `entity_type` scopes it to entities of every type with
795
819
  * that logical ID.
@@ -810,7 +834,7 @@ export interface ResourceTypeFilter {
810
834
  }
811
835
 
812
836
  /**
813
- * Suppress a rule for every resource belonging to a service the
837
+ * Suppress a rule for every resource belonging to a service - the
814
838
  * `service-provider::service-name` prefix of the resource type (its first two
815
839
  * `::`-delimited segments, for example `AWS::AutoScaling` in
816
840
  * `AWS::AutoScaling::LaunchConfiguration`, or `Alexa::ASK` in
@@ -825,7 +849,7 @@ export interface ServiceFilter {
825
849
  }
826
850
 
827
851
  /**
828
- * The kind of template entity a diagnostic targets the singular form of the
852
+ * The kind of template entity a diagnostic targets - the singular form of the
829
853
  * top-level section the entity is declared in. Every documented section has a
830
854
  * variant; the ones whose children are addressable by logical ID (resources,
831
855
  * parameters, outputs, mappings, conditions, rules, and metadata keys) are
@@ -956,7 +980,7 @@ export interface StandardDiagnostic {
956
980
  */
957
981
  source: RuleOrigin;
958
982
  /**
959
- * The named template entity this finding targets a resource, parameter, output, mapping, condition, or template rule if any.
983
+ * The named template entity this finding targets - a resource, parameter, output, mapping, condition, or template rule - if any.
960
984
  */
961
985
  entity?: Entity;
962
986
  /**
@@ -994,7 +1018,7 @@ export interface DetailedDiagnostic {
994
1018
  */
995
1019
  source: RuleOrigin;
996
1020
  /**
997
- * The named template entity this finding targets a resource, parameter, output, mapping, condition, or template rule if any.
1021
+ * The named template entity this finding targets - a resource, parameter, output, mapping, condition, or template rule - if any.
998
1022
  */
999
1023
  entity?: Entity;
1000
1024
  /**
@@ -1048,7 +1072,15 @@ export interface ReportMetadata {
1048
1072
  /**
1049
1073
  * Number of rules that were active for this run after any category exclusions.
1050
1074
  */
1051
- rulesEvaluated?: number;
1075
+ rulesEvaluated: number;
1076
+ /**
1077
+ * Source-qualified cfn-lint version used to sync bundled derived data.
1078
+ */
1079
+ cfnLintVersion: string;
1080
+ /**
1081
+ * Source-qualified enhanced resource-schema version used for the bundled provider schemas.
1082
+ */
1083
+ resourceSchemaVersion: string;
1052
1084
  resourcesScanned: number;
1053
1085
  /**
1054
1086
  * Tally of reported diagnostics by severity.
@@ -1066,6 +1098,11 @@ export interface ReportMetadata {
1066
1098
  * Minimum severity included in the report; lower-severity findings are omitted.
1067
1099
  */
1068
1100
  severityLevel: Severity;
1101
+ /**
1102
+ * Records of deterministic validation budgets exhausted during this run.
1103
+ * Absent when no budget was exhausted.
1104
+ */
1105
+ budgetExhaustions?: BudgetExhaustionRecord[] | undefined;
1069
1106
  }
1070
1107
 
1071
1108
  export interface Summary {
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/cloudformation-validate",
3
- "version": "1.7.0-beta",
4
- "description": "AWS CloudFormation Validate",
3
+ "version": "1.9.0-beta",
4
+ "description": "Fast, offline, embeddable validation for AWS CloudFormation templates",
5
5
  "keywords": [
6
6
  "aws",
7
7
  "amazon",
@@ -17,6 +17,9 @@
17
17
  "name": "Amazon Web Services",
18
18
  "url": "https://aws.amazon.com"
19
19
  },
20
+ "bugs": {
21
+ "url": "https://github.com/aws-cloudformation/cloudformation-validate/issues"
22
+ },
20
23
  "license": "Apache-2.0",
21
24
  "engines": {
22
25
  "node": ">=20.0.0"