gitlab-ci: move bandit to its own job

This commit is contained in:
Hans-Christoph Steiner 2025-03-12 18:37:42 +01:00
parent 3e67bee037
commit 6ad79e3c06

View file

@ -221,7 +221,7 @@ gradlew-fdroid:
# Run all the various linters and static analysis tools. # Run all the various linters and static analysis tools.
lint_format_bandit_checks: hooks/pre-commit:
image: debian:bookworm-slim image: debian:bookworm-slim
variables: variables:
LANG: C.UTF-8 LANG: C.UTF-8
@ -241,17 +241,16 @@ lint_format_bandit_checks:
python3-nose python3-nose
python3-pip python3-pip
python3-yaml python3-yaml
- $pip install --break-system-packages bandit - ./hooks/pre-commit
- export EXITVALUE=0
- function set_error() { export EXITVALUE=1; printf "\x1b[31mERROR `history|tail -2|head -1|cut -b 6-500`\x1b[0m\n"; }
- ./hooks/pre-commit || set_error
- bandit
-r
-ii
--ini .bandit
|| set_error
- exit $EXITVALUE
bandit:
image: debian:bookworm-slim
<<: *python-rules-changes
<<: *apt-template
script:
- apt-get install python3-pip
- $pip install --break-system-packages bandit
- bandit -r -ii --ini .bandit
pylint: pylint:
image: debian:bookworm-slim image: debian:bookworm-slim