You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CFN Guard validate does not work correctly when entire rule file is comments #376
Describe the bug
When running cfn-guard validate, an error "Parsing error handling rule file" is shown when you run the validate command using a rule file that only contains comments.
To Reproduce
Command: /.guard/bin/cfn-guard validate --rules test.guard --data ./cfn
Output: Parsing error handling rule file = test.guard, Error = Parser Error when parsing Parsing Error Error parsing file test.guard at line 1 at column 1, when handling , fragment # hello
NOTE: Please be sure that the templates, rules and logs you provide as part of your bug report do not contain any sensitive information.
Expected behavior
The expected behaviour is no error. Should return nothing.
Hi @azhao98 thanks again for bringing this to our attention, as part of #402 we added functionality to not error out when a file contains only comments, or when a file is empty.
This functionality will be available to anyone building from source, using our nightly ECR release channel or by waiting for our next stable release.
I am going to go ahead and close out this issue for now, feel free to reopen if need be.
Activity
joshfried-aws commentedon Jun 27, 2023
Hi @azhao98 thank you for posting this. We will look into this bug and continue to update this ticket in the future.
Thanks,
joshfried-aws commentedon Aug 29, 2023
Hi @azhao98 thanks again for bringing this to our attention, as part of #402 we added functionality to not error out when a file contains only comments, or when a file is empty.
This functionality will be available to anyone building from source, using our nightly ECR release channel or by waiting for our next stable release.
I am going to go ahead and close out this issue for now, feel free to reopen if need be.