C# False Positive Suggestion PathBase
- Lingua principale
- CodeQL
- Stelle
- 10.1k
- Fork
- 2.1k
- Merge medio
- 2g 15h
- PR unite (30g)
- 141
Descrizione
**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));
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.