Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bandit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Centralized Bandit configuration used by lintrunner.
skips:
- B101
31 changes: 31 additions & 0 deletions .lintrunner.toml
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,37 @@ init_command = [
'--requirement=requirements-lintrunner.txt',
]

[[linter]]
code = 'BANDIT'
include_patterns = [
'backends/arm/**/*.py',
'examples/arm/**/*.py',
]
exclude_patterns = [
'third-party/**',
'**/third-party/**',
]
command = [
'python',
'-m',
'lintrunner_adapters',
'run',
'bandit_linter',
'--configfile',
'.bandit.yaml',
'--',
'@{{PATHSFILE}}',
]
init_command = [
'python',
'-m',
'lintrunner_adapters',
'run',
'pip_init',
'--dry-run={{DRYRUN}}',
'--requirement=requirements-lintrunner.txt',
]

[[linter]]
code = 'LICENSELINT'
include_patterns = [
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ wheel # For building the pip package archive.
zstd # Imported by resolve_buck.py.
certifi # Imported by resolve_buck.py.
lintrunner==0.12.7
lintrunner-adapters==0.12.6
lintrunner-adapters==0.13.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change is notable but should be okay as long as lintrunner passes

Copy link
Collaborator Author

@perheld perheld Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it needs to be bumped to have support for bandit. I created the PR with support and got it merged so they where kind enough to make a new release. :)
justinchuby/lintrunner-adapters#132

1 change: 1 addition & 0 deletions requirements-lintrunner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ usort==1.0.8.post1
clang-format==18.1.3
cmakelang==0.6.13
cmakelint==1.4.1
bandit==1.9.2

# MyPy
mypy==1.14.1
Loading