Skip to content

Commit 2c31d6f

Browse files
Integrate bandit as pipeline security stage job. #30
Skip assert rule in tests project. Skip .venv/ dir.
1 parent 78ac00e commit 2c31d6f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.gitlab/security.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ Trivy:
2727
- trivy filesystem --exit-code 1 --skip-dirs /builds/gitlab-org-forks/ --cache-dir .trivycache/ /
2828
tags:
2929
- gitlab-org
30+
31+
Bandit:
32+
stage: security
33+
rules:
34+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"'
35+
script:
36+
- pip3 install bandit
37+
- bandit -x $(pwd)/.venv/ -r $(pwd) -s B101
38+
tags:
39+
- gitlab-org

0 commit comments

Comments
 (0)