File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
go/ql/lib/semmle/go/frameworks Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Provides classes for modeling the `github.com/gin-gonic/gin` package.
3+ */
4+
5+ import go
6+ import semmle.go.concepts.HTTP
7+
8+ /** Provides models for the `gin-gonic/gin` package. */
9+ module Gin {
10+ /** Gets the package name `github.com/gin-gonic/gin`. */
11+ string packagePath ( ) { result = package ( "github.com/gin-gonic/gin" , "" ) }
12+
13+ private class GinCookieWrite extends Http:: CookieWrite:: Range , DataFlow:: MethodCallNode {
14+ GinCookieWrite ( ) { this .getTarget ( ) .hasQualifiedName ( packagePath ( ) , "Context" , "SetCookie" ) }
15+
16+ override DataFlow:: Node getName ( ) { result = this .getArgument ( 0 ) }
17+
18+ override DataFlow:: Node getValue ( ) { result = this .getArgument ( 1 ) }
19+
20+ override DataFlow:: Node getSecure ( ) { result = this .getArgument ( 5 ) }
21+
22+ override DataFlow:: Node getHttpOnly ( ) { result = this .getArgument ( 6 ) }
23+ }
24+ }
You can’t perform that action at this time.
0 commit comments