Repository navigation
chore: cover flake8-bandit checks with ruff's S rules - #296
Merged
Merged
Conversation
This was referenced Nov 20, 2026
Replaces the bandit-based approach of DIRACGrid#295 (closed): the repos already linting with ruff get bandit's checks from ruff's S (flake8-bandit) ruleset instead, like diracx, intercede and signurlarity. - add S to the ruff select, with documented ignores mirroring the bandit skips: the pilot bootstraps itself on worker nodes, so downloading over URLs and starting processes is its core function by design; S110 (try-except-pass) is skipped as best-effort cleanup must never abort the pilot - S311 is allowed in tests only (pseudo-random test data) - migrate lint settings to [tool.ruff.lint] (the old top-level layout is deprecated) and ignore B905 (zip strict= needs Python 3.10) - make ruff check clean: sort imports and drop an unused import in tests, noqa the retStatus placeholder kept for its TODO
fstagni
force-pushed
the
ruff-bandit-rules
branch
from
November 20, 2026 13:18
26ad01a to
3747cc8
Compare
aldbr
approved these changes
Nov 23, 2026
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of DIRACGrid/.github#5. Replaces #295 (closed).
The repos already linting with ruff get bandit's checks from ruff's
S(flake8-bandit) ruleset instead of running bandit separately, like diracx, intercede and signurlarity.Sto the ruffselect, with documented ignores mirroring the bandit skips of chore: add bandit (static security analysis) to pre-commit #295: the pilot bootstraps itself on worker nodes, so downloading files over URLs (S310) and starting processes (S602/S603/S605/S607) is its core function by design;S101(assert) andS110(try-except-pass, best-effort cleanup must never abort the pilot) are skipped tooS311(pseudo-random) is allowed in tests only, viaper-file-ignores[tool.ruff]layout to[tool.ruff.lint](as in diracx/intercede), and ignoreB905(zip(strict=)needs Python 3.10, Pilot still supports 3.9)ruff checkclean: fix import sorting and drop an unused import in tests,noqatheretStatusplaceholder kept for its TODOClean run:
ruff check Pilot/ tests/→ All checks passed.pylint -E Pilot/unaffected.