False positive: "Missing cross-site request forgery token validation" in C# API for endpoint with no cookie/session tokens
还没有人认领这个 Issue。
评估
调研方向
首先查看提交 5bb31afc834f53d5ea719d782744ff9c7ab70fc0 以及此 issue 中的 C# API 示例,以了解为什么该发现适用。找到查询入口及其现有测试,然后验证仅使用 API key 的 server-to-server 端点不会被标记,而使用 cookie 或 token 身份验证的端点仍会被标记。
由索引模型根据 Issue 内容生成。
描述
Description of the false positive
We are using a .NET 10 Api and since commit https://github.com/github/codeql/commit/5bb31afc834f53d5ea719d782744ff9c7ab70fc2 we get a false positive on a server -> server endpoint where we have a ApiKey in the header with no tokens or cookies.
Is it possible to extend the check to look if cookie/token authentication is used instead of a ApiKey?
Code samples or links to source code
public class Controller()
{
[HttpPost()]
public string Execute()
{
return "test";
}
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 134
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/codeql 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
false-positive
难度 2/5 1-3 小时 新手友好度 70/100
-
false-positive
难度 3/5 1-2 天 新手友好度 68/100
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 76/100
growthbook/growthbook#7100 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
punkpeye/mcp-remote#369 ·
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
难度 2/5 1-3 小时 新手友好度 76/100
Azure/azure-sdk-for-net#63292 · 3 条评论 · 1 个 reaction ·
-
bug p:3-mid pydanty:bug
难度 2/5 1-3 小时 新手友好度 88/100
pydantic/pydantic-ai#8643 · 1 条评论 ·