Fixed bandit memes

This commit is contained in:
Pünkösd Marcell 2020-11-29 04:44:30 +01:00
parent 42fe293a17
commit 1e491ba8d3
5 changed files with 11 additions and 4 deletions

View File

@ -20,7 +20,7 @@ before_script:
- find . -name "*.py" -exec python3 -m py_compile '{}' \;
- find . -name "*.py" -exec pylint '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
- find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi
- bandit -r .
- bandit -r --ini bandit.ini
script:
- docker build -t="registry.kmlabz.com/unstablevortex/webshop:$TRAVIS_BUILD_NUMBER" . && docker push "registry.kmlabz.com/unstablevortex/webshop:$TRAVIS_BUILD_NUMBER"

4
bandit.ini Normal file
View File

@ -0,0 +1,4 @@
[bandit]
exclude = src/tests/
recursive = true
targets = src/

View File

@ -1 +1,2 @@
pytest
pytest
bandit

View File

@ -15,4 +15,6 @@ def test_login_required(client):
r = client.get('/content/caff/1')
assert r.status_code == 302
assert r.status_code == 302
# TODO Test eache endpoint with an anonymus, registered and admin user

View File

@ -46,6 +46,6 @@ class Config:
# Some constant configured stuff configs
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECURITY_REGISTERABLE = True
SECURITY_PASSWORD_HASH = "bcrypt"
SECURITY_PASSWORD_HASH = "bcrypt" # nosec - THIS IS NOT A PASSWORD YOU STUPID
MINIO_PREVIEW_BUCKET_NAME = "previews"
MINIO_CAFF_BUCKET_NAME = "caff"