Skip to content

Commit b95189d

Browse files
authored
Merge branch 'main' into go/gokogiri/update-import-paths
2 parents 9167057 + c23938d commit b95189d

File tree

4 files changed

+41
-4
lines changed

4 files changed

+41
-4
lines changed
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Framework name,URL,Package prefixes
22
Standard library,https://pkg.go.dev/std, archive/* bufio bytes cmp compress/* container/* context crypto crypto/* database/* debug/* embed encoding encoding/* errors expvar flag fmt go/* hash hash/* html html/* image image/* index/* io io/* log log/* maps math math/* mime mime/* net net/* os os/* path path/* plugin reflect reflect/* regexp regexp/* slices sort strconv strings sync sync/* syscall syscall/* testing testing/* text/* time time/* unicode unicode/* unsafe
3+
appleboy/gin-jwt,https://github.com/appleboy/gin-jwt,github.com/appleboy/gin-jwt*
34
beego,https://beego.me/,github.com/astaxie/beego* github.com/beego/beego*
45
Couchbase official client(gocb),https://github.com/couchbase/gocb,github.com/couchbase/gocb* gopkg.in/couchbase/gocb*
56
chi,https://go-chi.io/,github.com/go-chi/chi*
@@ -8,25 +9,38 @@ cristalhq/jwt,https://github.com/cristalhq/jwt,github.com/cristalhq/jwt*
89
Echo,https://echo.labstack.com/,github.com/labstack/echo*
910
fasthttp,https://github.com/valyala/fasthttp,github.com/valyala/fasthttp*
1011
Fosite,https://github.com/ory/fosite,github.com/ory/fosite*
12+
gf-jwt,https://github.com/gogf/gf-jwt,github.com/gogf/gf-jwt*
1113
Gin,https://github.com/gin-gonic/gin,github.com/gin-gonic/gin*
12-
Go JOSE,https://github.com/go-jose/go-jose,github.com/go-jose/go-jose* github.com/square/go-jose* gopkg.in/square/go-jose*
14+
Go JOSE,https://github.com/go-jose/go-jose,github.com/go-jose/go-jose* github.com/square/go-jose* gopkg.in/square/go-jose* gopkg.in/go-jose/go-jose*
1315
Go kit,https://gokit.io/,github.com/go-kit/kit*
1416
go-pg,https://pg.uptrace.dev/,github.com/go-pg/pg*
1517
go-restful,https://github.com/emicklei/go-restful,github.com/emicklei/go-restful*
18+
Gokogiri,https://github.com/moovweb/gokogiri,github.com/jbowtie/gokogiri* github.com/jbowtie/moovweb*
1619
golang.org/x/net,https://pkg.go.dev/golang.org/x/net,golang.org/x/net*
1720
goproxy,https://github.com/elazarl/goproxy,github.com/elazarl/goproxy*
1821
gorilla/mux,https://github.com/gorilla/mux,github.com/gorilla/mux*
22+
gorilla/websocket,https://github.com/gorilla/websocket,github.com/gorilla/websocket*
23+
goxpath,https://github.com/ChrisTrenkamp/goxpath/wiki,github.com/ChrisTrenkamp/goxpath*
24+
htmlquery,https://github.com/antchfx/htmlquery,github.com/antchfx/htmlquery*
1925
Iris,https://www.iris-go.com/,github.com/kataras/iris*
2026
json-iterator,https://github.com/json-iterator/go,github.com/json-iterator/go*
2127
jsonpatch,https://github.com/evanphx/json-patch,github.com/evanphx/json-patch*
28+
jsonquery,https://github.com/antchfx/jsonquery,github.com/antchfx/jsonquery*
2229
jwt-go,https://golang-jwt.github.io/jwt/,github.com/golang-jwt/jwt* github.com/form3tech-oss/jwt-go* github.com/dgrijalva/jwt-go*
2330
jwtauth,https://github.com/go-chi/jwtauth,github.com/go-chi/jwtauth*
2431
kataras/jwt,https://github.com/kataras/jwt,github.com/kataras/jwt*
2532
Kubernetes,https://kubernetes.io/,k8s.io/api* k8s.io/apimachinery*
2633
lestrrat-go/jwx,https://github.com/lestrrat-go/jwx,github.com/lestrrat-go/jwx* github.com/lestrrat/go-jwx*
34+
lestrrat-go/libxml2,https://github.com/lestrrat-go/libxml2,github.com/lestrrat-go/libxml2*
2735
Macaron,https://gopkg.in/macaron.v1,gopkg.in/macaron*
36+
nhooyr.io/websocket,https://nhooyr.io/websocket,nhooyr.io/websocket*
2837
protobuf,https://pkg.go.dev/google.golang.org/protobuf,github.com/golang/protobuf* google.golang.org/protobuf*
2938
Revel,http://revel.github.io/,github.com/revel/revel* github.com/robfig/revel*
3039
SendGrid,https://github.com/sendgrid/sendgrid-go,github.com/sendgrid/sendgrid-go*
40+
ws,https://github.com/gobwas/ws,github.com/gobwas/ws*
41+
xmlpath,https://gopkg.in/xmlpath.v2,gopkg.in/xmlpath* github.com/go-xmlpath/xmlpath* github.com/crankycoder/xmlpath* launchpad.net/xmlpath* github.com/masterzen/xmlpath* github.com/going/toolkit/xmlpath* gopkg.in/go-xmlpath/xmlpath*
42+
xmlquery,https://github.com/antchfx/xmlquery,github.com/antchfx/xmlquery*
43+
XPath,https://github.com/antchfx/xpath,github.com/antchfx/xpath*
44+
xpathparser,https://github.com/santhosh-tekuri/xpathparser,github.com/santhosh-tekuri/xpathparser*
3145
yaml,https://gopkg.in/yaml.v3,gopkg.in/yaml*
3246
zap,https://go.uber.org/zap,go.uber.org/zap*
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
extensions:
2+
- addsTo:
3+
pack: codeql/go-all
4+
extensible: packageGrouping
5+
data:
6+
- ["xmlpath", "gopkg.in/xmlpath"]
7+
- ["xmlpath", "github.com/go-xmlpath/xmlpath"]
8+
- ["xmlpath", "github.com/crankycoder/xmlpath"]
9+
- ["xmlpath", "launchpad.net/xmlpath"]
10+
- ["xmlpath", "github.com/masterzen/xmlpath"]
11+
- ["xmlpath", "github.com/going/toolkit/xmlpath"]
12+
- ["xmlpath", "gopkg.in/go-xmlpath/xmlpath"]
213
- addsTo:
314
pack: codeql/go-all
415
extensible: sinkModel
516
data:
6-
- ["github.com/go-xmlpath/xmlpath", "", True, "Compile", "", "", "Argument[0]", "xpath-injection", "manual"]
7-
- ["github.com/go-xmlpath/xmlpath", "", True, "MustCompile", "", "", "Argument[0]", "xpath-injection", "manual"]
17+
- ["group:xmlpath", "", True, "Compile", "", "", "Argument[0]", "xpath-injection", "manual"]
18+
- ["group:xmlpath", "", True, "MustCompile", "", "", "Argument[0]", "xpath-injection", "manual"]

go/ql/lib/semmle/go/frameworks/XPath.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ deprecated module XmlPath {
4343
* Gets the package name `github.com/go-xmlpath/xmlpath` or `gopkg.in/xmlpath`.
4444
*/
4545
deprecated string packagePath() {
46-
result = package(["github.com/go-xmlpath/xmlpath", "gopkg.in/xmlpath"], "")
46+
result =
47+
package([
48+
"github.com/go-xmlpath/xmlpath", "gopkg.in/xmlpath", "github.com/crankycoder/xmlpath",
49+
"launchpad.net/xmlpath", "github.com/masterzen/xmlpath",
50+
"github.com/going/toolkit/xmlpath", "gopkg.in/go-xmlpath/xmlpath"
51+
], "")
4752
}
4853
}

go/ql/test/query-tests/Security/CWE-643/XPathInjection.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ models
124124
| 21 | Sink: github.com/ChrisTrenkamp/goxpath; ; true; MustParse; ; ; Argument[0]; xpath-injection; manual |
125125
| 22 | Sink: github.com/ChrisTrenkamp/goxpath; ; true; Parse; ; ; Argument[0]; xpath-injection; manual |
126126
| 23 | Sink: github.com/ChrisTrenkamp/goxpath; ; true; ParseExec; ; ; Argument[0]; xpath-injection; manual |
127+
| 24 | Sink: github.com/crankycoder/xmlpath; ; true; Compile; ; ; Argument[0]; xpath-injection; manual |
127128
| 24 | Sink: github.com/go-xmlpath/xmlpath; ; true; Compile; ; ; Argument[0]; xpath-injection; manual |
129+
| 24 | Sink: github.com/going/toolkit/xmlpath; ; true; Compile; ; ; Argument[0]; xpath-injection; manual |
130+
| 24 | Sink: github.com/masterzen/xmlpath; ; true; Compile; ; ; Argument[0]; xpath-injection; manual |
131+
| 24 | Sink: gopkg.in/go-xmlpath/xmlpath; ; true; Compile; ; ; Argument[0]; xpath-injection; manual |
132+
| 24 | Sink: gopkg.in/xmlpath; ; true; Compile; ; ; Argument[0]; xpath-injection; manual |
133+
| 24 | Sink: launchpad.net/xmlpath; ; true; Compile; ; ; Argument[0]; xpath-injection; manual |
134+
| 25 | Sink: github.com/crankycoder/xmlpath; ; true; MustCompile; ; ; Argument[0]; xpath-injection; manual |
128135
| 25 | Sink: github.com/go-xmlpath/xmlpath; ; true; MustCompile; ; ; Argument[0]; xpath-injection; manual |
129136
| 26 | Sink: github.com/lestrrat-go/libxml2/parser; Parser; true; Parse; ; ; Argument[0]; xpath-injection; manual |
130137
| 27 | Sink: github.com/lestrrat-go/libxml2/parser; Parser; true; ParseReader; ; ; Argument[0]; xpath-injection; manual |

0 commit comments

Comments
 (0)