False positive: "Missing function level access control" where public endpoint name contains "Edit"
- Lenguaje dominante
- CodeQL
- Estrellas
- 10.1k
- Forks
- 2.1k
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 141
Descripción
**Description of the false positive**
We have a .NET 8 Api.
We have a controller method that has the characters 'Edit' in it, but the whole word is not Edit. This causes the method to be marked with the rule cs/web/missing-function-level-access-control. The method even has the 'AllowAnonymous' attribute on it.
**Code samples or links to source code**
```
[AllowAnonymous]
public async Task TestEditionAsync(){
}
```
Is there a way to get this alert resolved?
Guía de contribución
Línea de trabajo
Comienza con la regla de CodeQL cs/web/missing-function-level-access-control y reproduce el informe utilizando el ejemplo de controlador de .NET 8 proporcionado. El problema se resuelve cuando un método público llamado TestEditionAsync con AllowAnonymous deja de marcarse únicamente porque su nombre contiene Edit.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- security
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100