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

Blacklist pandas read_pickle and add functional test for it #710

Merged
merged 6 commits into from Jul 8, 2022

Conversation

jaspersival
Copy link
Contributor

The pandas read pickle method uses pickle.load under the hood. When read_pickle is used, bandit will however not find this vulnerability during the scan. This PR solves this by adding the pandas read_pickle method to the blacklist.

@jaspersival jaspersival marked this pull request as ready for review May 11, 2021 10:06
@jaspersival
Copy link
Contributor Author

One thing to note, I cannot get Tox to work locally for this repo, so I hope that running it here in the pipeline gives feedback whether it actually works as expected.

@@ -9,3 +9,4 @@ testscenarios>=0.5.0 # Apache-2.0/BSD
testtools>=2.3.0 # MIT
beautifulsoup4>=4.8.0 # MIT
pylint==1.9.4 # GPLv2
pandas==1.2.4
Copy link
Member

Choose a reason for hiding this comment

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

This isn't necessary as the python example is not actually compiled or run. We only run the AST parser on it to detect security issues.

test-requirements.txt Outdated Show resolved Hide resolved
Copy link
Member

@ericwb ericwb left a comment

Choose a reason for hiding this comment

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

LGTM

@ericwb ericwb removed the request for review from ghugo July 8, 2022 04:14
@ericwb ericwb merged commit 128b236 into PyCQA:main Jul 8, 2022
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