diff --git a/.github/workflows/compile-queries.yml b/.github/workflows/compile-queries.yml
index 64663e63aa0..bdcf0ba8d8a 100644
--- a/.github/workflows/compile-queries.yml
+++ b/.github/workflows/compile-queries.yml
@@ -2,11 +2,11 @@ name: "Compile all queries using the latest stable CodeQL CLI"
on:
push:
- branches: [main] # makes sure the cache gets populated
- pull_request:
- branches:
+ branches: # makes sure the cache gets populated - running on the branches people tend to merge into.
- main
- "rc/*"
+ - "codeql-cli-*"
+ pull_request:
jobs:
compile-queries:
@@ -14,37 +14,39 @@ jobs:
steps:
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
# calculate the merge-base with main, in a way that works both on PRs and pushes to main.
- name: Calculate merge-base
if: ${{ github.event_name == 'pull_request' }}
env:
BASE_BRANCH: ${{ github.base_ref }}
run: |
- MERGE_BASE=$(git merge-base --fork-point origin/$BASE_BRANCH)
+ MERGE_BASE=$(git cat-file commit $GITHUB_SHA | grep '^parent ' | head -1 | cut -f 2 -d " ")
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
- - name: Calculate merge-base - branch
- if: ${{ github.event_name != 'pull_request' }}
- # using github.sha instead, since we're directly on a branch, and not in a PR
- run: |
- MERGE_BASE=${{ github.sha }}
- echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
- - name: Cache CodeQL query compilation
+ - name: Read CodeQL query compilation - PR
+ if: ${{ github.event_name == 'pull_request' }}
uses: actions/cache@v3
with:
path: '*/ql/src/.cache'
- # current GH HEAD first, merge-base second, generic third
- key: codeql-stable-compile-${{ github.sha }}
+ key: codeql-compile-pr-${{ github.sha }} # deliberately not using the `compile-compile-main` keys here.
restore-keys: |
- codeql-stable-compile-${{ env.merge-base }}
- codeql-stable-compile-
+ codeql-compile-${{ github.base_ref }}-${{ env.merge-base }}
+ codeql-compile-${{ github.base_ref }}-
+ codeql-compile-main-
+ - name: Fill CodeQL query compilation cache - main
+ if: ${{ github.event_name != 'pull_request' }}
+ uses: actions/cache@v3
+ with:
+ path: '*/ql/src/.cache'
+ key: codeql-compile-${{ github.ref_name }}-${{ github.sha }} # just fill on main
+ restore-keys: | # restore from another random commit, to speed up compilation.
+ codeql-compile-${{ github.ref_name }}-
+ codeql-compile-main-
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
with:
channel: 'release'
- name: check formatting
- run: codeql query format */ql/{src,lib,test}/**/*.{qll,ql} --check-only
+ run: find */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 codeql query format --check-only
- name: compile queries - check-only
# run with --check-only if running in a PR (github.sha != main)
if : ${{ github.event_name == 'pull_request' }}
diff --git a/.github/workflows/js-ml-tests.yml b/.github/workflows/js-ml-tests.yml
index c932432530b..d3b5d49f2ba 100644
--- a/.github/workflows/js-ml-tests.yml
+++ b/.github/workflows/js-ml-tests.yml
@@ -23,19 +23,6 @@ defaults:
working-directory: javascript/ql/experimental/adaptivethreatmodeling
jobs:
- qlformat:
- name: Check QL formatting
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - uses: ./.github/actions/fetch-codeql
-
- - name: Check QL formatting
- run: |
- find . "(" -name "*.ql" -or -name "*.qll" ")" -print0 | \
- xargs -0 codeql query format --check-only
-
qlcompile:
name: Check QL compilation
runs-on: ubuntu-latest
diff --git a/.github/workflows/ql-for-ql-build.yml b/.github/workflows/ql-for-ql-build.yml
index 53a4157973d..701dc4d612c 100644
--- a/.github/workflows/ql-for-ql-build.yml
+++ b/.github/workflows/ql-for-ql-build.yml
@@ -24,13 +24,13 @@ jobs:
- uses: actions/checkout@v3
- name: Find codeql
id: find-codeql
- uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
+ uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
with:
languages: javascript # does not matter
- name: Get CodeQL version
id: get-codeql-version
run: |
- echo "::set-output name=version::$("${CODEQL}" --version | head -n 1 | rev | cut -d " " -f 1 | rev)"
+ echo "version=$("${CODEQL}" --version | head -n 1 | rev | cut -d " " -f 1 | rev)" >> $GITHUB_OUTPUT
shell: bash
env:
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
@@ -133,7 +133,7 @@ jobs:
env:
CONF: ./ql-for-ql-config.yml
- name: Initialize CodeQL
- uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
+ uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
with:
languages: ql
db-location: ${{ runner.temp }}/db
@@ -145,7 +145,7 @@ jobs:
PACK: ${{ runner.temp }}/pack
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
+ uses: github/codeql-action/analyze@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
with:
category: "ql-for-ql"
- name: Copy sarif file to CWD
diff --git a/.github/workflows/ql-for-ql-dataset_measure.yml b/.github/workflows/ql-for-ql-dataset_measure.yml
index f53c6a996f0..41f95a686ba 100644
--- a/.github/workflows/ql-for-ql-dataset_measure.yml
+++ b/.github/workflows/ql-for-ql-dataset_measure.yml
@@ -25,7 +25,7 @@ jobs:
- name: Find codeql
id: find-codeql
- uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
+ uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
with:
languages: javascript # does not matter
- uses: actions/cache@v3
diff --git a/.github/workflows/ql-for-ql-tests.yml b/.github/workflows/ql-for-ql-tests.yml
index 6bda6f1f8ae..b820d00a3e4 100644
--- a/.github/workflows/ql-for-ql-tests.yml
+++ b/.github/workflows/ql-for-ql-tests.yml
@@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- name: Find codeql
id: find-codeql
- uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
+ uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
with:
languages: javascript # does not matter
- uses: actions/cache@v3
diff --git a/.github/workflows/ruby-qltest.yml b/.github/workflows/ruby-qltest.yml
index 97235b722ba..125e2694fb0 100644
--- a/.github/workflows/ruby-qltest.yml
+++ b/.github/workflows/ruby-qltest.yml
@@ -28,13 +28,6 @@ defaults:
working-directory: ruby
jobs:
- qlformat:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: ./.github/actions/fetch-codeql
- - name: Check QL formatting
- run: find ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql query format --check-only
qlcompile:
runs-on: ubuntu-latest
steps:
diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml
index d51e77018c4..09e1c8a92f8 100644
--- a/.github/workflows/swift.yml
+++ b/.github/workflows/swift.yml
@@ -51,12 +51,14 @@ jobs:
- uses: actions/checkout@v3
- uses: ./swift/actions/create-extractor-pack
- uses: ./swift/actions/run-quick-tests
+ - uses: ./swift/actions/print-unextracted
build-and-test-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: ./swift/actions/create-extractor-pack
- uses: ./swift/actions/run-quick-tests
+ - uses: ./swift/actions/print-unextracted
qltests-linux:
needs: build-and-test-linux
runs-on: ubuntu-latest
@@ -110,12 +112,9 @@ jobs:
with:
name: swift-generated-cpp-files
path: swift/generated-cpp-files/**
- qlformat:
+ database-upgrade-scripts:
runs-on: ubuntu-latest
- needs: changes
- if: ${{ needs.changes.outputs.ql == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/fetch-codeql
- - name: Check QL formatting
- run: find swift/ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql query format --check-only
+ - uses: ./swift/actions/database-upgrade-scripts
diff --git a/config/identical-files.json b/config/identical-files.json
index 954931c2bba..20d7dbc3606 100644
--- a/config/identical-files.json
+++ b/config/identical-files.json
@@ -94,8 +94,8 @@
"csharp/ql/lib/semmle/code/csharp/dataflow/internal/rangeanalysis/SsaReadPositionCommon.qll"
],
"Model as Data Generation Java/C# - CaptureModels": [
- "java/ql/src/utils/model-generator/internal/CaptureModels.qll",
- "csharp/ql/src/utils/model-generator/internal/CaptureModels.qll"
+ "java/ql/src/utils/modelgenerator/internal/CaptureModels.qll",
+ "csharp/ql/src/utils/modelgenerator/internal/CaptureModels.qll"
],
"Sign Java/C#": [
"java/ql/lib/semmle/code/java/dataflow/internal/rangeanalysis/Sign.qll",
diff --git a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll
index dde16ab5a2a..f681e90aa21 100644
--- a/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll
+++ b/cpp/ql/lib/experimental/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll
@@ -136,6 +136,18 @@ module Consistency {
msg = "Local flow step does not preserve enclosing callable."
}
+ query predicate readStepIsLocal(Node n1, Node n2, string msg) {
+ readStep(n1, _, n2) and
+ nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
+ msg = "Read step does not preserve enclosing callable."
+ }
+
+ query predicate storeStepIsLocal(Node n1, Node n2, string msg) {
+ storeStep(n1, _, n2) and
+ nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
+ msg = "Store step does not preserve enclosing callable."
+ }
+
private DataFlowType typeRepr() { result = getNodeType(_) }
query predicate compatibleTypesReflexive(DataFlowType t, string msg) {
diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll
index dde16ab5a2a..f681e90aa21 100644
--- a/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll
+++ b/cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowImplConsistency.qll
@@ -136,6 +136,18 @@ module Consistency {
msg = "Local flow step does not preserve enclosing callable."
}
+ query predicate readStepIsLocal(Node n1, Node n2, string msg) {
+ readStep(n1, _, n2) and
+ nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
+ msg = "Read step does not preserve enclosing callable."
+ }
+
+ query predicate storeStepIsLocal(Node n1, Node n2, string msg) {
+ storeStep(n1, _, n2) and
+ nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
+ msg = "Store step does not preserve enclosing callable."
+ }
+
private DataFlowType typeRepr() { result = getNodeType(_) }
query predicate compatibleTypesReflexive(DataFlowType t, string msg) {
diff --git a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll
index dde16ab5a2a..f681e90aa21 100644
--- a/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll
+++ b/cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowImplConsistency.qll
@@ -136,6 +136,18 @@ module Consistency {
msg = "Local flow step does not preserve enclosing callable."
}
+ query predicate readStepIsLocal(Node n1, Node n2, string msg) {
+ readStep(n1, _, n2) and
+ nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
+ msg = "Read step does not preserve enclosing callable."
+ }
+
+ query predicate storeStepIsLocal(Node n1, Node n2, string msg) {
+ storeStep(n1, _, n2) and
+ nodeGetEnclosingCallable(n1) != nodeGetEnclosingCallable(n2) and
+ msg = "Store step does not preserve enclosing callable."
+ }
+
private DataFlowType typeRepr() { result = getNodeType(_) }
query predicate compatibleTypesReflexive(DataFlowType t, string msg) {
diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll
index 3d2eda59799..9ac92597b1a 100644
--- a/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll
+++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/StdString.qll
@@ -16,21 +16,23 @@ private class StdBasicString extends ClassTemplateInstantiation {
}
/**
- * Additional model for `std::string` constructors that reference the character
- * type of the container, or an iterator. For example construction from
- * iterators:
- * ```
- * std::string b(a.begin(), a.end());
- * ```
+ * The `std::basic_string::iterator` declaration.
*/
-private class StdStringConstructor extends Constructor, TaintFunction {
- StdStringConstructor() { this.getDeclaringType() instanceof StdBasicString }
+private class StdBasicStringIterator extends Iterator, Type {
+ StdBasicStringIterator() {
+ this.getEnclosingElement() instanceof StdBasicString and this.hasName("iterator")
+ }
+}
+/**
+ * A `std::string` function for which taint should be propagated.
+ */
+abstract private class StdStringTaintFunction extends TaintFunction {
/**
* Gets the index of a parameter to this function that is a string (or
* character).
*/
- int getAStringParameterIndex() {
+ final int getAStringParameterIndex() {
exists(Type paramType | paramType = this.getParameter(result).getUnspecifiedType() |
// e.g. `std::basic_string::CharT *`
paramType instanceof PointerType
@@ -41,15 +43,28 @@ private class StdStringConstructor extends Constructor, TaintFunction {
this.getDeclaringType().getTemplateArgument(2).(Type).getUnspecifiedType()
or
// i.e. `std::basic_string::CharT`
- this.getParameter(result).getUnspecifiedType() =
- this.getDeclaringType().getTemplateArgument(0).(Type).getUnspecifiedType()
+ paramType = this.getDeclaringType().getTemplateArgument(0).(Type).getUnspecifiedType()
)
}
/**
* Gets the index of a parameter to this function that is an iterator.
*/
- int getAnIteratorParameterIndex() { this.getParameter(result).getType() instanceof Iterator }
+ final int getAnIteratorParameterIndex() {
+ this.getParameter(result).getType() instanceof Iterator
+ }
+}
+
+/**
+ * Additional model for `std::string` constructors that reference the character
+ * type of the container, or an iterator. For example construction from
+ * iterators:
+ * ```
+ * std::string b(a.begin(), a.end());
+ * ```
+ */
+private class StdStringConstructor extends Constructor, StdStringTaintFunction {
+ StdStringConstructor() { this.getDeclaringType() instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
// taint flow from any parameter of the value type to the returned object
@@ -68,7 +83,7 @@ private class StdStringConstructor extends Constructor, TaintFunction {
/**
* The `std::string` function `c_str`.
*/
-private class StdStringCStr extends TaintFunction {
+private class StdStringCStr extends StdStringTaintFunction {
StdStringCStr() { this.getClassAndName("c_str") instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
@@ -81,7 +96,7 @@ private class StdStringCStr extends TaintFunction {
/**
* The `std::string` function `data`.
*/
-private class StdStringData extends TaintFunction {
+private class StdStringData extends StdStringTaintFunction {
StdStringData() { this.getClassAndName("data") instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
@@ -99,7 +114,7 @@ private class StdStringData extends TaintFunction {
/**
* The `std::string` function `push_back`.
*/
-private class StdStringPush extends TaintFunction {
+private class StdStringPush extends StdStringTaintFunction {
StdStringPush() { this.getClassAndName("push_back") instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
@@ -112,7 +127,7 @@ private class StdStringPush extends TaintFunction {
/**
* The `std::string` functions `front` and `back`.
*/
-private class StdStringFrontBack extends TaintFunction {
+private class StdStringFrontBack extends StdStringTaintFunction {
StdStringFrontBack() { this.getClassAndName(["front", "back"]) instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
@@ -125,7 +140,7 @@ private class StdStringFrontBack extends TaintFunction {
/**
* The (non-member) `std::string` function `operator+`.
*/
-private class StdStringPlus extends TaintFunction {
+private class StdStringPlus extends StdStringTaintFunction {
StdStringPlus() {
this.hasQualifiedName(["std", "bsl"], "operator+") and
this.getUnspecifiedType() instanceof StdBasicString
@@ -142,31 +157,15 @@ private class StdStringPlus extends TaintFunction {
}
/**
- * The `std::string` functions `operator+=`, `append`, `insert` and
- * `replace`. All of these functions combine the existing string
- * with a new string (or character) from one of the arguments.
+ * The `std::string` functions `operator+=`, `append` and `replace`.
+ * All of these functions combine the existing string with a new
+ * string (or character) from one of the arguments.
*/
-private class StdStringAppend extends TaintFunction {
+private class StdStringAppend extends StdStringTaintFunction {
StdStringAppend() {
- this.getClassAndName(["operator+=", "append", "insert", "replace"]) instanceof StdBasicString
+ this.getClassAndName(["operator+=", "append", "replace"]) instanceof StdBasicString
}
- /**
- * Gets the index of a parameter to this function that is a string (or
- * character).
- */
- int getAStringParameterIndex() {
- this.getParameter(result).getType() instanceof PointerType or // e.g. `std::basic_string::CharT *`
- this.getParameter(result).getType() instanceof ReferenceType or // e.g. `std::basic_string &`
- this.getParameter(result).getUnspecifiedType() =
- this.getDeclaringType().getTemplateArgument(0).(Type).getUnspecifiedType() // i.e. `std::basic_string::CharT`
- }
-
- /**
- * Gets the index of a parameter to this function that is an iterator.
- */
- int getAnIteratorParameterIndex() { this.getParameter(result).getType() instanceof Iterator }
-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
// flow from string and parameter to string (qualifier) and return value
(
@@ -186,28 +185,44 @@ private class StdStringAppend extends TaintFunction {
}
}
+/**
+ * The `std::string` function `insert`.
+ */
+private class StdStringInsert extends StdStringTaintFunction {
+ StdStringInsert() { this.getClassAndName("insert") instanceof StdBasicString }
+
+ /**
+ * Holds if the return type is an iterator.
+ */
+ predicate hasIteratorReturnValue() { this.getType() instanceof Iterator }
+
+ override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
+ // flow from string and parameter to string (qualifier) and return value
+ (
+ input.isQualifierObject() or
+ input.isParameterDeref(this.getAStringParameterIndex()) or
+ input.isParameter(this.getAnIteratorParameterIndex())
+ ) and
+ (
+ output.isQualifierObject()
+ or
+ if this.hasIteratorReturnValue() then output.isReturnValue() else output.isReturnValueDeref()
+ )
+ or
+ // reverse flow from returned reference to the qualifier (for writes to
+ // the result)
+ not this.hasIteratorReturnValue() and
+ input.isReturnValueDeref() and
+ output.isQualifierObject()
+ }
+}
+
/**
* The standard function `std::string.assign`.
*/
-private class StdStringAssign extends TaintFunction {
+private class StdStringAssign extends StdStringTaintFunction {
StdStringAssign() { this.getClassAndName("assign") instanceof StdBasicString }
- /**
- * Gets the index of a parameter to this function that is a string (or
- * character).
- */
- int getAStringParameterIndex() {
- this.getParameter(result).getType() instanceof PointerType or // e.g. `std::basic_string::CharT *`
- this.getParameter(result).getType() instanceof ReferenceType or // e.g. `std::basic_string &`
- this.getParameter(result).getUnspecifiedType() =
- this.getDeclaringType().getTemplateArgument(0).(Type).getUnspecifiedType() // i.e. `std::basic_string::CharT`
- }
-
- /**
- * Gets the index of a parameter to this function that is an iterator.
- */
- int getAnIteratorParameterIndex() { this.getParameter(result).getType() instanceof Iterator }
-
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
// flow from parameter to string itself (qualifier) and return value
(
@@ -229,7 +244,7 @@ private class StdStringAssign extends TaintFunction {
/**
* The standard function `std::string.copy`.
*/
-private class StdStringCopy extends TaintFunction {
+private class StdStringCopy extends StdStringTaintFunction {
StdStringCopy() { this.getClassAndName("copy") instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
@@ -242,7 +257,7 @@ private class StdStringCopy extends TaintFunction {
/**
* The standard function `std::string.substr`.
*/
-private class StdStringSubstr extends TaintFunction {
+private class StdStringSubstr extends StdStringTaintFunction {
StdStringSubstr() { this.getClassAndName("substr") instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
@@ -255,7 +270,7 @@ private class StdStringSubstr extends TaintFunction {
/**
* The `std::string` functions `at` and `operator[]`.
*/
-private class StdStringAt extends TaintFunction {
+private class StdStringAt extends StdStringTaintFunction {
StdStringAt() { this.getClassAndName(["at", "operator[]"]) instanceof StdBasicString }
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
diff --git a/cpp/ql/lib/semmle/code/cpp/models/implementations/Strcat.qll b/cpp/ql/lib/semmle/code/cpp/models/implementations/Strcat.qll
index e729c3cb0a4..7e55868b847 100644
--- a/cpp/ql/lib/semmle/code/cpp/models/implementations/Strcat.qll
+++ b/cpp/ql/lib/semmle/code/cpp/models/implementations/Strcat.qll
@@ -50,19 +50,18 @@ class StrcatFunction extends TaintFunction, DataFlowFunction, ArrayFunction, Sid
}
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
- this.getName() = ["strncat", "wcsncat", "_mbsncat", "_mbsncat_l"] and
- input.isParameter(2) and
- output.isParameterDeref(0)
- or
- this.getName() = ["_mbsncat_l", "_mbsnbcat_l"] and
- input.isParameter(3) and
- output.isParameterDeref(0)
- or
- input.isParameterDeref(0) and
- output.isParameterDeref(0)
- or
- input.isParameterDeref(1) and
- output.isParameterDeref(0)
+ (
+ this.getName() = ["strncat", "wcsncat", "_mbsncat", "_mbsncat_l"] and
+ input.isParameter(2)
+ or
+ this.getName() = ["_mbsncat_l", "_mbsnbcat_l"] and
+ input.isParameter(3)
+ or
+ input.isParameterDeref(0)
+ or
+ input.isParameterDeref(1)
+ ) and
+ (output.isParameterDeref(0) or output.isReturnValueDeref())
}
override predicate hasArrayInput(int param) {
diff --git a/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql b/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql
index f9aa87c684a..5b539faa5b4 100644
--- a/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql
+++ b/cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql
@@ -13,11 +13,18 @@
import cpp
-from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given
+from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given, string ffcName
where
ffc = fl.getUse() and
expected = fl.getNumArgNeeded() and
given = ffc.getNumFormatArgument() and
expected < given and
- fl.specsAreKnown()
-select ffc, "Format expects " + expected.toString() + " arguments but given " + given.toString()
+ fl.specsAreKnown() and
+ (
+ if ffc.isInMacroExpansion()
+ then ffcName = ffc.getTarget().getName() + " (in a macro expansion)"
+ else ffcName = ffc.getTarget().getName()
+ )
+select ffc,
+ "Format for " + ffcName + " expects " + expected.toString() + " arguments but given " +
+ given.toString()
diff --git a/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql b/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql
index cc3510ee5eb..1deb9493ca3 100644
--- a/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql
+++ b/cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql
@@ -16,11 +16,18 @@
import cpp
-from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given
+from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given, string ffcName
where
ffc = fl.getUse() and
expected = fl.getNumArgNeeded() and
given = ffc.getNumFormatArgument() and
expected > given and
- fl.specsAreKnown()
-select ffc, "Format expects " + expected.toString() + " arguments but given " + given.toString()
+ fl.specsAreKnown() and
+ (
+ if ffc.isInMacroExpansion()
+ then ffcName = ffc.getTarget().getName() + " (in a macro expansion)"
+ else ffcName = ffc.getTarget().getName()
+ )
+select ffc,
+ "Format for " + ffcName + " expects " + expected.toString() + " arguments but given " +
+ given.toString()
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected
index 6b24d8bdbc6..8c15a1cbcb9 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected
@@ -6,6 +6,8 @@ uniqueNodeToString
missingToString
parameterCallable
localFlowIsLocal
+readStepIsLocal
+storeStepIsLocal
compatibleTypesReflexive
unreachableNodeCCtx
localCallNodes
@@ -87,4 +89,7 @@ postWithInFlow
| test.cpp:465:3:465:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:465:4:465:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:470:22:470:22 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:499:3:499:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:499:4:499:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:505:35:505:35 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
viableImplInCallContextTooLarge
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected
index 929b5b69bc4..ea2f4ae0d29 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected
@@ -21,6 +21,8 @@ uniqueNodeToString
missingToString
parameterCallable
localFlowIsLocal
+readStepIsLocal
+storeStepIsLocal
compatibleTypesReflexive
unreachableNodeCCtx
localCallNodes
@@ -582,6 +584,13 @@ postWithInFlow
| test.cpp:489:7:489:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:491:5:491:5 | x [post update] | PostUpdateNode should not be the target of local flow. |
| test.cpp:494:5:494:5 | x [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:499:3:499:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:499:4:499:4 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:499:4:499:4 | p [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:504:7:504:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:505:34:505:35 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:505:34:505:35 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
+| test.cpp:505:35:505:35 | x [post update] | PostUpdateNode should not be the target of local flow. |
| true_upon_entry.cpp:9:7:9:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
| true_upon_entry.cpp:10:12:10:12 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
| true_upon_entry.cpp:10:27:10:27 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
index c22f0017a06..2d0443e2aa8 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp
@@ -494,3 +494,14 @@ void regression_with_phi_flow(int clean1) {
x = source();
}
}
+
+int intOutparamSourceMissingReturn(int *p) {
+ *p = source();
+ // return deliberately omitted to test IR dataflow behavior
+}
+
+void viaOutparamMissingReturn() {
+ int x = 0;
+ intOutparamSourceMissingReturn(&x);
+ sink(x); // $ ast,ir
+}
diff --git a/cpp/ql/test/library-tests/dataflow/dataflow-tests/true_upon_entry.cpp b/cpp/ql/test/library-tests/dataflow/dataflow-tests/true_upon_entry.cpp
index d08e8b1ded3..923a7c0513d 100644
--- a/cpp/ql/test/library-tests/dataflow/dataflow-tests/true_upon_entry.cpp
+++ b/cpp/ql/test/library-tests/dataflow/dataflow-tests/true_upon_entry.cpp
@@ -5,7 +5,7 @@ int source();
void sink(...);
bool random();
-int test1() {
+void test1() {
int x = source();
for (int i = 0; i < 10; i++) {
x = 0;
@@ -13,7 +13,7 @@ int test1() {
sink(x); // $ SPURIOUS: ir
}
-int test2(int iterations) {
+void test2(int iterations) {
int x = source();
for (int i = 0; i < iterations; i++) {
x = 0;
@@ -21,7 +21,7 @@ int test2(int iterations) {
sink(x); // $ ast,ir
}
-int test3() {
+void test3() {
int x = 0;
for (int i = 0; i < 10; i++) {
x = source();
@@ -29,7 +29,7 @@ int test3() {
sink(x); // $ ast,ir
}
-int test4() {
+void test4() {
int x = source();
for (int i = 0; i < 10; i++) {
if (random())
@@ -39,7 +39,7 @@ int test4() {
sink(x); // $ ast,ir
}
-int test5() {
+void test5() {
int x = source();
for (int i = 0; i < 10; i++) {
if (random())
@@ -49,7 +49,7 @@ int test5() {
sink(x); // $ ast,ir
}
-int test6() {
+void test6() {
int y;
int x = source();
for (int i = 0; i < 10 && (y = 1); i++) {
@@ -57,7 +57,7 @@ int test6() {
sink(x); // $ ast,ir
}
-int test7() {
+void test7() {
int y;
int x = source();
for (int i = 0; i < 10 && (y = 1); i++) {
@@ -66,7 +66,7 @@ int test7() {
sink(x); // $ SPURIOUS: ir
}
-int test8() {
+void test8() {
int x = source();
// It appears to the analysis that the condition can exit after `i < 10`
// without having assigned to `x`. That is an effect of how the
@@ -78,7 +78,7 @@ int test8() {
sink(x); // $ SPURIOUS: ast,ir
}
-int test9() {
+void test9() {
int y;
int x = source();
for (int i = 0; (y = 1) && i < 10; i++) {
@@ -86,21 +86,21 @@ int test9() {
sink(x); // $ ast,ir
}
-int test10() {
+void test10() {
int x = source();
for (int i = 0; (x = 1) && i < 10; i++) {
}
sink(x); // no flow
}
-int test10(int b, int d) {
+void test10(int b, int d) {
int i = 0;
int x = source();
if (b)
goto L;
for (; i < 10; i += d) {
x = 0;
- L:
+ L: ;
}
sink(x); // $ ir MISSING: ast
}
diff --git a/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected b/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected
index f66ef23ba74..8a9e15049fc 100644
--- a/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected
+++ b/cpp/ql/test/library-tests/dataflow/fields/dataflow-consistency.expected
@@ -12,6 +12,8 @@ uniqueNodeToString
missingToString
parameterCallable
localFlowIsLocal
+readStepIsLocal
+storeStepIsLocal
compatibleTypesReflexive
unreachableNodeCCtx
localCallNodes
diff --git a/cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected b/cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected
index 4dee8fb627f..c1b3d0c66b7 100644
--- a/cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected
+++ b/cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected
@@ -15,6 +15,8 @@ uniqueNodeToString
missingToString
parameterCallable
localFlowIsLocal
+readStepIsLocal
+storeStepIsLocal
compatibleTypesReflexive
unreachableNodeCCtx
localCallNodes
diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/bsd.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/bsd.cpp
index fe138a8d8fc..0ef3355f1db 100644
--- a/cpp/ql/test/library-tests/dataflow/taint-tests/bsd.cpp
+++ b/cpp/ql/test/library-tests/dataflow/taint-tests/bsd.cpp
@@ -9,7 +9,7 @@ struct sockaddr {
char* sa_data;
};
-int accept(int, const sockaddr*, int*);
+int accept(int, sockaddr*, int*);
void sink(sockaddr);
@@ -20,5 +20,5 @@ void test_accept() {
int a = accept(s, &addr, &size);
sink(a); // $ ast=17:11 ir SPURIOUS: ast=18:12
- sink(addr); // $ ast,ir
+ sink(addr); // $ ast=17:11 ir SPURIOUS: ast=18:12
}
diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
index 07bf9a85cf4..1bd40e4e5f1 100644
--- a/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
+++ b/cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected
@@ -142,9 +142,14 @@
| bsd.cpp:19:14:19:29 | sizeof(sockaddr) | bsd.cpp:20:29:20:32 | size | |
| bsd.cpp:20:11:20:16 | call to accept | bsd.cpp:22:8:22:8 | a | |
| bsd.cpp:20:18:20:18 | s | bsd.cpp:20:11:20:16 | call to accept | TAINT |
+| bsd.cpp:20:18:20:18 | s | bsd.cpp:20:21:20:25 | ref arg & ... | TAINT |
| bsd.cpp:20:21:20:25 | & ... | bsd.cpp:20:11:20:16 | call to accept | TAINT |
+| bsd.cpp:20:21:20:25 | & ... | bsd.cpp:20:21:20:25 | ref arg & ... | TAINT |
+| bsd.cpp:20:21:20:25 | ref arg & ... | bsd.cpp:20:22:20:25 | addr [inner post update] | |
+| bsd.cpp:20:21:20:25 | ref arg & ... | bsd.cpp:23:8:23:11 | addr | |
| bsd.cpp:20:22:20:25 | addr | bsd.cpp:20:11:20:16 | call to accept | TAINT |
| bsd.cpp:20:22:20:25 | addr | bsd.cpp:20:21:20:25 | & ... | |
+| bsd.cpp:20:22:20:25 | addr | bsd.cpp:20:21:20:25 | ref arg & ... | TAINT |
| bsd.cpp:20:28:20:32 | ref arg & ... | bsd.cpp:20:29:20:32 | size [inner post update] | |
| bsd.cpp:20:29:20:32 | size | bsd.cpp:20:28:20:32 | & ... | |
| constructor_delegation.cpp:8:2:8:8 | this | constructor_delegation.cpp:8:20:8:24 | constructor init of field x [pre-this] | |
@@ -5964,6 +5969,7 @@
| taint.cpp:172:10:172:15 | buffer | taint.cpp:172:3:172:8 | call to strcat | |
| taint.cpp:172:10:172:15 | buffer | taint.cpp:172:10:172:15 | ref arg buffer | TAINT |
| taint.cpp:172:10:172:15 | ref arg buffer | taint.cpp:173:8:173:13 | buffer | |
+| taint.cpp:172:18:172:24 | tainted | taint.cpp:172:3:172:8 | call to strcat | TAINT |
| taint.cpp:172:18:172:24 | tainted | taint.cpp:172:10:172:15 | ref arg buffer | TAINT |
| taint.cpp:180:19:180:19 | p | taint.cpp:180:19:180:19 | p | |
| taint.cpp:180:19:180:19 | p | taint.cpp:181:9:181:9 | p | |
@@ -6373,12 +6379,14 @@
| taint.cpp:561:9:561:13 | dest1 | taint.cpp:561:9:561:13 | ref arg dest1 | TAINT |
| taint.cpp:561:9:561:13 | ref arg dest1 | taint.cpp:560:24:560:28 | dest1 | |
| taint.cpp:561:9:561:13 | ref arg dest1 | taint.cpp:562:7:562:11 | dest1 | |
+| taint.cpp:561:16:561:21 | source | taint.cpp:561:2:561:7 | call to strcat | TAINT |
| taint.cpp:561:16:561:21 | source | taint.cpp:561:9:561:13 | ref arg dest1 | TAINT |
| taint.cpp:562:7:562:11 | ref arg dest1 | taint.cpp:560:24:560:28 | dest1 | |
| taint.cpp:564:9:564:13 | dest2 | taint.cpp:564:2:564:7 | call to strcat | |
| taint.cpp:564:9:564:13 | dest2 | taint.cpp:564:9:564:13 | ref arg dest2 | TAINT |
| taint.cpp:564:9:564:13 | ref arg dest2 | taint.cpp:560:37:560:41 | dest2 | |
| taint.cpp:564:9:564:13 | ref arg dest2 | taint.cpp:565:7:565:11 | dest2 | |
+| taint.cpp:564:16:564:20 | clean | taint.cpp:564:2:564:7 | call to strcat | TAINT |
| taint.cpp:564:16:564:20 | clean | taint.cpp:564:9:564:13 | ref arg dest2 | TAINT |
| taint.cpp:565:7:565:11 | ref arg dest2 | taint.cpp:560:37:560:41 | dest2 | |
| taint.cpp:572:37:572:41 | dest1 | taint.cpp:572:37:572:41 | dest1 | |
@@ -6405,9 +6413,12 @@
| taint.cpp:574:36:574:40 | ref arg dest1 | taint.cpp:572:37:572:41 | dest1 | |
| taint.cpp:574:36:574:40 | ref arg dest1 | taint.cpp:575:7:575:11 | dest1 | |
| taint.cpp:574:36:574:40 | ref arg dest1 | taint.cpp:576:8:576:12 | dest1 | |
+| taint.cpp:574:43:574:45 | ptr | taint.cpp:574:25:574:34 | call to _mbsncat_l | TAINT |
| taint.cpp:574:43:574:45 | ptr | taint.cpp:574:36:574:40 | ref arg dest1 | TAINT |
+| taint.cpp:574:48:574:48 | n | taint.cpp:574:25:574:34 | call to _mbsncat_l | TAINT |
| taint.cpp:574:48:574:48 | n | taint.cpp:574:36:574:40 | ref arg dest1 | TAINT |
| taint.cpp:574:51:574:56 | ref arg source | taint.cpp:573:49:573:54 | source | |
+| taint.cpp:574:51:574:56 | source | taint.cpp:574:25:574:34 | call to _mbsncat_l | TAINT |
| taint.cpp:574:51:574:56 | source | taint.cpp:574:36:574:40 | ref arg dest1 | TAINT |
| taint.cpp:575:7:575:11 | ref arg dest1 | taint.cpp:572:37:572:41 | dest1 | |
| taint.cpp:575:7:575:11 | ref arg dest1 | taint.cpp:576:8:576:12 | dest1 | |
@@ -6421,8 +6432,11 @@
| taint.cpp:580:36:580:40 | ref arg dest3 | taint.cpp:572:85:572:89 | dest3 | |
| taint.cpp:580:36:580:40 | ref arg dest3 | taint.cpp:581:7:581:11 | dest3 | |
| taint.cpp:580:36:580:40 | ref arg dest3 | taint.cpp:582:8:582:12 | dest3 | |
+| taint.cpp:580:43:580:45 | ptr | taint.cpp:580:25:580:34 | call to _mbsncat_l | TAINT |
| taint.cpp:580:43:580:45 | ptr | taint.cpp:580:36:580:40 | ref arg dest3 | TAINT |
+| taint.cpp:580:48:580:48 | n | taint.cpp:580:25:580:34 | call to _mbsncat_l | TAINT |
| taint.cpp:580:48:580:48 | n | taint.cpp:580:36:580:40 | ref arg dest3 | TAINT |
+| taint.cpp:580:51:580:55 | clean | taint.cpp:580:25:580:34 | call to _mbsncat_l | TAINT |
| taint.cpp:580:51:580:55 | clean | taint.cpp:580:36:580:40 | ref arg dest3 | TAINT |
| taint.cpp:580:51:580:55 | ref arg clean | taint.cpp:573:32:573:36 | clean | |
| taint.cpp:581:7:581:11 | ref arg dest3 | taint.cpp:572:85:572:89 | dest3 | |
diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp
index 2ae093098d2..0271b8205e4 100644
--- a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp
+++ b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp
@@ -574,8 +574,8 @@ void test__mbsncat_l(unsigned char* dest1, unsigned const char* ptr, unsigned ch
unsigned char* dest2 = _mbsncat_l(dest1, ptr, n, source);
sink(dest1); // $ SPURIOUS: ast,ir
sink(*dest1); // $ ast,ir
- sink(dest2); // $ SPURIOUS: ir
- sink(*dest2); // $ ir
+ sink(dest2); // $ SPURIOUS: ast,ir
+ sink(*dest2); // $ ast,ir
unsigned char* dest4 = _mbsncat_l(dest3, ptr, n, clean);
sink(dest3);
diff --git a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql
index bd513adcef2..d7ae0f88732 100644
--- a/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql
+++ b/cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql
@@ -95,16 +95,7 @@ module IRTest {
override predicate isSink(DataFlow::Node sink) {
exists(FunctionCall call |
call.getTarget().getName() = "sink" and
- sink.asConvertedExpr() = call.getAnArgument()
- or
- call.getTarget().getName() = "sink" and
- sink.asExpr() = call.getAnArgument() and
- sink.asConvertedExpr() instanceof ReferenceDereferenceExpr
- )
- or
- exists(ReadSideEffectInstruction read |
- read.getSideEffectOperand() = sink.asOperand() and
- read.getPrimaryInstruction().(CallInstruction).getStaticCallTarget().hasName("sink")
+ sink.asExpr() = call.getAnArgument()
)
}
diff --git a/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected
index 086fa0415b7..1980b113311 100644
--- a/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected
+++ b/cpp/ql/test/library-tests/syntax-zoo/dataflow-consistency.expected
@@ -52,6 +52,8 @@ uniqueNodeToString
missingToString
parameterCallable
localFlowIsLocal
+readStepIsLocal
+storeStepIsLocal
compatibleTypesReflexive
unreachableNodeCCtx
localCallNodes
diff --git a/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected b/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected
index 70f8446ec5a..26abe41c33f 100644
--- a/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected
+++ b/cpp/ql/test/library-tests/syntax-zoo/dataflow-ir-consistency.expected
@@ -1463,6 +1463,8 @@ uniqueNodeToString
missingToString
parameterCallable
localFlowIsLocal
+readStepIsLocal
+storeStepIsLocal
compatibleTypesReflexive
unreachableNodeCCtx
localCallNodes
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/TooManyFormatArguments.expected b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/TooManyFormatArguments.expected
index 89a7719e741..368f63c55e8 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/TooManyFormatArguments.expected
+++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/TooManyFormatArguments.expected
@@ -1,14 +1,14 @@
-| a.c:18:3:18:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 2 |
-| b.c:15:3:15:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 2 |
-| c.c:7:3:7:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 2 |
-| custom_printf.cpp:31:5:31:12 | call to myPrintf | Format expects 2 arguments but given 3 |
-| macros.cpp:12:2:12:31 | call to printf | Format expects 2 arguments but given 3 |
-| macros.cpp:16:2:16:30 | call to printf | Format expects 2 arguments but given 3 |
-| test.c:7:2:7:7 | call to printf | Format expects 0 arguments but given 1 |
-| test.c:21:2:21:7 | call to printf | Format expects 2 arguments but given 3 |
-| test.c:27:3:27:8 | call to printf | Format expects 2 arguments but given 3 |
-| test.c:31:3:31:8 | call to printf | Format expects 1 arguments but given 3 |
-| test.c:32:3:32:8 | call to printf | Format expects 1 arguments but given 2 |
-| test.c:39:3:39:8 | call to printf | Format expects 2 arguments but given 5 |
-| test.c:40:3:40:8 | call to printf | Format expects 2 arguments but given 4 |
-| test.c:41:3:41:8 | call to printf | Format expects 2 arguments but given 3 |
+| a.c:18:3:18:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 2 |
+| b.c:15:3:15:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 2 |
+| c.c:7:3:7:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 2 |
+| custom_printf.cpp:31:5:31:12 | call to myPrintf | Format for myPrintf expects 2 arguments but given 3 |
+| macros.cpp:12:2:12:31 | call to printf | Format for printf (in a macro expansion) expects 2 arguments but given 3 |
+| macros.cpp:16:2:16:30 | call to printf | Format for printf (in a macro expansion) expects 2 arguments but given 3 |
+| test.c:7:2:7:7 | call to printf | Format for printf expects 0 arguments but given 1 |
+| test.c:21:2:21:7 | call to printf | Format for printf expects 2 arguments but given 3 |
+| test.c:27:3:27:8 | call to printf | Format for printf expects 2 arguments but given 3 |
+| test.c:31:3:31:8 | call to printf | Format for printf expects 1 arguments but given 3 |
+| test.c:32:3:32:8 | call to printf | Format for printf expects 1 arguments but given 2 |
+| test.c:39:3:39:8 | call to printf | Format for printf expects 2 arguments but given 5 |
+| test.c:40:3:40:8 | call to printf | Format for printf expects 2 arguments but given 4 |
+| test.c:41:3:41:8 | call to printf | Format for printf expects 2 arguments but given 3 |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected
index b255838183f..d6897f1bddd 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected
+++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/WrongNumberOfFormatArguments.expected
@@ -1,11 +1,12 @@
-| a.c:16:3:16:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 0 |
-| b.c:13:3:13:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 0 |
-| c.c:5:3:5:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 0 |
-| custom_printf.cpp:29:5:29:12 | call to myPrintf | Format expects 2 arguments but given 1 |
-| macros.cpp:14:2:14:37 | call to printf | Format expects 4 arguments but given 3 |
-| macros.cpp:21:2:21:36 | call to printf | Format expects 4 arguments but given 3 |
-| test.c:9:2:9:7 | call to printf | Format expects 1 arguments but given 0 |
-| test.c:12:2:12:7 | call to printf | Format expects 2 arguments but given 1 |
-| test.c:15:2:15:7 | call to printf | Format expects 3 arguments but given 2 |
-| test.c:19:2:19:7 | call to printf | Format expects 2 arguments but given 1 |
-| test.c:29:3:29:8 | call to printf | Format expects 2 arguments but given 1 |
+| a.c:16:3:16:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 0 |
+| b.c:13:3:13:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 0 |
+| c.c:5:3:5:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 0 |
+| custom_printf.cpp:29:5:29:12 | call to myPrintf | Format for myPrintf expects 2 arguments but given 1 |
+| macros.cpp:14:2:14:37 | call to printf | Format for printf (in a macro expansion) expects 4 arguments but given 3 |
+| macros.cpp:21:2:21:36 | call to printf | Format for printf (in a macro expansion) expects 4 arguments but given 3 |
+| macros.cpp:32:2:32:25 | call to printf | Format for printf (in a macro expansion) expects 1 arguments but given 0 |
+| test.c:9:2:9:7 | call to printf | Format for printf expects 1 arguments but given 0 |
+| test.c:12:2:12:7 | call to printf | Format for printf expects 2 arguments but given 1 |
+| test.c:15:2:15:7 | call to printf | Format for printf expects 3 arguments but given 2 |
+| test.c:19:2:19:7 | call to printf | Format for printf expects 2 arguments but given 1 |
+| test.c:29:3:29:8 | call to printf | Format for printf expects 2 arguments but given 1 |
diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/macros.cpp b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/macros.cpp
index 01ddf7c24ca..4d8257b776b 100644
--- a/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/macros.cpp
+++ b/cpp/ql/test/query-tests/Likely Bugs/Format/WrongNumberOfFormatArguments/macros.cpp
@@ -13,10 +13,21 @@ void testMacros(int a, int b, int c)
GOODPRINTF("%i %i %i\n", a, b, c); // GOOD
GOODPRINTF("%i %i %i %i\n", a, b, c); // BAD: too few format arguments
- BADPRINTF("%i %i\n", a, b, 0); // BAD: too many format arguments
+ BADPRINTF("%i %i\n", a, b, 0); // DUBIOUS: too many format arguments
// ^ here there are too many format arguments, but the design of the Macro forces the user
// to do this, and the extra argument is harmlessly ignored in practice. Reporting these
// results can be extremely noisy (e.g. in openldap).
BADPRINTF("%i %i %i\n", a, b, c); // GOOD
BADPRINTF("%i %i %i %i\n", a, b, c); // BAD: too few format arguments
}
+
+#define DOTHING(x) \
+ printf("doing thing: " #x); x
+
+void testMacros2()
+{
+ int x;
+
+ DOTHING(x++); // GOOD
+ DOTHING(printf("%i", x)); // BAD: the printf inside the macro has too few format arguments
+}
diff --git a/csharp/documentation/library-coverage/coverage.csv b/csharp/documentation/library-coverage/coverage.csv
index 6ab77f6aba6..5d0813f71e9 100644
--- a/csharp/documentation/library-coverage/coverage.csv
+++ b/csharp/documentation/library-coverage/coverage.csv
@@ -24,5 +24,5 @@ Microsoft.Win32,,,8,,,,,,,,,,,,8,
MySql.Data.MySqlClient,48,,,,,,,,,,48,,,,,
Newtonsoft.Json,,,91,,,,,,,,,,,,73,18
ServiceStack,194,,7,27,,,,,,75,92,,,,7,
-System,65,4,12131,,8,8,9,,4,,33,3,1,3,10139,1992
+System,65,4,12142,,8,8,9,,4,,33,3,1,3,10151,1991
Windows.Security.Cryptography.Core,1,,,,,,,1,,,,,,,,
diff --git a/csharp/documentation/library-coverage/coverage.rst b/csharp/documentation/library-coverage/coverage.rst
index 0f3dce2941a..fa178752fe3 100644
--- a/csharp/documentation/library-coverage/coverage.rst
+++ b/csharp/documentation/library-coverage/coverage.rst
@@ -8,7 +8,7 @@ C# framework & library support
Framework / library,Package,Flow sources,Taint & value steps,Sinks (total),`CWE-079` :sub:`Cross-site scripting`
`ServiceStack `_,"``ServiceStack.*``, ``ServiceStack``",,7,194,
- System,"``System.*``, ``System``",4,12131,65,7
+ System,"``System.*``, ``System``",4,12142,65,7
Others,"``Dapper``, ``JsonToItemsTaskFactory``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NETCore.Platforms.BuildTasks``, ``Microsoft.VisualBasic``, ``Microsoft.Win32``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``Windows.Security.Cryptography.Core``",,556,138,
- Totals,,4,12694,397,7
+ Totals,,4,12705,397,7
diff --git a/csharp/ql/consistency-queries/SsaConsistency.ql b/csharp/ql/consistency-queries/SsaConsistency.ql
index 71f88bf2ab0..bd666a71e49 100644
--- a/csharp/ql/consistency-queries/SsaConsistency.ql
+++ b/csharp/ql/consistency-queries/SsaConsistency.ql
@@ -1,8 +1,8 @@
import csharp
-import semmle.code.csharp.dataflow.internal.SsaImpl::Consistency as Consistency
+import semmle.code.csharp.dataflow.internal.SsaImpl::Consistency
import Ssa
-class MyRelevantDefinition extends Consistency::RelevantDefinition, Ssa::Definition {
+class MyRelevantDefinition extends RelevantDefinition, Ssa::Definition {
override predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
@@ -10,14 +10,6 @@ class MyRelevantDefinition extends Consistency::RelevantDefinition, Ssa::Definit
}
}
-query predicate nonUniqueDef = Consistency::nonUniqueDef/4;
-
-query predicate readWithoutDef = Consistency::readWithoutDef/3;
-
-query predicate deadDef = Consistency::deadDef/2;
-
-query predicate notDominatedByDef = Consistency::notDominatedByDef/4;
-
query predicate localDeclWithSsaDef(LocalVariableDeclExpr d) {
// Local variables in C# must be initialized before every use, so uninitialized
// local variables should not have an SSA definition, as that would imply that
diff --git a/csharp/ql/lib/change-notes/2022-11-09-modelsasdataextensions.md b/csharp/ql/lib/change-notes/2022-11-09-modelsasdataextensions.md
new file mode 100644
index 00000000000..1c9bb14754d
--- /dev/null
+++ b/csharp/ql/lib/change-notes/2022-11-09-modelsasdataextensions.md
@@ -0,0 +1,4 @@
+---
+category: minorAnalysis
+---
+* The `[Summary|Sink|Source]ModelCsv` classes have been deprecated and Models as Data models are defined as data extensions instead.
\ No newline at end of file
diff --git a/csharp/ql/lib/ext/Dapper.model.yml b/csharp/ql/lib/ext/Dapper.model.yml
new file mode 100644
index 00000000000..949bc007574
--- /dev/null
+++ b/csharp/ql/lib/ext/Dapper.model.yml
@@ -0,0 +1,60 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSinkModel
+ data:
+ - ["Dapper", "SqlMapper", False, "Execute", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteReader", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteReaderAsync", "(System.Data.DbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteReaderAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteScalar", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteScalar<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteScalarAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "ExecuteScalarAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<,,,,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<,,,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<,,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "Query<>", "(System.Data.IDbConnection,System.String,System.Type[],System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<,,,,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<,,,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<,,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<,,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<,,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<,,>", "(System.Data.IDbConnection,System.String,System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryAsync<>", "(System.Data.IDbConnection,System.String,System.Type[],System.Func,System.Object,System.Data.IDbTransaction,System.Boolean,System.String,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirst", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirst", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirst<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstAsync", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstOrDefault", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstOrDefault", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstOrDefault<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstOrDefaultAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstOrDefaultAsync", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryFirstOrDefaultAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryMultiple", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QueryMultipleAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingle", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingle", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingle<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleAsync", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleOrDefault", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleOrDefault", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleOrDefault<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleOrDefaultAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleOrDefaultAsync", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[2]", "sql", "manual"]
+ - ["Dapper", "SqlMapper", False, "QuerySingleOrDefaultAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Data.IDbTransaction,System.Nullable,System.Nullable)", "", "Argument[1]", "sql", "manual"]
diff --git a/csharp/ql/lib/ext/Microsoft.ApplicationBlocks.Data.model.yml b/csharp/ql/lib/ext/Microsoft.ApplicationBlocks.Data.model.yml
new file mode 100644
index 00000000000..6a8b6031825
--- /dev/null
+++ b/csharp/ql/lib/ext/Microsoft.ApplicationBlocks.Data.model.yml
@@ -0,0 +1,33 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSinkModel
+ data:
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteDataset", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteDataset", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteDataset", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteDataset", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteDataset", "(System.String,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteDataset", "(System.String,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteNonQuery", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteNonQuery", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteNonQuery", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteNonQuery", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteNonQuery", "(System.String,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteNonQuery", "(System.String,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteReader", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteReader", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteReader", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteReader", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteReader", "(System.String,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteReader", "(System.String,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteScalar", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteScalar", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteScalar", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteScalar", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteScalar", "(System.String,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteScalar", "(System.String,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteXmlReader", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteXmlReader", "(System.Data.SqlClient.SqlConnection,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteXmlReader", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String)", "", "Argument[2]", "sql", "manual"]
+ - ["Microsoft.ApplicationBlocks.Data", "SqlHelper", False, "ExecuteXmlReader", "(System.Data.SqlClient.SqlTransaction,System.Data.CommandType,System.String,System.Data.SqlClient.SqlParameter[])", "", "Argument[2]", "sql", "manual"]
diff --git a/csharp/ql/lib/ext/Microsoft.EntityFrameworkCore.model.yml b/csharp/ql/lib/ext/Microsoft.EntityFrameworkCore.model.yml
new file mode 100644
index 00000000000..51ae12fe6fa
--- /dev/null
+++ b/csharp/ql/lib/ext/Microsoft.EntityFrameworkCore.model.yml
@@ -0,0 +1,11 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSinkModel
+ data:
+ - ["Microsoft.EntityFrameworkCore", "RelationalDatabaseFacadeExtensions", False, "ExecuteSqlRaw", "(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["Microsoft.EntityFrameworkCore", "RelationalDatabaseFacadeExtensions", False, "ExecuteSqlRaw", "(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Object[])", "", "Argument[1]", "sql", "manual"]
+ - ["Microsoft.EntityFrameworkCore", "RelationalDatabaseFacadeExtensions", False, "ExecuteSqlRawAsync", "(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["Microsoft.EntityFrameworkCore", "RelationalDatabaseFacadeExtensions", False, "ExecuteSqlRawAsync", "(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Object[])", "", "Argument[1]", "sql", "manual"]
+ - ["Microsoft.EntityFrameworkCore", "RelationalDatabaseFacadeExtensions", False, "ExecuteSqlRawAsync", "(Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["Microsoft.EntityFrameworkCore", "RelationalQueryableExtensions", False, "FromSqlRaw<>", "(Microsoft.EntityFrameworkCore.DbSet,System.String,System.Object[])", "", "Argument[1]", "sql", "manual"]
diff --git a/csharp/ql/lib/ext/Microsoft.Extensions.Primitives.model.yml b/csharp/ql/lib/ext/Microsoft.Extensions.Primitives.model.yml
new file mode 100644
index 00000000000..a6d867fae01
--- /dev/null
+++ b/csharp/ql/lib/ext/Microsoft.Extensions.Primitives.model.yml
@@ -0,0 +1,59 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Add", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Add", "(System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Concat", "(Microsoft.Extensions.Primitives.StringValues,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Concat", "(Microsoft.Extensions.Primitives.StringValues,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Concat", "(Microsoft.Extensions.Primitives.StringValues,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Concat", "(Microsoft.Extensions.Primitives.StringValues,System.String)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Concat", "(System.String,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Concat", "(System.String,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Contains", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Contains", "(System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "CopyTo", "(System.String[],System.Int32)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "CopyTo", "(System.String[],System.Int32)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "CopyTo", "(System.String[],System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues,System.String)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues,System.String[])", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(Microsoft.Extensions.Primitives.StringValues,System.String[])", "", "Argument[1].Element", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.Object)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String,Microsoft.Extensions.Primitives.StringValues)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String[])", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String[])", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String[],Microsoft.Extensions.Primitives.StringValues)", "", "Argument[0].Element", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Equals", "(System.String[],Microsoft.Extensions.Primitives.StringValues)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "GetEnumerator", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "GetHashCode", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "IndexOf", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "IndexOf", "(System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Insert", "(System.Int32,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Insert", "(System.Int32,System.String)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Insert", "(System.Int32,System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "IsNullOrEmpty", "(Microsoft.Extensions.Primitives.StringValues)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Remove", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "Remove", "(System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "RemoveAt", "(System.Int32)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "RemoveAt", "(System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "StringValues", "(System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "StringValues", "(System.String[])", "", "Argument[0].Element", "Argument[this]", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "ToArray", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "ToString", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "get_Count", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "get_IsReadOnly", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "get_Item", "(System.Int32)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "get_Item", "(System.Int32)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "set_Item", "(System.Int32,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "set_Item", "(System.Int32,System.String)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
+ - ["Microsoft.Extensions.Primitives", "StringValues", False, "set_Item", "(System.Int32,System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
diff --git a/csharp/ql/lib/ext/Microsoft.VisualBasic.model.yml b/csharp/ql/lib/ext/Microsoft.VisualBasic.model.yml
new file mode 100644
index 00000000000..3546e3092b3
--- /dev/null
+++ b/csharp/ql/lib/ext/Microsoft.VisualBasic.model.yml
@@ -0,0 +1,10 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["Microsoft.VisualBasic", "Collection", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["Microsoft.VisualBasic", "Collection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.IEnumerator.Current]", "value", "manual"]
+ - ["Microsoft.VisualBasic", "Collection", False, "get_Item", "(System.Int32)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["Microsoft.VisualBasic", "Collection", False, "get_Item", "(System.Object)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["Microsoft.VisualBasic", "Collection", False, "get_Item", "(System.String)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
diff --git a/csharp/ql/lib/ext/MySql.Data.MySqlClient.model.yml b/csharp/ql/lib/ext/MySql.Data.MySqlClient.model.yml
new file mode 100644
index 00000000000..7f504e87ace
--- /dev/null
+++ b/csharp/ql/lib/ext/MySql.Data.MySqlClient.model.yml
@@ -0,0 +1,53 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSinkModel
+ data:
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDataRow", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDataRowAsync", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDataRowAsync", "(System.String,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDataset", "(MySql.Data.MySqlClient.MySqlConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDataset", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDataset", "(System.String,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDataset", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(System.String,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(System.String,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteDatasetAsync", "(System.String,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteNonQuery", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteNonQuery", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteNonQueryAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteNonQueryAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteNonQueryAsync", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteNonQueryAsync", "(System.String,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReader", "(MySql.Data.MySqlClient.MySqlConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReader", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReader", "(System.String,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReader", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(System.String,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(System.String,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteReaderAsync", "(System.String,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalar", "(MySql.Data.MySqlClient.MySqlConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalar", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalar", "(System.String,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalar", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(MySql.Data.MySqlClient.MySqlConnection,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(System.String,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(System.String,System.String,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(System.String,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "ExecuteScalarAsync", "(System.String,System.String,System.Threading.CancellationToken,MySql.Data.MySqlClient.MySqlParameter[])", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "UpdateDataset", "(System.String,System.String,System.Data.DataSet,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "UpdateDatasetAsync", "(System.String,System.String,System.Data.DataSet,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["MySql.Data.MySqlClient", "MySqlHelper", False, "UpdateDatasetAsync", "(System.String,System.String,System.Data.DataSet,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
diff --git a/csharp/ql/lib/ext/Newtonsoft.Json.Linq.model.yml b/csharp/ql/lib/ext/Newtonsoft.Json.Linq.model.yml
new file mode 100644
index 00000000000..adeafdce6a3
--- /dev/null
+++ b/csharp/ql/lib/ext/Newtonsoft.Json.Linq.model.yml
@@ -0,0 +1,30 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["Newtonsoft.Json.Linq", "JArray", False, "get_Item", "(System.Object)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JArray", False, "set_Item", "(System.Object,Newtonsoft.Json.Linq.JToken)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JConstructor", False, "get_Item", "(System.Object)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JConstructor", False, "set_Item", "(System.Object,Newtonsoft.Json.Linq.JToken)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JContainer", True, "Add", "(System.Object)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "JObject", "(Newtonsoft.Json.Linq.JObject)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "JObject", "(Newtonsoft.Json.Linq.JObject)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "JObject", "(System.Object[])", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "JObject", "(System.Object[])", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "Parse", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "Parse", "(System.String,Newtonsoft.Json.Linq.JsonLoadSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "get_Item", "(System.Object)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "get_Item", "(System.Object)", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "get_Item", "(System.String)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "set_Item", "(System.Object,Newtonsoft.Json.Linq.JToken)", "", "Argument[0]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "set_Item", "(System.Object,Newtonsoft.Json.Linq.JToken)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "set_Item", "(System.Object,Newtonsoft.Json.Linq.JToken)", "", "Argument[1]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JObject", False, "set_Item", "(System.String,Newtonsoft.Json.Linq.JToken)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["Newtonsoft.Json.Linq", "JToken", False, "SelectToken", "(System.String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json.Linq", "JToken", False, "SelectToken", "(System.String,Newtonsoft.Json.Linq.JsonSelectSettings)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json.Linq", "JToken", False, "SelectToken", "(System.String,System.Boolean)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json.Linq", "JToken", False, "ToString", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json.Linq", "JToken", False, "ToString", "(Newtonsoft.Json.Formatting,Newtonsoft.Json.JsonConverter[])", "", "Argument[this]", "ReturnValue", "taint", "manual"]
diff --git a/csharp/ql/lib/ext/Newtonsoft.Json.model.yml b/csharp/ql/lib/ext/Newtonsoft.Json.model.yml
new file mode 100644
index 00000000000..8ac9b9c3383
--- /dev/null
+++ b/csharp/ql/lib/ext/Newtonsoft.Json.model.yml
@@ -0,0 +1,71 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeAnonymousType<>", "(System.String,T)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeAnonymousType<>", "(System.String,T,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject", "(System.String,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject", "(System.String,System.Type)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject", "(System.String,System.Type,Newtonsoft.Json.JsonConverter[])", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject", "(System.String,System.Type,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject<>", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject<>", "(System.String,Newtonsoft.Json.JsonConverter[])", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeObject<>", "(System.String,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXNode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXNode", "(System.String,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXNode", "(System.String,System.String,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXNode", "(System.String,System.String,System.Boolean,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXmlNode", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXmlNode", "(System.String,System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXmlNode", "(System.String,System.String,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "DeserializeXmlNode", "(System.String,System.String,System.Boolean,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "PopulateObject", "(System.String,System.Object)", "", "Argument[0]", "Argument[1]", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "PopulateObject", "(System.String,System.Object,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "Argument[1]", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object,Newtonsoft.Json.Formatting)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object,Newtonsoft.Json.Formatting,Newtonsoft.Json.JsonConverter[])", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object,Newtonsoft.Json.Formatting,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object,Newtonsoft.Json.JsonConverter[])", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object,System.Type,Newtonsoft.Json.Formatting,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeObject", "(System.Object,System.Type,Newtonsoft.Json.JsonSerializerSettings)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeXNode", "(System.Xml.Linq.XObject)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeXNode", "(System.Xml.Linq.XObject,Newtonsoft.Json.Formatting)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeXNode", "(System.Xml.Linq.XObject,Newtonsoft.Json.Formatting,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeXmlNode", "(System.Xml.XmlNode)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeXmlNode", "(System.Xml.XmlNode,Newtonsoft.Json.Formatting)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "SerializeXmlNode", "(System.Xml.XmlNode,Newtonsoft.Json.Formatting,System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Boolean)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Byte)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Char)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.DateTime)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.DateTime,Newtonsoft.Json.DateFormatHandling,Newtonsoft.Json.DateTimeZoneHandling)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.DateTimeOffset)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.DateTimeOffset,Newtonsoft.Json.DateFormatHandling)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Decimal)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Double)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Enum)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Guid)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Int16)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Int32)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Int64)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.SByte)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Single)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.String,System.Char)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.String,System.Char,Newtonsoft.Json.StringEscapeHandling)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.TimeSpan)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.UInt16)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.UInt32)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.UInt64)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonConvert", False, "ToString", "(System.Uri)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonSerializer", False, "Deserialize", "(Newtonsoft.Json.JsonReader)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonSerializer", False, "Deserialize", "(Newtonsoft.Json.JsonReader,System.Type)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonSerializer", False, "Deserialize", "(System.IO.TextReader,System.Type)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonSerializer", False, "Serialize", "(Newtonsoft.Json.JsonWriter,System.Object)", "", "Argument[1]", "Argument[0]", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonSerializer", False, "Serialize", "(Newtonsoft.Json.JsonWriter,System.Object,System.Type)", "", "Argument[1]", "Argument[0]", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonSerializer", False, "Serialize", "(System.IO.TextWriter,System.Object)", "", "Argument[1]", "Argument[0]", "taint", "manual"]
+ - ["Newtonsoft.Json", "JsonSerializer", False, "Serialize", "(System.IO.TextWriter,System.Object,System.Type)", "", "Argument[1]", "Argument[0]", "taint", "manual"]
diff --git a/csharp/ql/lib/ext/ServiceStack.OrmLite.model.yml b/csharp/ql/lib/ext/ServiceStack.OrmLite.model.yml
new file mode 100644
index 00000000000..ee6d27168c4
--- /dev/null
+++ b/csharp/ql/lib/ext/ServiceStack.OrmLite.model.yml
@@ -0,0 +1,97 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSinkModel
+ data:
+ - ["ServiceStack.OrmLite", "IUntypedSqlExpression", True, "UnsafeAnd", "(System.String,System.Object[])", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "IUntypedSqlExpression", True, "UnsafeFrom", "(System.String)", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "IUntypedSqlExpression", True, "UnsafeOr", "(System.String,System.Object[])", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "IUntypedSqlExpression", True, "UnsafeSelect", "(System.String)", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "IUntypedSqlExpression", True, "UnsafeWhere", "(System.String,System.Object[])", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Column<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Column<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ColumnDistinct<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ColumnDistinct<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ColumnLazy<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ColumnLazy<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Dictionary<,>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ExecuteNonQuery", "(System.Data.IDbConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ExecuteNonQuery", "(System.Data.IDbConnection,System.String,System.Action)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ExecuteNonQuery", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "ExecuteNonQuery", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Exists<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "KeyValuePairs", "(System.Data.IDbConnection,System.String,System.System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Lookup<,>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Lookup<,>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Scalar<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Scalar<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Select<>", "(System.Data.IDbConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Select<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Select<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Select<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Select<>", "(System.Data.IDbConnection,System.Type,System.String,System.Object)", "", "Argument[2]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SelectLazy<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SelectNonDefaults<>", "(System.Data.IDbConnection,System.String,T)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Single<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "Single<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlColumn<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlColumn<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlColumn<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlList<>", "(System.Data.IDbConnection,System.String,System.Action)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlList<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlList<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlList<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlScalar<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlScalar<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApi", False, "SqlScalar<>", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ColumnAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ColumnAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ColumnDistinctAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ColumnDistinctAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "DictionaryAsync<,>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ExecuteNonQueryAsync", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ExecuteNonQueryAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ExecuteNonQueryAsync", "(System.Data.IDbConnection,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ExistsAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "KeyValuePairsAsync<,>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "KeyValuePairsAsync<,>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "LookupAsync<,>", "(System.Data.IDbCommand,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "LookupAsync<,>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "LookupAsync<,>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ScalarAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "ScalarAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SelectAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SelectAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SelectAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SelectAsync<>", "(System.Data.IDbConnection,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SelectAsync<>", "(System.Data.IDbConnection,System.Type,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[2]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SelectNonDefaultsAsync<>", "(System.Data.IDbConnection,System.String,T,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SingleAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SingleAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlColumnAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlColumnAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlColumnAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlListAsync<>", "(System.Data.IDbConnection,System.String,System.Action,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlListAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlListAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlListAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlScalarAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlScalarAsync<>", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadApiAsync", False, "SqlScalarAsync<>", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadExpressionsApi", False, "RowCount", "(System.Data.IDbConnection,System.String,System.Collections.Generic.IEnumerable)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadExpressionsApi", False, "RowCount", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteReadExpressionsApiAsync", False, "RowCountAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteWriteApi", False, "ExecuteSql", "(System.Data.IDbConnection,System.String)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteWriteApi", False, "ExecuteSql", "(System.Data.IDbConnection,System.String,System.Collections.Generic.Dictionary)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteWriteApi", False, "ExecuteSql", "(System.Data.IDbConnection,System.String,System.Object)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteWriteApiAsync", False, "ExecuteSqlAsync", "(System.Data.IDbConnection,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "OrmLiteWriteApiAsync", False, "ExecuteSqlAsync", "(System.Data.IDbConnection,System.String,System.Threading.CancellationToken)", "", "Argument[1]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeAnd", "(System.String,System.Object[])", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeFrom", "(System.String)", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeGroupBy", "(System.String)", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeHaving", "(System.String,System.Object[])", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeOr", "(System.String,System.Object[])", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeOrderBy", "(System.String)", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeSelect", "(System.String)", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeSelect", "(System.String,System.Boolean)", "", "Argument[0]", "sql", "manual"]
+ - ["ServiceStack.OrmLite", "SqlExpression<>", True, "UnsafeWhere", "(System.String,System.Object[])", "", "Argument[0]", "sql", "manual"]
diff --git a/csharp/ql/lib/ext/ServiceStack.Redis.model.yml b/csharp/ql/lib/ext/ServiceStack.Redis.model.yml
new file mode 100644
index 00000000000..a48f736d20a
--- /dev/null
+++ b/csharp/ql/lib/ext/ServiceStack.Redis.model.yml
@@ -0,0 +1,32 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSinkModel
+ data:
+ - ["ServiceStack.Redis", "IRedisClient", True, "Custom", "(System.Object[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecCachedLua", "(System.String,System.Func)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLua", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLua", "(System.String,System.String[],System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLuaAsInt", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLuaAsInt", "(System.String,System.String[],System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLuaAsList", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLuaAsList", "(System.String,System.String[],System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLuaAsString", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "ExecLuaAsString", "(System.String,System.String[],System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClient", True, "LoadLuaScript", "(System.String)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "CustomAsync", "(System.Object[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "CustomAsync", "(System.Object[],System.Threading.CancellationToken)", "", "Argument[0].Element", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecCachedLuaAsync", "(System.String,System.Func>,System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsIntAsync", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsIntAsync", "(System.String,System.String[],System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsIntAsync", "(System.String,System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsListAsync", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsListAsync", "(System.String,System.String[],System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsListAsync", "(System.String,System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsStringAsync", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsStringAsync", "(System.String,System.String[],System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsStringAsync", "(System.String,System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsync", "(System.String,System.String[])", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsync", "(System.String,System.String[],System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "ExecLuaAsync", "(System.String,System.String[],System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
+ - ["ServiceStack.Redis", "IRedisClientAsync", True, "LoadLuaScriptAsync", "(System.String,System.Threading.CancellationToken)", "", "Argument[0]", "code", "manual"]
diff --git a/csharp/ql/lib/ext/ServiceStack.model.yml b/csharp/ql/lib/ext/ServiceStack.model.yml
new file mode 100644
index 00000000000..814e97f7792
--- /dev/null
+++ b/csharp/ql/lib/ext/ServiceStack.model.yml
@@ -0,0 +1,91 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSinkModel
+ data:
+ - ["ServiceStack", "IOneWayClient", True, "SendAllOneWay", "(System.Collections.Generic.IEnumerable)", "", "Argument[1].Element", "remote", "manual"]
+ - ["ServiceStack", "IOneWayClient", True, "SendOneWay", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IOneWayClient", True, "SendOneWay", "(System.String,System.Object)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClient", True, "Patch<>", "(System.String,System.Object)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClient", True, "Post<>", "(System.String,System.Object)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClient", True, "Put<>", "(System.String,System.Object)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClient", True, "Send<>", "(System.String,System.String,System.Object)", "", "Argument[2]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "CustomMethodAsync", "(System.String,ServiceStack.IReturnVoid,System.Threading.CancellationToken)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "CustomMethodAsync<>", "(System.String,ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "CustomMethodAsync<>", "(System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "DeleteAsync", "(ServiceStack.IReturnVoid,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "DeleteAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "DeleteAsync<>", "(System.Object,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "GetAsync", "(ServiceStack.IReturnVoid,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "GetAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "GetAsync<>", "(System.Object,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PatchAsync", "(ServiceStack.IReturnVoid,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PatchAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PatchAsync<>", "(System.Object,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PostAsync", "(ServiceStack.IReturnVoid,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PostAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PostAsync<>", "(System.Object,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PutAsync", "(ServiceStack.IReturnVoid,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PutAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientAsync", True, "PutAsync<>", "(System.Object,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "CustomMethod", "(System.String,ServiceStack.IReturnVoid)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "CustomMethod<>", "(System.String,ServiceStack.IReturn)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "CustomMethod<>", "(System.String,System.Object)", "", "Argument[1]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Delete", "(ServiceStack.IReturnVoid)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Delete<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Delete<>", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Get", "(ServiceStack.IReturnVoid)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Get<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Get<>", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Patch", "(ServiceStack.IReturnVoid)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Patch<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Patch<>", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Post", "(ServiceStack.IReturnVoid)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Post<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Post<>", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Put", "(ServiceStack.IReturnVoid)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Put<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestClientSync", True, "Put<>", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGateway", True, "Delete<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGateway", True, "Get<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGateway", True, "Post<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGateway", True, "Put<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGateway", True, "Send<>", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGatewayAsync", True, "DeleteAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGatewayAsync", True, "GetAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGatewayAsync", True, "PostAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGatewayAsync", True, "PutAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IRestGatewayAsync", True, "SendAsync<>", "(ServiceStack.IReturn,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IServiceGateway", True, "Publish", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IServiceGateway", True, "PublishAll", "(System.Collections.Generic.IEnumerable)", "", "Argument[0].Element", "remote", "manual"]
+ - ["ServiceStack", "IServiceGateway", True, "Send<>", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IServiceGateway", True, "SendAll<>", "(System.Collections.Generic.IEnumerable)", "", "Argument[0].Element", "remote", "manual"]
+ - ["ServiceStack", "IServiceGatewayAsync", True, "PublishAllAsync", "(System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[0].Element", "remote", "manual"]
+ - ["ServiceStack", "IServiceGatewayAsync", True, "PublishAsync", "(System.Object,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "IServiceGatewayAsync", True, "SendAllAsync<>", "(System.Collections.Generic.IEnumerable,System.Threading.CancellationToken)", "", "Argument[0].Element", "remote", "manual"]
+ - ["ServiceStack", "IServiceGatewayAsync", True, "SendAsync<>", "(System.Object,System.Threading.CancellationToken)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "CustomMethod", "(System.String,System.String,System.Object)", "", "Argument[2]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "CustomMethod<>", "(System.String,System.String,System.Object)", "", "Argument[2]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "CustomMethodAsync<>", "(System.String,System.String,System.Object,System.Threading.CancellationToken)", "", "Argument[2]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Delete", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "DownloadBytes", "(System.String,System.String,System.Object)", "", "Argument[2]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "DownloadBytesAsync", "(System.String,System.String,System.Object)", "", "Argument[2]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Get", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Head", "(ServiceStack.IReturn)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Head", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Patch", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Post", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Publish<>", "(ServiceStack.Messaging.IMessage)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Publish<>", "(T)", "", "Argument[0]", "remote", "manual"]
+ - ["ServiceStack", "ServiceClientBase", True, "Put", "(System.Object)", "", "Argument[0]", "remote", "manual"]
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["ServiceStack", "HttpResult", False, "HttpResult", "(System.Byte[],System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
+ - ["ServiceStack", "HttpResult", False, "HttpResult", "(System.IO.Stream,System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
+ - ["ServiceStack", "HttpResult", False, "HttpResult", "(System.Object)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
+ - ["ServiceStack", "HttpResult", False, "HttpResult", "(System.Object,System.Net.HttpStatusCode)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
+ - ["ServiceStack", "HttpResult", False, "HttpResult", "(System.Object,System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
+ - ["ServiceStack", "HttpResult", False, "HttpResult", "(System.Object,System.String,System.Net.HttpStatusCode)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
+ - ["ServiceStack", "HttpResult", False, "HttpResult", "(System.String,System.String)", "", "Argument[0]", "Argument[this]", "taint", "manual"]
diff --git a/csharp/ql/lib/ext/System.CodeDom.model.yml b/csharp/ql/lib/ext/System.CodeDom.model.yml
new file mode 100644
index 00000000000..a078b085a33
--- /dev/null
+++ b/csharp/ql/lib/ext/System.CodeDom.model.yml
@@ -0,0 +1,6 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["System.CodeDom", "CodeNamespaceImportCollection", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
diff --git a/csharp/ql/lib/ext/System.Collections.Concurrent.model.yml b/csharp/ql/lib/ext/System.Collections.Concurrent.model.yml
new file mode 100644
index 00000000000..d009ec9d122
--- /dev/null
+++ b/csharp/ql/lib/ext/System.Collections.Concurrent.model.yml
@@ -0,0 +1,22 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["System.Collections.Concurrent", "BlockingCollection<>", False, "Add", "(T)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Concurrent", "BlockingCollection<>", False, "CopyTo", "(T[],System.Int32)", "", "Argument[this].Element", "Argument[0].Element", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentBag<>", False, "Add", "(T)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentBag<>", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "ConcurrentDictionary", "(System.Collections.Generic.IEnumerable>)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "ConcurrentDictionary", "(System.Collections.Generic.IEnumerable>)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "ConcurrentDictionary", "(System.Collections.Generic.IEnumerable>,System.Collections.Generic.IEqualityComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "ConcurrentDictionary", "(System.Collections.Generic.IEnumerable>,System.Collections.Generic.IEqualityComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "ConcurrentDictionary", "(System.Int32,System.Collections.Generic.IEnumerable>,System.Collections.Generic.IEqualityComparer)", "", "Argument[1].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "ConcurrentDictionary", "(System.Int32,System.Collections.Generic.IEnumerable>,System.Collections.Generic.IEqualityComparer)", "", "Argument[1].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "get_Keys", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentDictionary<,>", False, "get_Values", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentQueue<>", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Concurrent", "ConcurrentStack<>", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Concurrent", "IProducerConsumerCollection<>", True, "CopyTo", "(T[],System.Int32)", "", "Argument[this].Element", "Argument[0].Element", "value", "manual"]
diff --git a/csharp/ql/lib/ext/System.Collections.Generic.model.yml b/csharp/ql/lib/ext/System.Collections.Generic.model.yml
new file mode 100644
index 00000000000..5f87d13015a
--- /dev/null
+++ b/csharp/ql/lib/ext/System.Collections.Generic.model.yml
@@ -0,0 +1,87 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IDictionary)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IDictionary)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IDictionary,System.Collections.Generic.IEqualityComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IDictionary,System.Collections.Generic.IEqualityComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IEnumerable>)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IEnumerable>)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IEnumerable>,System.Collections.Generic.IEqualityComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "Dictionary", "(System.Collections.Generic.IEnumerable>,System.Collections.Generic.IEqualityComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.Dictionary<,>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "get_Keys", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>", False, "get_Values", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>+KeyCollection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.Dictionary<,>+KeyCollection+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "Dictionary<,>+ValueCollection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.Dictionary<,>+ValueCollection+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "HashSet<>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.HashSet<>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "ICollection<>", True, "Add", "(T)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Generic", "ICollection<>", True, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Generic", "ICollection<>", True, "CopyTo", "(T[],System.Int32)", "", "Argument[this].Element", "Argument[0].Element", "value", "manual"]
+ - ["System.Collections.Generic", "IDictionary<,>", True, "Add", "(TKey,TValue)", "", "Argument[0]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "IDictionary<,>", True, "Add", "(TKey,TValue)", "", "Argument[1]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "IDictionary<,>", True, "get_Item", "(TKey)", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "IDictionary<,>", True, "get_Keys", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "IDictionary<,>", True, "get_Values", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "IDictionary<,>", True, "set_Item", "(TKey,TValue)", "", "Argument[0]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "IDictionary<,>", True, "set_Item", "(TKey,TValue)", "", "Argument[1]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "IEnumerable<>", True, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.IEnumerator<>.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "IList<>", True, "Insert", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Generic", "IList<>", True, "get_Item", "(System.Int32)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "IList<>", True, "set_Item", "(System.Int32,T)", "", "Argument[1]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Generic", "ISet<>", True, "Add", "(T)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Generic", "KeyValuePair<,>", False, "KeyValuePair", "(TKey,TValue)", "", "Argument[0]", "Argument[this].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "KeyValuePair<,>", False, "KeyValuePair", "(TKey,TValue)", "", "Argument[1]", "Argument[this].Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "LinkedList<>", False, "Find", "(T)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "LinkedList<>", False, "FindLast", "(T)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "LinkedList<>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.LinkedList<>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "AddRange", "(System.Collections.Generic.IEnumerable)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "AsReadOnly", "()", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "Find", "(System.Predicate)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "Find", "(System.Predicate)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "FindAll", "(System.Predicate)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "FindAll", "(System.Predicate)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "FindLast", "(System.Predicate)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "FindLast", "(System.Predicate)", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.List<>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "GetRange", "(System.Int32,System.Int32)", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "InsertRange", "(System.Int32,System.Collections.Generic.IEnumerable)", "", "Argument[1].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "Reverse", "()", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "List<>", False, "Reverse", "(System.Int32,System.Int32)", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "Queue<>", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Generic", "Queue<>", False, "CopyTo", "(T[],System.Int32)", "", "Argument[this].Element", "Argument[0].Element", "value", "manual"]
+ - ["System.Collections.Generic", "Queue<>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.Queue<>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "Queue<>", False, "Peek", "()", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.SortedDictionary<,>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "SortedDictionary", "(System.Collections.Generic.IDictionary)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "SortedDictionary", "(System.Collections.Generic.IDictionary)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "SortedDictionary", "(System.Collections.Generic.IDictionary,System.Collections.Generic.IComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "SortedDictionary", "(System.Collections.Generic.IDictionary,System.Collections.Generic.IComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "get_Keys", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>", False, "get_Values", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>+KeyCollection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.SortedDictionary<,>+KeyCollection+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedDictionary<,>+ValueCollection", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.SortedDictionary<,>+ValueCollection+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.IEnumerator<>.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "SortedList", "(System.Collections.Generic.IDictionary)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "SortedList", "(System.Collections.Generic.IDictionary)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "SortedList", "(System.Collections.Generic.IDictionary,System.Collections.Generic.IComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "SortedList", "(System.Collections.Generic.IDictionary,System.Collections.Generic.IComparer)", "", "Argument[0].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "get_Keys", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>", False, "get_Values", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>+KeyList", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedList<,>+ValueList", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedSet<>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.SortedSet<>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "SortedSet<>", False, "Reverse", "()", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Generic", "Stack<>", False, "Clear", "()", "", "Argument[this].WithoutElement", "Argument[this]", "value", "manual"]
+ - ["System.Collections.Generic", "Stack<>", False, "CopyTo", "(T[],System.Int32)", "", "Argument[this].Element", "Argument[0].Element", "value", "manual"]
+ - ["System.Collections.Generic", "Stack<>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.Stack<>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Generic", "Stack<>", False, "Peek", "()", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Generic", "Stack<>", False, "Pop", "()", "", "Argument[this].Element", "ReturnValue", "value", "manual"]
diff --git a/csharp/ql/lib/ext/System.Collections.Immutable.model.yml b/csharp/ql/lib/ext/System.Collections.Immutable.model.yml
new file mode 100644
index 00000000000..5bafea13557
--- /dev/null
+++ b/csharp/ql/lib/ext/System.Collections.Immutable.model.yml
@@ -0,0 +1,92 @@
+extensions:
+ - addsTo:
+ pack: codeql/csharp-all
+ extensible: extSummaryModel
+ data:
+ - ["System.Collections.Immutable", "IImmutableDictionary<,>", True, "AddRange", "(System.Collections.Generic.IEnumerable>)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableDictionary<,>", True, "Clear", "()", "", "Argument[this].WithoutElement", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableList<>", True, "Add", "(T)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableList<>", True, "AddRange", "(System.Collections.Generic.IEnumerable)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableList<>", True, "Clear", "()", "", "Argument[this].WithoutElement", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableQueue<>", True, "Clear", "()", "", "Argument[this].WithoutElement", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableSet<>", True, "Add", "(T)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableSet<>", True, "Clear", "()", "", "Argument[this].WithoutElement", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Immutable", "IImmutableStack<>", True, "Clear", "()", "", "Argument[this].WithoutElement", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "AddRange", "(System.Collections.Generic.IEnumerable)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "AddRange", "(System.Collections.Immutable.ImmutableArray<>)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "AddRange", "(System.Collections.Immutable.ImmutableArray<>+Builder)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "AddRange", "(T[])", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "AddRange<>", "(System.Collections.Immutable.ImmutableArray)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "AddRange<>", "(System.Collections.Immutable.ImmutableArray+Builder)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "AddRange<>", "(TDerived[])", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Generic.IEnumerator<>.Current]", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableArray<>+Builder", False, "Reverse", "()", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Value]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "Add", "(TKey,TValue)", "", "Argument[0]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "Add", "(TKey,TValue)", "", "Argument[1]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "AddRange", "(System.Collections.Generic.IEnumerable>)", "", "Argument[0].Element", "Argument[this].Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "GetEnumerator", "()", "", "Argument[this].Element", "ReturnValue.Property[System.Collections.Immutable.ImmutableDictionary<,>+Enumerator.Current]", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "get_Item", "(TKey)", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "get_Keys", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>", False, "get_Values", "()", "", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Value]", "ReturnValue.Element", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>+Builder", False, "Add", "(System.Collections.Generic.KeyValuePair)", "", "Argument[0].Property[System.Collections.Generic.KeyValuePair<,>.Key]", "Argument[this].Element.Property[System.Collections.Generic.KeyValuePair<,>.Key]", "value", "manual"]
+ - ["System.Collections.Immutable", "ImmutableDictionary<,>+Builder", False, "Add", "(System.Collections.Generic.KeyValuePair