False positive: Go / MongoDB Find method
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
**Description of the false positive**
**Code samples or links to source code**
https://github.com/github/codeql/blob/dc440aaee6695deb0d9676b87e06ea984e1b4ae5/go/ql/src/Security/CWE-089/SqlInjection/
The following code has a large number of vulnerability false positives in the case of a MongoDB database.
The current MongoDB parameters have defined specific data types, and there are no injection vulnerabilities.
```
type LogFilter struct {
ID []string
}
filter *LogFilter
filterM["id"] = filter.ID
cur, err := dl.Find(ctx, filterM, opts)
```
-->
貢獻指南
研究方向
Start by reading the linked Go SQL-injection query and comparing its handling of the MongoDB Find call shown in the sample. Use the typed LogFilter and ID values as the starting case; done means this valid MongoDB usage is no longer reported as an injection false positive.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- go, mongodb
- 領域
- databases, security
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 30/100