From 78b393e38d5355b6cca27311698ad2c078df5624 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 3 Oct 2025 00:59:44 +0900 Subject: [PATCH] Remove unused bandit target This has been unused since bandit was moved to PyCQA organization. Also maintain bandit options in pyproject.toml so that these can be used by different tools more easily. Change-Id: I7d16d6e58666a943677a18fcc19f66c7bb7a2c8c Signed-off-by: Takashi Kajinami --- .pre-commit-config.yaml | 2 +- pyproject.toml | 3 +++ tox.ini | 8 -------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index acb4179b8d..221e200868 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: rev: '1.8.3' hooks: - id: bandit - args: ["-x", "keystone/tests/*,devstack/*"] + args: ['-c', 'pyproject.toml'] - repo: https://opendev.org/openstack/hacking rev: 7.0.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 43c46b2379..4d27974c00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -180,3 +180,6 @@ packages = [ "etc/keystone" = [ "etc/sso_callback_template.html", ] + +[tool.bandit] +exclude_dirs = ['keystone/tests/*', 'devstack/*'] diff --git a/tox.ini b/tox.ini index 428aed29d4..e593f047e0 100644 --- a/tox.ini +++ b/tox.ini @@ -35,14 +35,6 @@ commands = passenv = FAST8_NUM_COMMITS allowlist_externals = {toxinidir}/tools/fast8.sh -[testenv:bandit] -# NOTE(browne): This is required for the integration test job of the bandit -# project. Please do not remove. -deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/requirements.txt -commands = bandit -r keystone -x 'keystone/tests/*' - [testenv:cover] # Also do not run test_coverage_ext tests while gathering coverage as those # tests conflict with coverage.