File tree Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Expand file tree Collapse file tree 5 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import semmle.go.frameworks.ElazarlGoproxy
4040import semmle.go.frameworks.Email
4141import semmle.go.frameworks.Encoding
4242import semmle.go.frameworks.Fasthttp
43+ import semmle.go.frameworks.Gin
4344import semmle.go.frameworks.GinCors
4445import semmle.go.frameworks.Glog
4546import semmle.go.frameworks.GoJose
Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ module Http {
381381 predicate guardedBy ( DataFlow:: Node check ) { super .guardedBy ( check ) }
382382 }
383383
384- /** Provides a class for modelling HTTP response cookie writes. */
384+ /** Provides a class for modeling HTTP response cookie writes. */
385385 module CookieWrite {
386386 /**
387387 * An write of an HTTP Cookie to an HTTP response.
@@ -424,7 +424,7 @@ module Http {
424424 DataFlow:: Node getHttpOnly ( ) { result = super .getHttpOnly ( ) }
425425 }
426426
427- /** Provides a class for modelling the options of an HTTP cookie. */
427+ /** Provides a class for modeling the options of an HTTP cookie. */
428428 module CookieOptions {
429429 /**
430430 * An HTTP Cookie object.
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ module NetHttp {
294294 override DataFlow:: Node getAPathArgument ( ) { result = this .getArgument ( 2 ) }
295295 }
296296
297- class CookieWrite extends Http:: CookieWrite:: Range , DataFlow:: CallNode {
297+ private class CookieWrite extends Http:: CookieWrite:: Range , DataFlow:: CallNode {
298298 CookieWrite ( ) { this .getTarget ( ) .hasQualifiedName ( package ( "net/http" , "" ) , "SetCookie" ) }
299299
300300 override DataFlow:: Node getName ( ) { result = this .getArgument ( 1 ) }
@@ -306,7 +306,7 @@ module NetHttp {
306306 override DataFlow:: Node getHttpOnly ( ) { result = this .getArgument ( 1 ) }
307307 }
308308
309- class CookieFieldWrite extends Http:: CookieOptions:: Range {
309+ private class CookieFieldWrite extends Http:: CookieOptions:: Range {
310310 Write w ;
311311 Field f ;
312312 DataFlow:: Node written ;
Original file line number Diff line number Diff line change 77 * @kind path-problem
88 * @problem.severity warning
99 * @precision high
10+ * @security-severity 5.0
1011 * @id go/cookie-httponly-not-set
1112 * @tags security
1213 * external/cwe/cwe-1004
1314 */
1415
1516import go
1617import semmle.go.security.SecureCookies
17- import semmle.go.concepts.HTTP
1818import SensitiveCookieNameFlow:: PathGraph
1919
2020from
Original file line number Diff line number Diff line change 44 * @kind problem
55 * @problem.severity warning
66 * @precision high
7+ * @security-severity 5.0
78 * @id go/cookie-secure-not-set
89 * @tags security
910 * external/cwe/cwe-1004
1011 */
1112
1213import go
1314import semmle.go.security.SecureCookies
14- import semmle.go.concepts.HTTP
1515
1616from Http:: CookieWrite cw
1717where isInsecureCookie ( cw )
18- select cw , "Cookie does not set Secure attribute to true"
18+ select cw , "Cookie does not set Secure attribute to true. "
You can’t perform that action at this time.
0 commit comments