Shared: update qldocs

This commit is contained in:
Jami Cogswell
2023-06-05 12:16:08 -04:00
parent 3f1dc8e5c7
commit 9d5972acc2
14 changed files with 35 additions and 7 deletions

View File

@@ -655,6 +655,7 @@ module ModelOutput {
import Specific::ModelOutputSpecific
private import SharedModelValidation
/** Gets an error message relating to an invalid kind in a model. */
private string getInvalidModelKind() {
exists(string kind | summaryModel(_, _, _, _, kind) |
not kind instanceof ValidSummaryKind and

View File

@@ -1,7 +1,7 @@
/**
* INTERNAL: Do not use.
*
* Provides classes for validating kinds in models as data rows.
* Provides classes and predicates related to validating models as data rows.
* Such that we can share this logic across our CodeQL analysis of different languages.
*/
@@ -40,6 +40,7 @@ class ValidSinkKind extends string {
}
}
/** An outdated models-as-data sink kind. */
class OutdatedSinkKind extends string {
OutdatedSinkKind() {
this =
@@ -51,6 +52,7 @@ class OutdatedSinkKind extends string {
]
}
/** Gets a replacement kind for an outdated sink kind. */
private string replacementKind() {
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
result = this + "-injection"
@@ -84,6 +86,7 @@ class OutdatedSinkKind extends string {
this = "uncontrolled-format-string" and result = "format-string"
}
/** Gets an error message for an outdated sink kind. */
string outdatedMessage() {
result =
"The kind \"" + this + "\" is outdated. Use \"" + this.replacementKind() + "\" instead."