Skip to content

Commit

Permalink
Merge pull request #788 from OpenIDC/fix-bandit
Browse files Browse the repository at this point in the history
Re-enable bandit
  • Loading branch information
tpazderka authored Jul 1, 2021
2 parents 2e4493a + b64bf52 commit a5e8986
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions oauth_example/as/as.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def application(self, environ, start_response):

if __name__ == "__main__":
import argparse
import shelve
import shelve # nosec
import importlib

from cherrypy import wsgiserver
Expand All @@ -213,7 +213,7 @@ def application(self, environ, start_response):
args = parser.parse_args()

# Client data base
cdb = shelve.open("client_db", writeback=True)
cdb = shelve.open("client_db", writeback=True) # nosec

# Load the configuration file, which must be a python file
# The default; first look for it in the directory from where this program
Expand Down
4 changes: 2 additions & 2 deletions oidc_example/op1/oc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def new_trace_log(self, key):

if __name__ == '__main__':
import argparse
import shelve
import shelve # nosec
import importlib

from cherrypy import wsgiserver
Expand All @@ -502,7 +502,7 @@ def new_trace_log(self, key):
args = parser.parse_args()

# Client data base
cdb = shelve.open("client_db", writeback=True)
cdb = shelve.open("client_db", writeback=True) # nosec

sys.path.insert(0, ".")
config = importlib.import_module(args.config)
Expand Down
4 changes: 2 additions & 2 deletions src/oic/utils/client_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import copy
import json
import os
import shelve
import shelve # nosec
import sys
from builtins import input
from typing import Any
Expand Down Expand Up @@ -49,7 +49,7 @@ class CDB(BaseClientDatabase):
"""Implementation of ClientDatabase with shelve."""

def __init__(self, filename):
self.cdb = shelve.open(filename, writeback=True)
self.cdb = shelve.open(filename, writeback=True) # nosec
self.seed = rndstr(32).encode("utf-8")

def __getitem__(self, item):
Expand Down
4 changes: 2 additions & 2 deletions src/oic/utils/shelve_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import shelve
import shelve # nosec

__author__ = "danielevertsson"

Expand Down Expand Up @@ -39,7 +39,7 @@ def __delitem__(self, key):
db.__delitem__(key)

def _reopen_database(self):
return shelve.open(self.filename, writeback=True)
return shelve.open(self.filename, writeback=True) # nosec


def open(filename):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ commands =
mypy --config-file mypy.ini src/ tests/
black src/ tests/ --check -t py36
python3 setup.py --quiet sdist
# bandit -a file -r src/ oauth_example/ oidc_example/
bandit -a file -r src/ oauth_example/ oidc_example/
twine check dist/*

[pep8]
Expand Down

0 comments on commit a5e8986

Please sign in to comment.