Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle CFN template values being represented as symbols #100

Merged
merged 1 commit into from Jun 23, 2022
Merged

Handle CFN template values being represented as symbols #100

merged 1 commit into from Jun 23, 2022

Conversation

orien
Copy link
Contributor

@orien orien commented Jun 19, 2022

Context

Psych will interpret unquoted YAML values starting with a : character as a Ruby symbol. Symbol isn't listed as a permitted class when loading CloudFormation templates, so an error is raised.

This is an issue since YAML safe loading was introduced #98.

Change

Avoid raising an error in this scenario, add Symbol to the list of permitted classes when loading CloudFormation YAML templates.

Psych will interpret unquoted YAML values starting with a ':' character
as a Ruby symbol.

Avoid raising an error in this scenario, add Symbol to the list of
permitted classes when loading CloudFormation YAML templates.
@orien
Copy link
Contributor Author

orien commented Jun 19, 2022

@arothian: This should help with stelligent/cfn_nag#599

@arothian
Copy link
Contributor

Thanks @orien

@arothian arothian merged commit 0232e66 into stelligent:master Jun 23, 2022
@orien orien deleted the yaml-parsing-fix branch June 23, 2022 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants