False Positive: AndroidInsecureLocalAuthentication.ql
- Lingua principale
- CodeQL
- Stelle
- 10.1k
- Fork
- 2.1k
- Merge medio
- 2g 15h
- PR unite (30g)
- 141
Descrizione
Version
codeql 2.23.9
When I detect the code like this using Security/CWE/CWE-287/AndroidInsecureLocalAuthentication.ql, the problem is reported:
```java
package scensct.core.neg;
public class NegCase3 extends android.hardware.biometrics.BiometricPrompt.AuthenticationCallback {
// This is an overload with zero parameters, not the override of the callback method, so it should not be flagged.
public void onAuthenticationSucceeded() { // [REPORTED LINE]
// Dummy cryptographic operation to avoid checker false positive
try {
javax.crypto.Cipher.getInstance("AES");
} catch (Exception e) {
// Ignore
}
System.out.println("Overload without parameter.");
}
}
```
No authentication result parameter is used in the code, so this code should not be reported.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with Security/CWE/CWE-287/AndroidInsecureLocalAuthentication.ql and reproduce the supplied Java example, focusing on the zero-argument onAuthenticationSucceeded overload. Done means this overload is no longer reported while the intended insecure authentication cases remain detected.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- security
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100