Add software plan blocks#30
Merged
Merged
Conversation
The FullLoader was added in a new version of YAML, and thus breaks installs with older versions. We likely only need the safe subset of YAML anyway, so for now, just switch to the SafeLoader.
orwonthe
reviewed
May 22, 2019
| with open(data_filename, 'r') as data_file: | ||
| data_string = data_file.read() | ||
| try: | ||
| data = yaml.load(data_string, Loader=yaml.FullLoader) |
Contributor
There was a problem hiding this comment.
This change eliminates the ability to have the yaml contain any custom objects we have imported. Is this necessary? From yaml/pyyaml#257 ...
We added a new loader class called FullLoader, and we made it the default for
load(). This class is almost as complete for serialization as
UnsafeLoader/Loader, but it avoids arbitrary code execution. We don't expect it
will break any code in the wild.
We still recommend that people choose SafeLoader for untrusted data, but
aribitrary code execution will no longer be possible using yaml.load() with
the default loader (FullLoader). FullLoader will instantiate objects of classes
that you have imported. Since object instantiation runs the class's constructor
code, that may be exploitable.
orwonthe
approved these changes
May 22, 2019
Contributor
orwonthe
left a comment
There was a problem hiding this comment.
Looks good but see comment on SafeLoader vs FullLoader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.