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

Skip to content

Commit 172ff08

Browse files
committed
Default to tolerating multiple package versions
Subpackages still need to use the $ANYVERSION trick
1 parent 12f35bc commit 172ff08

7 files changed

Lines changed: 53 additions & 53 deletions

go/ql/lib/ext/github.com.evanphx.json-patch.model.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ extensions:
33
pack: codeql/go-all
44
extensible: summaryModel
55
data:
6-
- ["github.com/evanphx/json-patch/$ANYVERSION", "", False, "CreateMergePatch", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
7-
- ["github.com/evanphx/json-patch/$ANYVERSION", "", False, "DecodePatch", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
8-
- ["github.com/evanphx/json-patch/$ANYVERSION", "", False, "MergeMergePatches", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
9-
- ["github.com/evanphx/json-patch/$ANYVERSION", "", False, "MergePatch", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
10-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "Apply", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
11-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "Apply", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
12-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "ApplyIndent", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
13-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "ApplyIndent", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
14-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "ApplyWithOptions", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
15-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "ApplyWithOptions", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
16-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "ApplyIndentWithOptions", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
17-
- ["github.com/evanphx/json-patch/$ANYVERSION", "Patch", True, "ApplyIndentWithOptions", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
6+
- ["github.com/evanphx/json-patch", "", False, "CreateMergePatch", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
7+
- ["github.com/evanphx/json-patch", "", False, "DecodePatch", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
8+
- ["github.com/evanphx/json-patch", "", False, "MergeMergePatches", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
9+
- ["github.com/evanphx/json-patch", "", False, "MergePatch", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
10+
- ["github.com/evanphx/json-patch", "Patch", True, "Apply", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
11+
- ["github.com/evanphx/json-patch", "Patch", True, "Apply", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
12+
- ["github.com/evanphx/json-patch", "Patch", True, "ApplyIndent", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
13+
- ["github.com/evanphx/json-patch", "Patch", True, "ApplyIndent", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
14+
- ["github.com/evanphx/json-patch", "Patch", True, "ApplyWithOptions", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
15+
- ["github.com/evanphx/json-patch", "Patch", True, "ApplyWithOptions", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
16+
- ["github.com/evanphx/json-patch", "Patch", True, "ApplyIndentWithOptions", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
17+
- ["github.com/evanphx/json-patch", "Patch", True, "ApplyIndentWithOptions", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]

go/ql/lib/ext/github.com.labstack.echo.model.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ extensions:
33
pack: codeql/go-all
44
extensible: summaryModel
55
data:
6-
- ["github.com/labstack/echo/$ANYVERSION", "Context", True, "Get", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
7-
- ["github.com/labstack/echo/$ANYVERSION", "Context", True, "Set", "", "", "Argument[1]", "Argument[-1]", "taint", "manual"]
6+
- ["github.com/labstack/echo", "Context", True, "Get", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
7+
- ["github.com/labstack/echo", "Context", True, "Set", "", "", "Argument[1]", "Argument[-1]", "taint", "manual"]

go/ql/lib/ext/gopkg.in.couchbase.gocb.model.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ extensions:
33
pack: codeql/go-all
44
extensible: summaryModel
55
data:
6-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "", False, "NewAnalyticsQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "", False, "NewN1qlQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
8-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "AnalyticsQuery", True, "ContextId", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
9-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "AnalyticsQuery", True, "Deferred", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
10-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "AnalyticsQuery", True, "Pretty", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
11-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "AnalyticsQuery", True, "Priority", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
12-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "AnalyticsQuery", True, "RawParam", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
13-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "AnalyticsQuery", True, "ServerSideTimeout", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
14-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "AdHoc", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
15-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "Consistency", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
16-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "ConsistentWith", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
17-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "Custom", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
18-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "PipelineBatch", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
19-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "PipelineCap", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
20-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "Profile", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
21-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "ReadOnly", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
22-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "ScanCap", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
23-
- ["gopkg.in/couchbase/gocb.$ANYVERSION", "N1qlQuery", True, "Timeout", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
6+
- ["gopkg.in/couchbase/gocb", "", False, "NewAnalyticsQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
7+
- ["gopkg.in/couchbase/gocb", "", False, "NewN1qlQuery", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
8+
- ["gopkg.in/couchbase/gocb", "AnalyticsQuery", True, "ContextId", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
9+
- ["gopkg.in/couchbase/gocb", "AnalyticsQuery", True, "Deferred", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
10+
- ["gopkg.in/couchbase/gocb", "AnalyticsQuery", True, "Pretty", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
11+
- ["gopkg.in/couchbase/gocb", "AnalyticsQuery", True, "Priority", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
12+
- ["gopkg.in/couchbase/gocb", "AnalyticsQuery", True, "RawParam", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
13+
- ["gopkg.in/couchbase/gocb", "AnalyticsQuery", True, "ServerSideTimeout", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
14+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "AdHoc", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
15+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "Consistency", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
16+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "ConsistentWith", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
17+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "Custom", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
18+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "PipelineBatch", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
19+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "PipelineCap", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
20+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "Profile", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
21+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "ReadOnly", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
22+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "ScanCap", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
23+
- ["gopkg.in/couchbase/gocb", "N1qlQuery", True, "Timeout", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]

go/ql/lib/ext/gopkg.in.macaron.model.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ extensions:
33
pack: codeql/go-all
44
extensible: summaryModel
55
data:
6-
- ["gopkg.in/macaron.$ANYVERSION", "RequestBody", True, "String", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
6+
- ["gopkg.in/macaron", "RequestBody", True, "String", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]

go/ql/lib/ext/gopkg.in.yaml.model.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ extensions:
33
pack: codeql/go-all
44
extensible: summaryModel
55
data:
6-
- ["gopkg.in/yaml.$ANYVERSION", "", False, "Marshal", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
7-
- ["gopkg.in/yaml.$ANYVERSION", "", False, "Unmarshal", "", "", "Argument[0]", "Argument[1]", "taint", "manual"]
8-
- ["gopkg.in/yaml.$ANYVERSION", "", False, "UnmarshalStrict", "", "", "Argument[0]", "Argument[1]", "taint", "manual"]
9-
- ["gopkg.in/yaml.$ANYVERSION", "", False, "NewDecoder", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
10-
- ["gopkg.in/yaml.$ANYVERSION", "Decoder", True, "Decode", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
11-
- ["gopkg.in/yaml.$ANYVERSION", "Encoder", True, "Encode", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]
12-
- ["gopkg.in/yaml.$ANYVERSION", "Node", True, "Decode", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
13-
- ["gopkg.in/yaml.$ANYVERSION", "Node", True, "Encode", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]
14-
- ["gopkg.in/yaml.$ANYVERSION", "Node", True, "SetString", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]
6+
- ["gopkg.in/yaml", "", False, "Marshal", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
7+
- ["gopkg.in/yaml", "", False, "Unmarshal", "", "", "Argument[0]", "Argument[1]", "taint", "manual"]
8+
- ["gopkg.in/yaml", "", False, "UnmarshalStrict", "", "", "Argument[0]", "Argument[1]", "taint", "manual"]
9+
- ["gopkg.in/yaml", "", False, "NewDecoder", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
10+
- ["gopkg.in/yaml", "Decoder", True, "Decode", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
11+
- ["gopkg.in/yaml", "Encoder", True, "Encode", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]
12+
- ["gopkg.in/yaml", "Node", True, "Decode", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
13+
- ["gopkg.in/yaml", "Node", True, "Encode", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]
14+
- ["gopkg.in/yaml", "Node", True, "SetString", "", "", "Argument[0]", "Argument[-1]", "taint", "manual"]

go/ql/lib/ext/k8s.io.api.core.model.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ extensions:
33
pack: codeql/go-all
44
extensible: summaryModel
55
data:
6-
- ["k8s.io/api/core/$ANYVERSION", "Secret", True, "DeepCopy", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
7-
- ["k8s.io/api/core/$ANYVERSION", "Secret", True, "DeepCopyInto", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
8-
- ["k8s.io/api/core/$ANYVERSION", "Secret", True, "DeepCopyObject", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
9-
- ["k8s.io/api/core/$ANYVERSION", "Secret", True, "Marshal", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
10-
- ["k8s.io/api/core/$ANYVERSION", "Secret", True, "Unmarshal", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
11-
- ["k8s.io/api/core/$ANYVERSION", "SecretList", True, "DeepCopy", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
12-
- ["k8s.io/api/core/$ANYVERSION", "SecretList", True, "DeepCopyInto", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
13-
- ["k8s.io/api/core/$ANYVERSION", "SecretList", True, "DeepCopyObject", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
14-
- ["k8s.io/api/core/$ANYVERSION", "SecretList", True, "Marshal", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
15-
- ["k8s.io/api/core/$ANYVERSION", "SecretList", True, "Unmarshal", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
6+
- ["k8s.io/api/core", "Secret", True, "DeepCopy", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
7+
- ["k8s.io/api/core", "Secret", True, "DeepCopyInto", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
8+
- ["k8s.io/api/core", "Secret", True, "DeepCopyObject", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
9+
- ["k8s.io/api/core", "Secret", True, "Marshal", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
10+
- ["k8s.io/api/core", "Secret", True, "Unmarshal", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
11+
- ["k8s.io/api/core", "SecretList", True, "DeepCopy", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
12+
- ["k8s.io/api/core", "SecretList", True, "DeepCopyInto", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]
13+
- ["k8s.io/api/core", "SecretList", True, "DeepCopyObject", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"]
14+
- ["k8s.io/api/core", "SecretList", True, "Marshal", "", "", "Argument[-1]", "ReturnValue[0]", "taint", "manual"]
15+
- ["k8s.io/api/core", "SecretList", True, "Unmarshal", "", "", "Argument[-1]", "Argument[0]", "taint", "manual"]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ private string interpretPackage(string p) {
270270
exists(string r | r = "([^$]+)([./]\\$ANYVERSION(/|$)(.*))?" |
271271
if exists(p.regexpCapture(r, 4))
272272
then result = package(p.regexpCapture(r, 1), p.regexpCapture(r, 4))
273-
else result = p
273+
else result = package(p, "")
274274
)
275275
}
276276

0 commit comments

Comments
 (0)