github / github/codeql

False positive - C# Constant Condition

未关闭
#14,641 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
false-positive
主要语言
CodeQL
星标
10.1k
派生
2.1k
平均合并
2 天 15 小时
30 天内合并 PR
141

描述

**Description of the false positive**

Customer reported an instance where a conditional statement was wrongly flagged as one that would always evaluate to false. In fact, the code could evaluate to true.

![Image](https://github.com/github/codeql/assets/33412273/3038370a-b551-4c78-9e08-2d7556af8d0d)

**Code samples or links to source code**

refer to image

贡献指南

打开贡献指南

调研方向

Begin by inspecting the conditional shown in the linked image and locating the CodeQL query that reports it. Reproduce the false positive, then determine how to add regression coverage so the condition is not reported when it can evaluate to true.

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
security, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。