@@ -30,6 +30,13 @@ func glogTest() {
30
30
glog .Warningf (fmt , text ) // $ logger=fmt logger=text
31
31
glog .Warningln (text ) // $ logger=text
32
32
33
+ // components corresponding to the format specifier "%T" are not considered vulnerable
34
+ glog .Errorf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
35
+ glog .Exitf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
36
+ glog .Fatalf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
37
+ glog .Infof ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
38
+ glog .Warningf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
39
+
33
40
klog .Error (text ) // $ logger=text
34
41
klog .ErrorDepth (0 , text ) // $ logger=text
35
42
klog .Errorf (fmt , text ) // $ logger=fmt logger=text
@@ -50,4 +57,11 @@ func glogTest() {
50
57
klog .WarningDepth (0 , text ) // $ logger=text
51
58
klog .Warningf (fmt , text ) // $ logger=fmt logger=text
52
59
klog .Warningln (text ) // $ logger=text
60
+
61
+ // components corresponding to the format specifier "%T" are not considered vulnerable
62
+ klog .Errorf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
63
+ klog .Exitf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
64
+ klog .Fatalf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
65
+ klog .Infof ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
66
+ klog .Warningf ("%s: found type %T" , text , v ) // $ logger="%s: found type %T" logger=text SPURIOUS: logger=v
53
67
}
0 commit comments