[JS]General issue: ES6 Analysis Seems Unsupported
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
## **ES6 Analysis Seems Unsupported**
When I use:
```javascript
const { chromium } = require('playwright');
// ... other code ...
const newBrowser = await chromium.launch({ headless: true });
```
The following CodeQL cannot track the variable `chromium`:
```ql
SourceNode playwright(TypeTracker t) {
t.start() and
(
result = globalVarRef("chromium")
or
result = moduleImport("playwright")
)
or
exists(TypeTracker t2 |
result = playwright(t2).track(t2, t)
)
}
SourceNode playwright() {
result = playwright(TypeTracker::end())
}
SourceNode playwrightLaunch(TypeTracker t) {
t.start() and
result = playwright().getAMethodCall("launch")
or
exists(TypeTracker t2 |
result = playwrightLaunch(t2).track(t2, t)
)
}
SourceNode playwrightLaunch() {
result = playwrightLaunch(TypeTracker::end())
}
```
However, if it is:
```javascript
const path = require('path');
// ... other code ...
path.join(...);
```
It works!
So, what should I do to track `chromium` in `{chromium}`?
Looking forward to your response.
貢獻指南
研究方向
Start with the provided JavaScript destructuring example and the CodeQL entry points `globalVarRef("chromium")`, `moduleImport("playwright")`, and the `playwright` and `playwrightLaunch` predicates. Compare their behavior with the working `path.join(...)` example; done means the analysis tracks `chromium` from `{ chromium }` through `chromium.launch(...)`.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- security
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100