From 31afce9b2c7504814da9f5564d363d0378859bdc Mon Sep 17 00:00:00 2001 From: dfitchett <135860892+dfitchett@users.noreply.github.com> Date: Fri, 20 Dec 2024 08:57:57 -0800 Subject: [PATCH] Add bandit to CI --- .github/workflows/test-code.yml | 9 ++++++--- pyproject.toml | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 10b7f21..716057a 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -9,7 +9,8 @@ on: workflow_dispatch: jobs: - test-python: + perform-checks: + name: "Test, Lint & Coverage" runs-on: ubuntu-latest steps: @@ -44,5 +45,7 @@ jobs: uses: paambaati/codeclimate-action@v9.0.0 env: CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} - with: - debug: true + + - name: "Bandit Code Scan" + if: always() + run: poetry run bandit -c pyproject.toml -r -l . diff --git a/pyproject.toml b/pyproject.toml index 439aba7..7d680ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ indent-style = "space" skip-magic-trailing-comma = false [tool.mypy] -python_version = "3.12.3" +python_version = "3.12" plugins = ['pydantic.mypy'] strict = true ignore_missing_imports = true @@ -78,7 +78,6 @@ bandit = {version = "1.8.*", extras = ["toml"]} [tool.bandit] exclude_dirs = ["tests"] -skips = ["B101"] # https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html [build-system] requires = ["poetry-core"]