False positive: MongoDB no sql injection
- Lingua principale
- CodeQL
- Stelle
- 10.1k
- Fork
- 2.1k
- Merge medio
- 2g 15h
- PR unite (30g)
- 141
Descrizione
CodeQL (go/sql-injection) flags it when user input flows into any MongoDB query methods, which is great. However, there doesn't seem to be a way to fix the alert at all. There's no specific recommendations for MongoDB.
I spent some time digging into how CodeQL does the detections and I tried to figure out if there's any barrier I could use to fix the alert, but no luck.
Encapsulating user input in `bson` and input sanitisation also do not help.
Note that we use GHAS, which uses CodeQL default suites. As far as I understand, there is no easy way to just override the rule and we don't want to manually close them.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la query go/sql-injection e la relativa modellazione dei metodi di query MongoDB; riproduci il flusso segnalato usando input dell’utente, wrapping di bson e sanitizzazione. Il lavoro è completato quando il caso MongoDB valido non viene più segnalato oppure quando il problema dispone di un percorso di remediation CodeQL/GHAS documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- go, mongodb
- Ambito
- databases, security
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100