github / github/codeql

False positive: "Missing function level access control" where public endpoint name contains "Edit"

オープン
#21,042 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
C# false-positive
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**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?

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
security
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。