mirror of
https://github.com/github/codeql.git
synced 2026-04-20 14:34:04 +02:00
Copy "Parameter" tests to ExternalValueFlow
This commit is contained in:
@@ -37,6 +37,7 @@ extensions:
|
||||
data:
|
||||
- ["github.com/nonexistent/test", "", False, "SourceVariable", "", "", "", "qltest", "manual"]
|
||||
- ["github.com/nonexistent/test", "A", False, "Src1", "", "", "ReturnValue", "qltest", "manual"]
|
||||
- ["semmle.go.Packages", "", True, "srcParam", "", "", "Parameter[0]", "qltest", "manual"]
|
||||
- addsTo:
|
||||
pack: codeql/go-all
|
||||
extensible: sinkModel
|
||||
|
||||
@@ -50,3 +50,4 @@ invalidModelRow
|
||||
| test.go:206:10:206:26 | call to min | qltest |
|
||||
| test.go:207:10:207:26 | call to min | qltest |
|
||||
| test.go:210:22:210:25 | temp | qltest |
|
||||
| test.go:214:10:214:12 | src | qltest |
|
||||
|
||||
@@ -22,3 +22,4 @@ invalidModelRow
|
||||
| test.go:187:24:187:31 | call to Src1 | qltest |
|
||||
| test.go:191:24:191:31 | call to Src1 | qltest |
|
||||
| test.go:209:10:209:28 | selection of SourceVariable | qltest |
|
||||
| test.go:213:15:213:17 | definition of src | qltest |
|
||||
|
||||
@@ -10,3 +10,4 @@ extensions:
|
||||
- ["github.com/nonexistent/test", "A", False, "SrcArg", "", "", "Argument[0]", "qltest-arg", "manual"]
|
||||
- ["github.com/nonexistent/test", "A", False, "Src3", "", "", "ReturnValue[0]", "qltest", "manual"]
|
||||
- ["github.com/nonexistent/test", "A", True, "Src3", "", "", "ReturnValue[1]", "qltest-w-subtypes", "manual"]
|
||||
- ["semmle.go.Packages", "", True, "srcParam", "", "", "Parameter[0]", "qltest", "manual"]
|
||||
|
||||
@@ -210,6 +210,10 @@ func simpleflow() {
|
||||
test.SinkVariable = temp // $ hasValueFlow="temp"
|
||||
}
|
||||
|
||||
func srcParam(src string, b test.B) {
|
||||
b.Sink1(src) // $ hasValueFlow="src"
|
||||
}
|
||||
|
||||
type mapstringstringtype map[string]string
|
||||
type arraytype []interface{}
|
||||
type channeltype chan interface{}
|
||||
|
||||
Reference in New Issue
Block a user