Skip to content

Commit

Permalink
ci/fix: fixed bandit issues
Browse files Browse the repository at this point in the history
Added two lines to be skipped by bandit, as they are false positives.
  • Loading branch information
phbelitz committed Dec 15, 2020
1 parent 192e575 commit 742dcd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions connaisseur/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
{
"version": 1,
"formatters": {
"default": {
"format": "[%(asctime)s] %(levelname)s: %(message)s",
}
"default": {"format": "[%(asctime)s] %(levelname)s: %(message)s"}
},
"handlers": {
"wsgi": {
Expand All @@ -27,4 +25,9 @@
}
)

APP.run(host="0.0.0.0", ssl_context=("/etc/certs/tls.crt", "/etc/certs/tls.key"))
# the host needs to be set to `0.0.0.0` so it can be reachable from outside the
# container
APP.run(
host="0.0.0.0", # nosec
ssl_context=("/etc/certs/tls.crt", "/etc/certs/tls.key"),
)
2 changes: 1 addition & 1 deletion connaisseur/notary_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def get_auth_token(url: str):
"no token in authentication server response.", {"auth_url": url}
)

token_re = r"^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$"
token_re = r"^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$" # nosec

if not re.match(token_re, token):
raise InvalidFormatException(
Expand Down

0 comments on commit 742dcd0

Please sign in to comment.