Skip to content

Commit c981fd7

Browse files
committed
Exclude String from TaintSteps
For `os.dirEntry` and `os.unixDirent` which are only available on unix and Windows respectively.
1 parent ee58dbc commit c981fd7

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,6 @@
864864
| os.fileWithoutReadFrom.WriteString | file://:0:0:0:0 | [summary param] 0 in WriteString | file://:0:0:0:0 | [summary] to write: Argument[-1] in WriteString |
865865
| os.rawConn.Read | file://:0:0:0:0 | [summary param] -1 in Read | file://:0:0:0:0 | [summary] to write: Argument[0] in Read |
866866
| os.rawConn.Write | file://:0:0:0:0 | [summary param] 0 in Write | file://:0:0:0:0 | [summary] to write: Argument[-1] in Write |
867-
| os.unixDirent.String | file://:0:0:0:0 | [summary param] -1 in String | file://:0:0:0:0 | [summary] to write: ReturnValue in String |
868867
| path.Base | file://:0:0:0:0 | [summary param] 0 in Base | file://:0:0:0:0 | [summary] to write: ReturnValue in Base |
869868
| path.Clean | file://:0:0:0:0 | [summary param] 0 in Clean | file://:0:0:0:0 | [summary] to write: ReturnValue in Clean |
870869
| path.Dir | file://:0:0:0:0 | [summary param] 0 in Dir | file://:0:0:0:0 | [summary] to write: ReturnValue in Dir |

go/ql/test/library-tests/semmle/go/frameworks/TaintSteps/TaintStep.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ where
3030
pkg.matches("crypto/rand.%") and
3131
name = "Read"
3232
or
33-
pkg = ["os.dirEntry", "os.unixDirent"] and name = ["Info", "Name"]
33+
pkg = ["os.dirEntry", "os.unixDirent"] and name = ["Info", "Name", "String"]
3434
or
3535
// Not available on arm64
3636
pkg = "vendor/golang.org/x/crypto/internal/poly1305.mac" and name = "Write"

0 commit comments

Comments
 (0)