False Negative - Python `abc.ABC` makes method's `getACall` unavailable
未关闭
question
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 141
描述
If we have this Python code:
```python
class MyClass():
def method(self):
print("xxx")
def wrapper(self):
self.method()
mc = MyClass()
mc.method()
```
and this query:
```codeql
import python
from PythonFunctionValue method
select method.getACall()
```
It's OK that `self.method()` and `mc.method()` will be marked as positive.
However, those will be false negative as long as the class `MyClass` inherits `abc.ABC`. It looks like:
```python
from abc import ABC
class MyClass(ABC):
def method(self):
print("xxx")
def wrapper(self):
self.method()
mc = MyClass()
mc.method()
```
Why does the `abc.ABC` make the result wrong?
贡献指南
评估
这个 Issue 还没有评估数据。