Merge pull request #18299 from michaelnebel/java/deprecateexperimental

Java: Deprecate experimental queries.
This commit is contained in:
Michael Nebel
2025-01-29 10:41:25 +01:00
committed by GitHub
137 changed files with 1974 additions and 1639 deletions

View File

@@ -104,9 +104,9 @@ private import codeql.mad.ModelValidation as SharedModelVal
* Extend this class to include experimental model rows with `this` name
* in data flow analysis.
*/
abstract class ActiveExperimentalModels extends string {
abstract private class ActiveExperimentalModelsInternal extends string {
bindingset[this]
ActiveExperimentalModels() { any() }
ActiveExperimentalModelsInternal() { any() }
/**
* Holds if an experimental source model exists for the given parameters.
@@ -142,6 +142,8 @@ abstract class ActiveExperimentalModels extends string {
}
}
deprecated class ActiveExperimentalModels = ActiveExperimentalModelsInternal;
/** Holds if a source model exists for the given parameters. */
predicate sourceModel(
string package, string type, boolean subtypes, string name, string signature, string ext,
@@ -151,7 +153,7 @@ predicate sourceModel(
Extensions::sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance,
madId)
or
any(ActiveExperimentalModels q)
any(ActiveExperimentalModelsInternal q)
.sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance, madId)
)
}
@@ -165,7 +167,7 @@ predicate sinkModel(
Extensions::sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance,
madId)
or
any(ActiveExperimentalModels q)
any(ActiveExperimentalModelsInternal q)
.sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance, madId)
)
}
@@ -179,7 +181,7 @@ predicate summaryModel(
Extensions::summaryModel(package, type, subtypes, name, signature, ext, input, output, kind,
provenance, madId)
or
any(ActiveExperimentalModels q)
any(ActiveExperimentalModelsInternal q)
.summaryModel(package, type, subtypes, name, signature, ext, input, output, kind,
provenance, madId)
)

View File

@@ -34,6 +34,11 @@ extensible predicate neutralModel(
);
/**
* INTERNAL: Do not use.
*
* DEPRECATED: This predicate is only intended for adding models used by experimental queries.
* This predicate will be deleted in the future.
*
* Holds if an experimental source model exists for the given parameters.
* This is only for experimental queries.
*/
@@ -43,6 +48,11 @@ extensible predicate experimentalSourceModel(
);
/**
* INTERNAL: Do not use.
*
* DEPRECATED: This predicate is only intended for adding models used by experimental queries.
* This predicate will be deleted in the future.
*
* Holds if an experimental sink model exists for the given parameters.
* This is only for experimental queries.
*/
@@ -52,6 +62,11 @@ extensible predicate experimentalSinkModel(
);
/**
* INTERNAL: Do not use.
*
* DEPRECATED: This predicate is only intended for adding models used by experimental queries.
* This predicate will be deleted in the future.
*
* Holds if an experimental summary model exists for the given parameters.
* This is only for experimental queries.
*/