Skip to content

Commit a09505a

Browse files
committed
Update rules
1 parent 5148054 commit a09505a

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

go/ql/src/experimental/CWE-525/WebCacheDeception.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ import go
1414
import WebCacheDeceptionLib
1515

1616
from WebCacheDeception::Sink httpHandleFuncCall
17-
select httpHandleFuncCall, "$@ is used as wildcard endpoint.", httpHandleFuncCall.getNode(),
18-
"Web Cache Deception"
17+
select httpHandleFuncCall, httpHandleFuncCall + " is used as wildcard endpoint."

go/ql/src/experimental/CWE-525/WebCacheDeceptionLib.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module WebCacheDeception {
2626
i.getPath() = "github.com/gofiber/fiber" or
2727
i.getPath() = "github.com/gofiber/fiber/v2"
2828
|
29-
exists(DataFlow::MethodCallNode m |
29+
exists(DataFlow::CallNode m |
3030
m.getCall().getArgument(0).toString().matches("%/*%") and
3131
this = m.getArgument(0)
3232
)
@@ -40,7 +40,7 @@ module WebCacheDeception {
4040
i.getPath() = "github.com/go-chi/chi/v5" or
4141
i.getPath() = "github.com/go-chi/chi/v5/middleware"
4242
|
43-
exists(DataFlow::MethodCallNode m |
43+
exists(DataFlow::CallNode m |
4444
m.getCall().getArgument(0).toString().matches("%/*%") and
4545
this = m.getArgument(0)
4646
)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
edges
2-
nodes
3-
subpaths
4-
#select
1+
| WebCacheDeceptionBad.go:82:18:82:31 | "/adminusers/" | "/adminusers/" is used as wildcard endpoint. |
2+
| WebCacheDeceptionFiber.go:15:10:15:17 | "/api/*" | "/api/*" is used as wildcard endpoint. |
3+
| WebCacheDeceptionFiber.go:20:11:20:18 | "/api/*" | "/api/*" is used as wildcard endpoint. |
4+
| WebCacheDeceptionGoChi.go:13:8:13:11 | "/*" | "/*" is used as wildcard endpoint. |

0 commit comments

Comments
 (0)