Commit 8ff5777
authored
Replace yaml.load with yaml.safe_load for Enhanced Security (#150)
This pull request addresses a security vulnerability in our codebase by replacing the potentially unsafe yaml.load function with the safer yaml.safe_load. The yaml.load function, when used with untrusted input, can execute arbitrary code, leading to potential security risks. By switching to yaml.safe_load, we ensure that only a subset of the YAML language is parsed, effectively mitigating these risks.
Changes Made:
Replaced all instances of yaml.load with yaml.safe_load in the script.
Updated the relevant test cases to align with the safe_load usage.
Benefits:
Improves security by preventing arbitrary code execution.
Maintains functionality while reducing risk from untrusted YAML inputs.1 parent 829cf97 commit 8ff5777
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments