Codeql to detect CORS misconfiguration in go webapp
未關閉
Go
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
Here is how a sample go code vulnerable to CORS misconfiguration looks like
```
import(
"github.com/go-chi/cors"
)
var corsOpts = cors.Options{
AllowedOrigins: []string{"*"},
AllowCredentials: true
}
```
It does not validate the origin header and allows authenticated cross-origin requests. I was testing codeql on a popular GitHub repo and unfortunately, it was not able to detect it using lgtm.com website. So I thought this query can be added to codeql for detecting this kind of bugs.
貢獻指南
評估
這個 Issue 還沒有評估資料。