github / github/codeql

C# False Positive Suggestion PathBase

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

説明

**Description of the false positive**

Context.Request.PathBase should not be included as a Remote Flow Source. From my understanding of PathBase, PathBase is usually decided by the server/proxy and therefore is not controllable by a user, but a requirement for accessing an endpoint. Below is an alert I received from the C# XSS query that took PathBase as its source.

**Code samples or links to source code**

```csharp
var bundleAsset = GetOrCreateBundle(bundleKey, CreateCssAsset, sources);

var pathBase = _actionContextAccessor.ActionContext?.HttpContext.Request.PathBase ?? PathString.Empty; <--- PathBase here
result.AppendFormat("",
MimeTypes.TextCss, pathBase, bundleAsset.Route, bundleAsset.GenerateCacheKey(httpContext, woConfig));
```

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

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

評価

この issue はまだ評価されていません。

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

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