@@ -30,6 +30,13 @@ func glogTest() {
3030 glog .Warningf (fmt , text ) // $ logger=fmt logger=text
3131 glog .Warningln (text ) // $ logger=text
3232
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+
3340 klog .Error (text ) // $ logger=text
3441 klog .ErrorDepth (0 , text ) // $ logger=text
3542 klog .Errorf (fmt , text ) // $ logger=fmt logger=text
@@ -50,4 +57,11 @@ func glogTest() {
5057 klog .WarningDepth (0 , text ) // $ logger=text
5158 klog .Warningf (fmt , text ) // $ logger=fmt logger=text
5259 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
5367}
0 commit comments