Skip to content

Commit

Permalink
Added bandit.yml file
Browse files Browse the repository at this point in the history
When running pytest the preffered way of doing assertions is to use the
assert statement. Assertions is by default flagged by bandit.

To be able to configure how we want bandit to run, we have added the
bandit.yml file, and added one configuration which tells bandit to skip
assert checks. For this configuration file to be considered we have
added an arg in .travis.yml "before_script" section at - bandit ...
  • Loading branch information
oysteoh committed Feb 20, 2018
1 parent 09062d5 commit 123c8b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ before_script:
- if [[ -n "${MB_PYTHON_VERSION+1}" ]]; then
enabled="$enabled -DBUILD_PYTHON=ON -DREQUIRE_PYTHON=ON";
fi
- bandit -r python
- bandit -c bandit.yml -r python
- cmake --version
- mkdir build
- pushd build
Expand Down
1 change: 1 addition & 0 deletions bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skips: ['B101']

0 comments on commit 123c8b8

Please sign in to comment.