LoRexxar / Kunlun-M

KunLun-M是一个完全开源的静态白盒扫描工具,支持PHP、JavaScript的语义扫描,基础安全、组件安全扫描,Chrome Ext\Solidity的基础扫描。
MIT License
2.21k stars 309 forks source link

source在类私有函数中无法准确的回溯跟踪 #236

Open Autumn-27 opened 1 year ago

Autumn-27 commented 1 year ago

System and Python Environment

Item Tooltip Value
System uname -a
Python python -V
Cobra python kunlun.py

Description

private function getPhpLangArrayByModule($local, $module) { return $this->getArrayFromPhp($this->getLangFileFullPath($local, $module)); }

private function getArrayFromPhp($file) { if (file_exists($file)) { $array = require ($file); if (is_array($array)) { return $array; } } return []; }

在$array = require ($file); 这里赋值调用require 代码中 赋值的分支 没有require的处理

查找调用getArrayFromPhp的代码时匹配不到return $this->getArrayFromPhp($this->getLangFileFullPath($local, $module));

LoRexxar commented 1 year ago

kunlunm在处理类的私有函数调用链的时候会跟出问题,目前的架构不支持这么复杂的场景,没什么好办法