Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
fix: (semgrep) use yaml::safe_load instead of yaml::load
Browse files Browse the repository at this point in the history
  • Loading branch information
lstoppa committed Jul 16, 2021
1 parent 32b315f commit 71b32b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion splunk_connect_for_snmp_mib_server/snmp_mib_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():
logger.info("Completed Argument parsing")

with open(config_file, "r") as yamlfile:
server_config = yaml.load(yamlfile, Loader=yaml.FullLoader)
server_config = yaml.safe_load(yamlfile, Loader=yaml.FullLoader)

upload_mibs(server_config)
mib_server = MibServer(args, server_config)
Expand Down

1 comment on commit 71b32b4

@lingy1028
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be server_config = yaml.safe_load(yamlfile)?
I got "TypeError: safe_load() got an unexpected keyword argument 'Loader'" for server_config = yaml.load(yamlfile, Loader=yaml.FullLoader)

Please sign in to comment.