You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ruff 0.0.276, running ruff check --select S307 scratch.py where scratch.py is
importosprint(eval("1+1"))
print(eval("os.getcwd()"))
print(eval("os.chmod('%s', 0777)"%'test.txt'))
# A user-defined method named "eval" should not get flagged.classTest(object):
defeval(self):
print("hi")
deffoo(self):
self.eval()
Test().eval()
flags zero violations. The above Python code is from the Bandit source.
Running bandit flags three violations (as expected).
The text was updated successfully, but these errors were encountered:
Using ruff
0.0.276
, runningruff check --select S307 scratch.py
wherescratch.py
isflags zero violations. The above Python code is from the Bandit source.
Running bandit flags three violations (as expected).
The text was updated successfully, but these errors were encountered: