False positive py/uninitialized-local-variable
- 主要言語
- CodeQL
- スター
- 10.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 141
説明
**Description of the false positive**
**Code samples or links to source code**
```python
class Foo:
def foo(self, a, b, c=0):
start = 0
visible = not (a == b and c)
end = start if visible else None
return end
```
CodeQL Version: 2.18.3
Alert : Local variable 'visible' may be used before it is initialized.
I suspect that the issue is caused by EssaVariable being unable to locate the assignment statement for the variable visible, but I'm not sure how to modify the ql statement.
コントリビューションガイド
調査の方向性
Review the py/uninitialized-local-variable query and its EssaVariable handling against the supplied Python sample. Confirm that the false alert about visible no longer appears for this code while the intended uninitialized-local-variable detection remains intact.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- security
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100