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 還沒有評估資料。