bandit version and documentation reference in pre-commit run
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- documentation, security
Direzione di ricerca
Inizia con la riproduzione in .pre-commit-config.yaml ed esegui Bandit sul codice Python che attiva B101. Traccia come viene generato l’URL “More Info” e verifica quale destinazione della documentazione esiste. Il lavoro è completato quando il link segnalato porta alla documentazione appropriata del plugin per la release installata oppure a un fallback valido.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
I use bandit via pre-commit:
- repo: https://github.com/PyCQA/bandit
rev: 1.8.5
hooks:
- id: bandit
Unfortunately, the help 'More Info: ...' is invalidly referenced (version number!), for example:
Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimized byte code.
Severity: Low Confidence: High
CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
More Info: https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html
Location: ...
...
Instead of https://bandit.readthedocs.io/en/0.0.0/plugins/b101_assert_used.html you could expect https://bandit.readthedocs.io/en/1.8.5/plugins/b101_assert_used.html here, but unfortunately this also leads to 404.
Reproduction steps
1. use bandit via pre-commit
2. and produce an issue in python code
Expected behavior
'More Info: ...' should link to the correct documentation:
- Unfortunately there is no documentation for the actual release 1.8.5.
- Unfortunately there is no documentation for release 1.8.4, too.
- Linking to the
latestdocumentation may also be an option.
Bandit version
1.8.3 (Default)
Python version
3.12
Additional context
Via .pre-commit-config.yaml I use bandit:
- repo: https://github.com/PyCQA/bandit
rev: 1.8.5
hooks:
- id: bandit
To get the installed version I run:
$ find ~/.cache/pre-commit/ -iname bandit
...
$ source ~/.cache/pre-commit/repoyk61p6e9/py_env-python3/bin/activate
$ bandit --version
bandit 0.0.0
python version = 3.12.11 (main, Jun 9 2025, 08:58:11) [GCC 14.2.0]
But it is 1.8.5:
$ (cd ~/.cache/pre-commit/repo5otl2186 && git log | grep commit)
commit 23d269a665abd84597785fdf8fdda04ea89f59f3
Unfortunately I cannot select the bandit version 1.8.5 here.
- Lingua principale
- Python
- Stelle
- 8.4k
- Fork
- 893
- Merge medio
- 6h 52m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PyCQA/bandit
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Turn off progress bar in CIForse già presa @silvatechf l’ha presa 28 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
-
`bandit -ii -ll -ii -ll` raises an `IndexError`Forse già presa @botbikamordehai2-sketch l’ha presa 181 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Tutte le issue di PyCQA/bandit
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Library sweep logs an ERROR at start for the valkey instrumentor when valkey-py is not installedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
JoahanMorales/upiixia-agentic-kit#99 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
NatLabRockies/openstudio-mcp#286 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100