False positive: "Missing function level access control" where public endpoint name contains "Edit"
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 15 Std.
- Gemergte PRs (30 T.)
- 141
Beschreibung
**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?
Beitragsleitfaden
Rechercherichtung
Start with the CodeQL rule cs/web/missing-function-level-access-control and reproduce the report using the provided .NET 8 controller example. The issue is resolved when a public method named TestEditionAsync with AllowAnonymous is no longer flagged solely because its name contains Edit.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- security
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100