github / github/codeql

False positive: Missing X-Frame-Options HTTP header

Đang mở
#16,334 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
C# false-positive
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

**Description of the false positive**

In a c# project, we are using NWebsec.AspNetCore.Middleware's ([docs](https://docs.nwebsec.com/en/latest/nwebsec/NWebsec.AspNetCore.Middleware.html)) ApplicationBuilderExtensions to set the X-Frame-Options policy. The scanner, however, reports Missing X-Frame-Options HTTP header (cs/web/missing-x-frame-options) as it is only checking the Web.config, I assume.
Any suggestions on mitigation? Thanks!

**Code samples or links to source code**

```csharp
//set x-Frame-Options policy="SameOrigin"
app.UseXfo(options => options.SameOrigin());
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.