False positive: "Missing function level access control" where public endpoint name contains "Edit"
- Linguagem predominante
- CodeQL
- Estrelas
- 10.1k
- Forks
- 2.1k
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 141
Descrição
**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?
Guia de contribuição
Direção de pesquisa
Comece com a regra do CodeQL cs/web/missing-function-level-access-control e reproduza o relatório usando o exemplo de controller .NET 8 fornecido. O problema estará resolvido quando um método público chamado TestEditionAsync com AllowAnonymous não for mais sinalizado unicamente porque seu nome contém Edit.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp
- Domínio
- security
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100