78fe97b9cb
Bandit is a python package for staticly scanning code for security issues. * Added to tox.ini * Added to setup.py * Added to .travis.yml As part of CI/CD pipeline
57 lines
1.0 KiB
INI
57 lines
1.0 KiB
INI
[tox]
|
|
envlist = py36, py37, {py36,py37}-no-ext, lint, check, security
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
setenv =
|
|
{py36,py37}-no-ext: SANIC_NO_UJSON=1
|
|
{py36,py37}-no-ext: SANIC_NO_UVLOOP=1
|
|
deps =
|
|
coverage
|
|
pytest==4.1.0
|
|
pytest-cov
|
|
pytest-sanic
|
|
pytest-sugar
|
|
httpcore==0.3.0
|
|
requests-async==0.5.0
|
|
chardet<=2.3.0
|
|
beautifulsoup4
|
|
gunicorn
|
|
pytest-benchmark
|
|
uvicorn
|
|
websockets>=6.0,<7.0
|
|
commands =
|
|
pytest {posargs:tests --cov sanic}
|
|
- coverage combine --append
|
|
coverage report -m
|
|
coverage html -i
|
|
|
|
[testenv:lint]
|
|
deps =
|
|
flake8
|
|
black
|
|
isort
|
|
bandit
|
|
|
|
commands =
|
|
flake8 sanic
|
|
black --config ./.black.toml --check --verbose sanic/
|
|
isort --check-only --recursive sanic
|
|
|
|
[testenv:check]
|
|
deps =
|
|
docutils
|
|
pygments
|
|
commands =
|
|
python setup.py check -r -s
|
|
|
|
[pytest]
|
|
filterwarnings =
|
|
ignore:.*async with lock.* instead:DeprecationWarning
|
|
|
|
[testenv:security]
|
|
deps =
|
|
bandit
|
|
|
|
commands =
|
|
bandit --recursive sanic --skip B404,B101 --exclude sanic/reloader_helpers.py |