v3.1.0
What's Changed
- [Code Quality]: removing unecessary result return types by @joshfried-aws in #445
- [Enhancement]: JUnit reporter for validate command by @joshfried-aws in #446
- [Enhancement] Test Command enhanced reporters (JSON/YAML) by @joshfried-aws in #447
- [Misc]: changing all walkdirs to use the same cmp operator by @joshfried-aws in #450
- [Enhancement] Only show errors/failures in output by @dannyvassallo in #448
- [Enhancement]: JUnit reporters for test command by @joshfried-aws in #451
- "[Misc]: updating readme to reflect new reporters for test and validate" by @joshfried-aws in #452
- [Misc]: updating build and unit tests to include a windows job by @joshfried-aws in #449
- [Misc]: addressing new clippy lints in rust 1.76 by @joshfried-aws in #454
- fix rulegen invalid parameter by @sejimhp in #453
- [Enhancement] Use pretty_assertions by @dannyvassallo in #456
- [Enhancement] Show full path to file #410 by @dannyvassallo in #457
- [Enhancement]: cfn-guard as a library by @joshfried-aws in #458
- [Enhancement] Add support for windows by @dannyvassallo in #460
- [Enhancement] Vscode workspace settings by @dannyvassallo in #462
- [Enhancement] Windows support - Powershell check gh action by @dannyvassallo in #463
- [Code Quality]: default implementation for reader and writer by @joshfried-aws in #461
- adding rustdocs for validate, and it's builder by @joshfried-aws in #465
- [Enhancement] Add typo checker and correct errors by @dannyvassallo in #464
- [Misc]: doc updates for test command by @joshfried-aws in #467
- [MISC] docs update for parse-tree command by @joshfried-aws in #468
- [Misc]: rulegen docs by @joshfried-aws in #469
- [Misc] Removing unnecessary public modifiers by @joshfried-aws in #470
- [Enhancement] Add support for SARIF by @dannyvassallo in #473
- [MISC]: bumping up versions for all packages to 3.1.0-beta by @joshfried-aws in #474
- Bump mio from 0.8.5 to 0.8.11 by @dependabot in #477
- [Documentation] Add ci examples by @dannyvassallo in #481
- [BugFix]: Addressing issues with parsing newline characters on windows for conjunctions by @joshfried-aws in #482
- [Documentation] SARIF Example by @dannyvassallo in #483
- [Documentation] Use Docker for JUNIT examples by @dannyvassallo in #484
- [Docs] Adding documentation for all converter functions by @joshfried-aws in #486
- [Docs] Providing an example for the validate command by @joshfried-aws in #487
- [Misc]: updating all references of 3.1.0-beta to 3.1.0 by @joshfried-aws in #488
New Contributors
- @dannyvassallo made their first contribution in #448
- @sejimhp made their first contribution in #453
Full Changelog: 3.0.3...3.1.0
Table of Contents
- New Validate reporters
- New Test Flag to Specify an Output
- Cfn-Guard as a Library
- Stabilized Converter Functions
New Validate Reporters
- JUnit - users can now use the
-o
or--output-format
flag to request a JUnit report-o junit
- Sarif - users can now use the
-o
or--output-format
flag to request a Sarif report-o sarif
NOTE: If either junit, or sarif output-format is set, this requires the user to also pass --structured
, and -S none
otherwise cfn-guard will return an error
New Test Flag to Specify an Output
- The output format flag has been added to the test command. This means users can now take advantage of 4 different reporting mechanisms; single-line-summary, json, yaml, or junit
Cfn-Guard as a Library
- Users can now leverage cfn-guard as a library. We now have added builders for users to construct commands, and call them as needed. This will allow users to more easily build solutions with cfn-guard for specific needs
Stabilized Converter Functions
NOTE: This feature was previously introduced in version 3.0.1, it is now stabilized as of version 3.1.0
To improve the user experience for validating templates when schemas use types that might be easier evaluated as a different type (i.e. a string thats actually a number) the 3.0.1 release adds support to convert between specific types.
The conversions allowed are the following
strings/floats-> ints
strings/ints -> floats
strings -> bools
bools/floats/ints -> strings
The following is an example of parsing a string into an int.
Given the following template:
Resources:
asg:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
MinSize: "1"
We can write the following rule
let asg = Resources.*[ Type == 'AWS::AutoScaling::AutoScalingGroup' ]
rule test_parse_int when %asg !empty {
let min = parse_int(%asg.Properties.MinSize)
%min == 1
}