Skip to content

Commit

Permalink
Add bandit to CircleCI (#164)
Browse files Browse the repository at this point in the history
* Add bandit to CircleCI

* Fix security hole

Co-authored-by: fr.branchaud-charron <fr.branchaud-charron@servicenow.com>
  • Loading branch information
Frédéric Branchaud-Charron and fr.branchaud-charron authored Nov 24, 2021
1 parent a4db2cb commit 9f19313
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- run:
name: run tests
command: |
make test
make test bandit
test-import:
docker:
# specify the version you desire here
Expand Down
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@ check-mypy-error-count:
@if [ ${MYPY_INFO} -gt ${MYPY_ERROR_COUNT} ]; then \
echo mypy error count $(MYPY_INFO) is more than $(MYPY_ERROR_COUNT); \
false; \
fi
fi

SRC_FOLDER ?= ./baal
REPORT_FOLDER ?= ./reports

./reports/security/bandit/:
@mkdir -p ./reports/security/bandit/

bandit: ./reports/security/bandit/ ## SECURITY - Run bandit
poetry run bandit ${SRC_FOLDER}/* -r -x "*.pyi,*/_generated/*,*__pycache__*" -v -ll -f json > ${REPORT_FOLDER}/security/bandit/index.json

.PHONY: bandit
Loading

0 comments on commit 9f19313

Please sign in to comment.