-
Notifications
You must be signed in to change notification settings - Fork 160
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
Fixed: Vault warns when valid JSON contains special character sequences #416
base: main
Are you sure you want to change the base?
Fixed: Vault warns when valid JSON contains special character sequences #416
Conversation
Additional context around this issue can be found in: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good minus a few typos
spec/chef/helper_spec.rb
Outdated
end | ||
|
||
it "Not to raise error if valid data provided" do | ||
expect { validate_json(json_data) }.to_not raise_error | ||
it "should not to raise error if valid data provided" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"should not to" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
spec/chef/helper_spec.rb
Outdated
end | ||
|
||
it "not to raise error if data consist of tab/new line OR space" do | ||
it "should not to raise error if data consist of tab/new line OR space" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
6ebf263
to
e959039
Compare
e959039
to
f4ad81a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming tests pass, I'm good with this.
Hey @johnmccrae - I think this is related to powershell stuff? |
Description
Fixes an issue where Chef Vault writes a warning when a valid JSON document contains special character sequences, exposing sensitive vault data in the warning message.
Chef Vault should be agnostic to the content of the vault item JSON. It no longer inspects vault item contents, validation responsibility is left to the JSON parser to ensure the JSON data is valid.
Related Issue
Fixes #415 Chef Vault warns and leaks secrets when vault json contains properly encoded special characters · Issue #415 · chef/chef-vault
Types of changes
Checklist:
Gemfile.lock
has changed, I have used--conservative
to do it and included the full output in the Description above.