False Positive: AndroidInsecureLocalAuthentication.ql
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 15 Std.
- Gemergte PRs (30 T.)
- 141
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Beginne mit Security/CWE/CWE-287/AndroidInsecureLocalAuthentication.ql und reproduziere das bereitgestellte Java-Beispiel, wobei der Fokus auf der parameterlosen Überladung von onAuthenticationSucceeded liegt. Erledigt ist die Aufgabe, wenn diese Überladung nicht mehr gemeldet wird, während die vorgesehenen unsicheren Authentifizierungsfälle weiterhin erkannt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- security
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100