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

Commit 3a7406b

Browse files
committed
Remove redundant Read and Write method models
1 parent 3abf0e8 commit 3a7406b

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ module CryptoCipher {
1111
FunctionOutput outp;
1212

1313
MethodModels() {
14-
// signature: func (StreamReader).Read(dst []byte) (n int, err error)
15-
this.hasQualifiedName("crypto/cipher", "StreamReader", "Read") and
16-
(inp.isReceiver() and outp.isParameter(0))
17-
or
18-
// signature: func (StreamWriter).Write(src []byte) (n int, err error)
19-
this.hasQualifiedName("crypto/cipher", "StreamWriter", "Write") and
20-
(inp.isParameter(0) and outp.isReceiver())
21-
or
2214
// signature: func (Block).Decrypt(dst []byte, src []byte)
2315
this.implements("crypto/cipher", "Block", "Decrypt") and
2416
(inp.isParameter(1) and outp.isParameter(0))

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,4 @@ module CryptoTls {
3636
input = inp and output = outp
3737
}
3838
}
39-
40-
private class MethodModels extends TaintTracking::FunctionModel, Method {
41-
FunctionInput inp;
42-
FunctionOutput outp;
43-
44-
MethodModels() {
45-
// signature: func (*Conn).Read(b []byte) (int, error)
46-
this.hasQualifiedName("crypto/tls", "Conn", "Read") and
47-
(inp.isReceiver() and outp.isParameter(0))
48-
or
49-
// signature: func (*Conn).Write(b []byte) (int, error)
50-
this.hasQualifiedName("crypto/tls", "Conn", "Write") and
51-
(inp.isParameter(0) and outp.isReceiver())
52-
}
53-
54-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
55-
input = inp and output = outp
56-
}
57-
}
5839
}

0 commit comments

Comments
 (0)