Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2c2e09b

Browse files
committed
Go: Add summary model validation on the kind column.
1 parent 37f01fe commit 2c2e09b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

go/ql/lib/semmle/go/dataflow/CsvValidation.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ private string getInvalidModelOutput() {
3636
)
3737
}
3838

39-
private string getInvalidModelKind() { none() }
39+
private string getInvalidModelKind() {
40+
exists(string row, string kind | summaryModel(row) |
41+
kind = row.splitAt(";", 8) and
42+
not kind = ["taint", "value"] and
43+
result = "Invalid kind \"" + kind + "\" in summary model."
44+
)
45+
}
4046

4147
private string getInvalidModelSubtype() {
4248
exists(string pred, string row, int expect |

0 commit comments

Comments
 (0)