Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 095baeb

Browse files
committed
Remove taint-tracking of booleans and numbers (but keep uintptr)
1 parent 5e62b00 commit 095baeb

File tree

2 files changed

+114
-269
lines changed
  • ql
    • src/semmle/go/frameworks/stdlib
    • test/library-tests/semmle/go/frameworks/StdlibTaintFlow

2 files changed

+114
-269
lines changed

ql/src/semmle/go/frameworks/stdlib/Reflect.qll

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,10 @@ module Reflect {
6262
this.hasQualifiedName("reflect", "Value", "Addr") and
6363
(inp.isReceiver() and outp.isResult())
6464
or
65-
// signature: func (Value).Bool() bool
66-
this.hasQualifiedName("reflect", "Value", "Bool") and
67-
(inp.isReceiver() and outp.isResult())
68-
or
6965
// signature: func (Value).Bytes() []byte
7066
this.hasQualifiedName("reflect", "Value", "Bytes") and
7167
(inp.isReceiver() and outp.isResult())
7268
or
73-
// signature: func (Value).Complex() complex128
74-
this.hasQualifiedName("reflect", "Value", "Complex") and
75-
(inp.isReceiver() and outp.isResult())
76-
or
7769
// signature: func (Value).Convert(t Type) Value
7870
this.hasQualifiedName("reflect", "Value", "Convert") and
7971
(inp.isReceiver() and outp.isResult())
@@ -98,18 +90,10 @@ module Reflect {
9890
this.hasQualifiedName("reflect", "Value", "FieldByNameFunc") and
9991
(inp.isReceiver() and outp.isResult())
10092
or
101-
// signature: func (Value).Float() float64
102-
this.hasQualifiedName("reflect", "Value", "Float") and
103-
(inp.isReceiver() and outp.isResult())
104-
or
10593
// signature: func (Value).Index(i int) Value
10694
this.hasQualifiedName("reflect", "Value", "Index") and
10795
(inp.isReceiver() and outp.isResult())
10896
or
109-
// signature: func (Value).Int() int64
110-
this.hasQualifiedName("reflect", "Value", "Int") and
111-
(inp.isReceiver() and outp.isResult())
112-
or
11397
// signature: func (Value).Interface() (i interface{})
11498
this.hasQualifiedName("reflect", "Value", "Interface") and
11599
(inp.isReceiver() and outp.isResult())
@@ -154,26 +138,10 @@ module Reflect {
154138
this.hasQualifiedName("reflect", "Value", "Set") and
155139
(inp.isParameter(0) and outp.isReceiver())
156140
or
157-
// signature: func (Value).SetBool(x bool)
158-
this.hasQualifiedName("reflect", "Value", "SetBool") and
159-
(inp.isParameter(0) and outp.isReceiver())
160-
or
161141
// signature: func (Value).SetBytes(x []byte)
162142
this.hasQualifiedName("reflect", "Value", "SetBytes") and
163143
(inp.isParameter(0) and outp.isReceiver())
164144
or
165-
// signature: func (Value).SetComplex(x complex128)
166-
this.hasQualifiedName("reflect", "Value", "SetComplex") and
167-
(inp.isParameter(0) and outp.isReceiver())
168-
or
169-
// signature: func (Value).SetFloat(x float64)
170-
this.hasQualifiedName("reflect", "Value", "SetFloat") and
171-
(inp.isParameter(0) and outp.isReceiver())
172-
or
173-
// signature: func (Value).SetInt(x int64)
174-
this.hasQualifiedName("reflect", "Value", "SetInt") and
175-
(inp.isParameter(0) and outp.isReceiver())
176-
or
177145
// signature: func (Value).SetMapIndex(key Value, elem Value)
178146
this.hasQualifiedName("reflect", "Value", "SetMapIndex") and
179147
(inp.isParameter(_) and outp.isReceiver())
@@ -186,10 +154,6 @@ module Reflect {
186154
this.hasQualifiedName("reflect", "Value", "SetString") and
187155
(inp.isParameter(0) and outp.isReceiver())
188156
or
189-
// signature: func (Value).SetUint(x uint64)
190-
this.hasQualifiedName("reflect", "Value", "SetUint") and
191-
(inp.isParameter(0) and outp.isReceiver())
192-
or
193157
// signature: func (Value).Slice(i int, j int) Value
194158
this.hasQualifiedName("reflect", "Value", "Slice") and
195159
(inp.isReceiver() and outp.isResult())
@@ -210,10 +174,6 @@ module Reflect {
210174
this.hasQualifiedName("reflect", "Value", "TrySend") and
211175
(inp.isParameter(0) and outp.isReceiver())
212176
or
213-
// signature: func (Value).Uint() uint64
214-
this.hasQualifiedName("reflect", "Value", "Uint") and
215-
(inp.isReceiver() and outp.isResult())
216-
or
217177
// signature: func (Value).UnsafeAddr() uintptr
218178
this.hasQualifiedName("reflect", "Value", "UnsafeAddr") and
219179
(inp.isReceiver() and outp.isResult())

0 commit comments

Comments
 (0)