16
16
import go
17
17
import AuthCookie
18
18
19
- module MergedFlow1 =
19
+ module NetHttpCookieTrackingFlow =
20
20
DataFlow:: MergePathGraph< NameToNetHttpCookieTrackingFlow:: PathNode ,
21
21
BoolToNetHttpCookieTrackingFlow:: PathNode , NameToNetHttpCookieTrackingFlow:: PathGraph ,
22
22
BoolToNetHttpCookieTrackingFlow:: PathGraph > ;
23
23
24
- module MergedFlow2 =
24
+ module GorillaTrackingFlow =
25
25
DataFlow:: MergePathGraph3< GorillaCookieStoreSaveTrackingFlow:: PathNode ,
26
26
GorillaSessionOptionsTrackingFlow:: PathNode , BoolToGorillaSessionOptionsTrackingFlow:: PathNode ,
27
27
GorillaCookieStoreSaveTrackingFlow:: PathGraph , GorillaSessionOptionsTrackingFlow:: PathGraph ,
28
28
BoolToGorillaSessionOptionsTrackingFlow:: PathGraph > ;
29
29
30
30
module MergedFlow =
31
- DataFlow:: MergePathGraph3< MergedFlow1:: PathNode , BoolToGinSetCookieTrackingFlow:: PathNode ,
32
- MergedFlow2:: PathNode , MergedFlow1:: PathGraph , BoolToGinSetCookieTrackingFlow:: PathGraph ,
33
- MergedFlow2:: PathGraph > ;
31
+ DataFlow:: MergePathGraph3< NetHttpCookieTrackingFlow:: PathNode ,
32
+ BoolToGinSetCookieTrackingFlow:: PathNode , GorillaTrackingFlow:: PathNode ,
33
+ NetHttpCookieTrackingFlow:: PathGraph , BoolToGinSetCookieTrackingFlow:: PathGraph ,
34
+ GorillaTrackingFlow:: PathGraph > ;
34
35
35
36
import MergedFlow:: PathGraph
36
37
37
38
/** Holds if `HttpOnly` of `net/http.SetCookie` is set to `false` or not set (default value is used). */
38
- predicate isNetHttpCookieFlow ( MergedFlow1:: PathNode source , MergedFlow1:: PathNode sink ) {
39
+ predicate isNetHttpCookieFlow (
40
+ NetHttpCookieTrackingFlow:: PathNode source , NetHttpCookieTrackingFlow:: PathNode sink
41
+ ) {
39
42
exists (
40
43
NameToNetHttpCookieTrackingFlow:: PathNode sensitiveName ,
41
44
NameToNetHttpCookieTrackingFlow:: PathNode setCookieSink
@@ -57,7 +60,9 @@ predicate isNetHttpCookieFlow(MergedFlow1::PathNode source, MergedFlow1::PathNod
57
60
* Holds if there is gorilla cookie store creation to `Save` path and
58
61
* `HttpOnly` is set to `false` or not set (default value is used).
59
62
*/
60
- predicate isGorillaSessionsCookieFlow ( MergedFlow2:: PathNode source , MergedFlow2:: PathNode sink ) {
63
+ predicate isGorillaSessionsCookieFlow (
64
+ GorillaTrackingFlow:: PathNode source , GorillaTrackingFlow:: PathNode sink
65
+ ) {
61
66
exists (
62
67
GorillaCookieStoreSaveTrackingFlow:: PathNode cookieStoreCreate ,
63
68
GorillaCookieStoreSaveTrackingFlow:: PathNode sessionSave
@@ -68,7 +73,7 @@ predicate isGorillaSessionsCookieFlow(MergedFlow2::PathNode source, MergedFlow2:
68
73
source .asPathNode1 ( ) = cookieStoreCreate and
69
74
sink .asPathNode1 ( ) = sessionSave
70
75
or
71
- exists ( MergedFlow2 :: PathNode options , MergedFlow2 :: PathNode sessionSave2 |
76
+ exists ( GorillaTrackingFlow :: PathNode options , GorillaTrackingFlow :: PathNode sessionSave2 |
72
77
GorillaSessionOptionsTrackingFlow:: flowPath ( options .asPathNode2 ( ) ,
73
78
sessionSave2 .asPathNode2 ( ) ) and
74
79
(
0 commit comments