-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dfa8089
Showing
257 changed files
with
39,966 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
tests: | ||
skips: | ||
- B404 # Ignore warnings about importing subprocess | ||
- B603 # Ignore warnings about calling subprocess.Popen without shell=True | ||
- B607 # Ignore warnings about calling subprocess.Popen without a full path to executable | ||
|
||
### (optional) plugin settings - some test plugins require configuration data | ||
### that may be given here, per-plugin. All bandit test plugins have a built in | ||
### set of sensible defaults and these will be used if no configuration is | ||
### provided. It is not necessary to provide settings for every (or any) plugin | ||
### if the defaults are acceptable. | ||
|
||
any_other_function_with_shell_equals_true: | ||
no_shell: [os.execl, os.execle, os.execlp, os.execlpe, os.execv, os.execve, os.execvp, | ||
os.execvpe, os.spawnl, os.spawnle, os.spawnlp, os.spawnlpe, os.spawnv, os.spawnve, | ||
os.spawnvp, os.spawnvpe, os.startfile] | ||
shell: [os.system, os.popen, os.popen2, os.popen3, os.popen4, popen2.popen2, popen2.popen3, | ||
popen2.popen4, popen2.Popen3, popen2.Popen4, commands.getoutput, commands.getstatusoutput] | ||
subprocess: [subprocess.Popen, subprocess.call, subprocess.check_call, subprocess.check_output, | ||
utils.execute, utils.execute_with_timeout] | ||
execute_with_run_as_root_equals_true: | ||
function_names: [ceilometer.utils.execute, cinder.utils.execute, neutron.agent.linux.utils.execute, | ||
nova.utils.execute, nova.utils.trycmd] | ||
hardcoded_tmp_directory: | ||
tmp_dirs: [/tmp, /var/tmp, /dev/shm] | ||
linux_commands_wildcard_injection: | ||
no_shell: [os.execl, os.execle, os.execlp, os.execlpe, os.execv, os.execve, os.execvp, | ||
os.execvpe, os.spawnl, os.spawnle, os.spawnlp, os.spawnlpe, os.spawnv, os.spawnve, | ||
os.spawnvp, os.spawnvpe, os.startfile] | ||
shell: [os.system, os.popen, os.popen2, os.popen3, os.popen4, popen2.popen2, popen2.popen3, | ||
popen2.popen4, popen2.Popen3, popen2.Popen4, commands.getoutput, commands.getstatusoutput] | ||
subprocess: [subprocess.Popen, subprocess.call, subprocess.check_call, subprocess.check_output, | ||
utils.execute, utils.execute_with_timeout] | ||
password_config_option_not_marked_secret: | ||
function_names: [oslo.config.cfg.StrOpt, oslo_config.cfg.StrOpt] | ||
ssl_with_bad_defaults: | ||
bad_protocol_versions: [PROTOCOL_SSLv2, SSLv2_METHOD, SSLv23_METHOD, PROTOCOL_SSLv3, | ||
PROTOCOL_TLSv1, SSLv3_METHOD, TLSv1_METHOD] | ||
ssl_with_bad_version: | ||
bad_protocol_versions: [PROTOCOL_SSLv2, SSLv2_METHOD, SSLv23_METHOD, PROTOCOL_SSLv3, | ||
PROTOCOL_TLSv1, SSLv3_METHOD, TLSv1_METHOD] | ||
start_process_with_a_shell: | ||
no_shell: [os.execl, os.execle, os.execlp, os.execlpe, os.execv, os.execve, os.execvp, | ||
os.execvpe, os.spawnl, os.spawnle, os.spawnlp, os.spawnlpe, os.spawnv, os.spawnve, | ||
os.spawnvp, os.spawnvpe, os.startfile] | ||
shell: [os.system, os.popen, os.popen2, os.popen3, os.popen4, popen2.popen2, popen2.popen3, | ||
popen2.popen4, popen2.Popen3, popen2.Popen4, commands.getoutput, commands.getstatusoutput] | ||
subprocess: [subprocess.Popen, subprocess.call, subprocess.check_call, subprocess.check_output, | ||
utils.execute, utils.execute_with_timeout] | ||
start_process_with_no_shell: | ||
no_shell: [os.execl, os.execle, os.execlp, os.execlpe, os.execv, os.execve, os.execvp, | ||
os.execvpe, os.spawnl, os.spawnle, os.spawnlp, os.spawnlpe, os.spawnv, os.spawnve, | ||
os.spawnvp, os.spawnvpe, os.startfile] | ||
shell: [os.system, os.popen, os.popen2, os.popen3, os.popen4, popen2.popen2, popen2.popen3, | ||
popen2.popen4, popen2.Popen3, popen2.Popen4, commands.getoutput, commands.getstatusoutput] | ||
subprocess: [subprocess.Popen, subprocess.call, subprocess.check_call, subprocess.check_output, | ||
utils.execute, utils.execute_with_timeout] | ||
start_process_with_partial_path: | ||
no_shell: [os.execl, os.execle, os.execlp, os.execlpe, os.execv, os.execve, os.execvp, | ||
os.execvpe, os.spawnl, os.spawnle, os.spawnlp, os.spawnlpe, os.spawnv, os.spawnve, | ||
os.spawnvp, os.spawnvpe, os.startfile] | ||
shell: [os.system, os.popen, os.popen2, os.popen3, os.popen4, popen2.popen2, popen2.popen3, | ||
popen2.popen4, popen2.Popen3, popen2.Popen4, commands.getoutput, commands.getstatusoutput] | ||
subprocess: [subprocess.Popen, subprocess.call, subprocess.check_call, subprocess.check_output, | ||
utils.execute, utils.execute_with_timeout] | ||
subprocess_popen_with_shell_equals_true: | ||
no_shell: [os.execl, os.execle, os.execlp, os.execlpe, os.execv, os.execve, os.execvp, | ||
os.execvpe, os.spawnl, os.spawnle, os.spawnlp, os.spawnlpe, os.spawnv, os.spawnve, | ||
os.spawnvp, os.spawnvpe, os.startfile] | ||
shell: [os.system, os.popen, os.popen2, os.popen3, os.popen4, popen2.popen2, popen2.popen3, | ||
popen2.popen4, popen2.Popen3, popen2.Popen4, commands.getoutput, commands.getstatusoutput] | ||
subprocess: [subprocess.Popen, subprocess.call, subprocess.check_call, subprocess.check_output, | ||
utils.execute, utils.execute_with_timeout] | ||
subprocess_without_shell_equals_true: | ||
no_shell: [os.execl, os.execle, os.execlp, os.execlpe, os.execv, os.execve, os.execvp, | ||
os.execvpe, os.spawnl, os.spawnle, os.spawnlp, os.spawnlpe, os.spawnv, os.spawnve, | ||
os.spawnvp, os.spawnvpe, os.startfile] | ||
shell: [os.system, os.popen, os.popen2, os.popen3, os.popen4, popen2.popen2, popen2.popen3, | ||
popen2.popen4, popen2.Popen3, popen2.Popen4, commands.getoutput, commands.getstatusoutput] | ||
subprocess: [subprocess.Popen, subprocess.call, subprocess.check_call, subprocess.check_output, | ||
utils.execute, utils.execute_with_timeout] | ||
try_except_continue: {check_typed_exception: false} | ||
try_except_pass: {check_typed_exception: false} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
# Python CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-python/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build-python3.6: | ||
docker: | ||
# specify the version you desire here | ||
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` | ||
- image: circleci/python:3.6.4 | ||
|
||
# Specify service dependencies here if necessary | ||
# CircleCI maintains a library of pre-built images | ||
# documented at https://circleci.com/docs/2.0/circleci-images/ | ||
# - image: circleci/postgres:9.4 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "requirements-test.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Setup Code Climate test-reporter | ||
command: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
- run: | ||
name: install dependencies | ||
command: | | ||
sudo python -m pip install -r requirements-test.txt | ||
# run tests! | ||
# this example uses Django's built-in test-runner | ||
# other common Python testing frameworks include pytest and nose | ||
# https://pytest.org | ||
# https://nose.readthedocs.io | ||
- run: | ||
name: run tests | ||
command: | | ||
./cc-test-reporter before-build | ||
tox -e py36 | ||
./cc-test-reporter after-build --exit-code $? | ||
# - deploy: | ||
# name: Push coverage | ||
# command: | | ||
# if [ "${CIRCLE_BRANCH}" == "master" ]; then | ||
# tox -e upload_coverage | ||
# fi | ||
|
||
build-python2.7: | ||
docker: | ||
- image: circleci/python:2.7.13 | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "requirements-test.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: install dependencies | ||
command: | | ||
sudo python -m pip install --upgrade -r requirements-test.txt | ||
- run: | ||
name: run tests | ||
command: | | ||
tox -e py27 | ||
build-python3.4: | ||
docker: | ||
- image: circleci/python:3.4.8 | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "requirements-test.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: install dependencies | ||
command: | | ||
sudo python -m pip install --upgrade -r requirements-test.txt | ||
- run: | ||
name: run tests | ||
command: | | ||
tox -e py34 | ||
build-python3.5: | ||
docker: | ||
- image: circleci/python:3.5.5 | ||
working_directory: ~/repo | ||
steps: | ||
- checkout | ||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "requirements-test.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: install dependencies | ||
command: | | ||
sudo python -m pip install --upgrade -r requirements-test.txt | ||
- run: | ||
name: run tests | ||
command: | | ||
tox -e py35 | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- build-python3.6 | ||
- build-python2.7: | ||
requires: | ||
- build-python3.6 | ||
- build-python3.4: | ||
requires: | ||
- build-python2.7 | ||
- build-python3.5: | ||
requires: | ||
- build-python3.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[run] | ||
branch = True | ||
source = | ||
dpaycli/ | ||
dpayclibase/ | ||
dpaycliapi/ | ||
dpaycligraphenebase/ | ||
omit = | ||
*/.eggs/* | ||
*/.tox/* | ||
|
||
[report] | ||
omit = | ||
*/.eggs/* | ||
*/.tox/* | ||
|
||
[paths] | ||
source = | ||
.tox/*/lib/python*/site-packages/dpaycli | ||
.tox/pypy/site-packages/dpaycli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[flake8] | ||
ignore = | ||
# indentation is not a multiple of four, | ||
E111,E114, | ||
# visually indented line with same indent as next logical line, | ||
E129,E501,F401,E722, E122 | ||
exclude = | ||
.git, | ||
.eggs, | ||
__pycache__, | ||
docs/conf.py, | ||
old, | ||
build, | ||
dist | ||
max-line-length=80 | ||
max-complexity = 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
.idea/ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
.coverage | ||
coverage.xml | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
.pytest_cache/ | ||
*.egg | ||
*.eggs | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/html | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Configuration Files | ||
*config.py | ||
|
||
# Vim temp files | ||
*.swp | ||
.ropeproject/ | ||
*/.ropeproject/ |
Oops, something went wrong.