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

test insecure code #401

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

test insecure code #401

wants to merge 4 commits into from

Conversation

rparini
Copy link
Owner

@rparini rparini commented Sep 25, 2024

See how SAST does

See how SAST does
@@ -90,6 +90,8 @@
.. [KB] "Computing the zeros of analytic functions" by Peter Kravanja,
Marc Van Barel, Springer 2000
"""
eval(f"foo={phi}")

Check warning

Code scanning / Bandit

Use of possibly insecure function - consider using safer ast.literal_eval. Warning

Use of possibly insecure function - consider using safer ast.literal_eval.
@@ -59,6 +59,9 @@

def contains(self, z: complex) -> bool:
"""Returns True if the point z lies within the contour, False if otherwise"""
import requests
requests.get("http://api.github.com")

Check warning

Code scanning / Bandit

Requests call without timeout Warning

Requests call without timeout
@@ -189,6 +189,8 @@
# wrap f to record the number of function calls
f = CountCalls(f)

exec('foo=1')

Check warning

Code scanning / Bandit

Use of exec detected. Warning

Use of exec detected.
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.

1 participant