
Starting in bandit 1.5.0, sha-1 will trip [B303:blacklist] Use of insecure MD2, MD4, MD5, or SHA1 hash function. However, there are surely clusters out there that have users with sha-1-hashed passwords, so we can't simply rip it out. A deprecation period is probably in order, but in the mean time this unblocks the gate. Change-Id: I65ff882b1a1cb52ec522e41baa29e4420cd889bd
56 lines
1.5 KiB
INI
56 lines
1.5 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py27,pep8,cover
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python2.7
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
NOSE_COVER_ERASE=1
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
https://tarballs.openstack.org/swift/swift-2.15.1.tar.gz
|
|
commands = nosetests {posargs:test/unit}
|
|
|
|
[testenv:cover]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_COVERAGE=1
|
|
NOSE_COVER_BRANCHES=1
|
|
NOSE_COVER_HTML=1
|
|
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
|
NOSE_COVER_MIN_PERCENTAGE=89
|
|
NOSE_COVER_ERASE=1
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 swauth test
|
|
flake8 --filename=swauth* bin
|
|
bandit -r swauth -s B303,B309
|
|
|
|
[testenv:bandit]
|
|
# B303 Use of insecure hash function
|
|
# B309 Use of HTTPSConnection
|
|
commands = bandit -r swauth -s B303,B309
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[flake8]
|
|
# E123 skipped as they are invalid PEP-8.
|
|
# will be removed later
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
# E128 continuation line under-indented for visual indent
|
|
# E121 continuation line under-indented for hanging indent
|
|
|
|
show-source = True
|
|
ignore = E123,H405,E128,E121
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*egg,build
|