From f3c979076ec28c4ec3f0cf35e890a1524bc4b1ff Mon Sep 17 00:00:00 2001 From: Jeroen Ketema <93738568+jketema@users.noreply.github.com> Date: Wed, 18 Nov 2026 10:29:01 +0000 Subject: [PATCH] C#: Remove outdated deprecated library APIs Remove obsolete AST, control-flow, data-flow, serialization, and security aliases, along with deprecated telemetry helpers and the old ParallelSink re-export. Keep all experimental queries and their supporting libraries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7be1d7da-9061-47a8-bf98-b3169476add9 --- .../2026-11-18-outdated-deprecations.md | 4 ++ csharp/ql/lib/semmle/code/csharp/Element.qll | 23 -------- csharp/ql/lib/semmle/code/csharp/Member.qll | 22 ------- csharp/ql/lib/semmle/code/csharp/Type.qll | 7 --- .../semmle/code/csharp/controlflow/Guards.qll | 5 -- .../code/csharp/dataflow/FlowSummary.qll | 14 ----- .../lib/semmle/code/csharp/dataflow/SSA.qll | 58 ------------------- .../dataflow/internal/DataFlowPublic.qll | 13 ----- .../ql/lib/semmle/code/csharp/exprs/Expr.qll | 8 --- .../semmle/code/csharp/frameworks/Format.qll | 10 ---- .../InsecureDirectObjectReferenceQuery.qll | 1 - .../security/dataflow/CodeInjectionQuery.qll | 14 ----- .../dataflow/CommandInjectionQuery.qll | 7 --- .../dataflow/ConditionalBypassQuery.qll | 7 --- .../security/dataflow/LDAPInjectionQuery.qll | 7 --- .../dataflow/MissingXMLValidationQuery.qll | 7 --- .../csharp/security/dataflow/ReDoSQuery.qll | 7 --- .../security/dataflow/RegexInjectionQuery.qll | 7 --- .../dataflow/ResourceInjectionQuery.qll | 14 ----- .../security/dataflow/SqlInjectionQuery.qll | 14 ----- .../security/dataflow/TaintedPathQuery.qll | 7 --- .../security/dataflow/UrlRedirectQuery.qll | 7 --- .../security/dataflow/XPathInjectionQuery.qll | 7 --- .../security/dataflow/flowsinks/Html.qll | 14 ----- .../dataflow/flowsources/FlowSources.qll | 8 --- .../security/dataflow/flowsources/Stored.qll | 28 --------- .../csharp/serialization/Deserializers.qll | 6 -- csharp/ql/src/Likely Bugs/ParallelSink.qll | 6 -- csharp/ql/src/Telemetry/ExternalApi.qll | 4 -- csharp/ql/src/Telemetry/TestLibrary.qll | 4 -- .../2026-11-18-outdated-deprecations.md | 5 ++ 31 files changed, 9 insertions(+), 336 deletions(-) create mode 100644 csharp/ql/lib/change-notes/2026-11-18-outdated-deprecations.md delete mode 100644 csharp/ql/src/Likely Bugs/ParallelSink.qll delete mode 100644 csharp/ql/src/Telemetry/ExternalApi.qll delete mode 100644 csharp/ql/src/Telemetry/TestLibrary.qll create mode 100644 csharp/ql/src/change-notes/2026-11-18-outdated-deprecations.md diff --git a/csharp/ql/lib/change-notes/2026-11-18-outdated-deprecations.md b/csharp/ql/lib/change-notes/2026-11-18-outdated-deprecations.md new file mode 100644 index 000000000000..2cccf44a5050 --- /dev/null +++ b/csharp/ql/lib/change-notes/2026-11-18-outdated-deprecations.md @@ -0,0 +1,4 @@ +--- +category: breaking +--- +* Removed deprecated aliases and predicates from the AST, control-flow, data-flow, serialization, and security libraries. diff --git a/csharp/ql/lib/semmle/code/csharp/Element.qll b/csharp/ql/lib/semmle/code/csharp/Element.qll index faf636d96237..828b637f4b5f 100644 --- a/csharp/ql/lib/semmle/code/csharp/Element.qll +++ b/csharp/ql/lib/semmle/code/csharp/Element.qll @@ -95,29 +95,6 @@ class NamedElement extends Element, @named_element { /** Holds if this element has name 'name'. */ final predicate hasName(string name) { name = this.getName() } - /** - * DEPRECATED: Use `hasFullyQualifiedName` instead. - * - * Gets the fully qualified name of this element, for example the - * fully qualified name of `M` on line 3 is `N.C.M` in - * - * ```csharp - * namespace N { - * class C { - * void M(int i, string s) { } - * } - * } - * ``` - * - * Unbound generic types, such as `IList`, are represented as - * ``System.Collections.Generic.IList`1``. - */ - deprecated final string getFullyQualifiedName() { - exists(string qualifier, string name | this.hasFullyQualifiedName(qualifier, name) | - if qualifier = "" then result = name else result = qualifier + "." + name - ) - } - /** * INTERNAL: Do not use. * diff --git a/csharp/ql/lib/semmle/code/csharp/Member.qll b/csharp/ql/lib/semmle/code/csharp/Member.qll index ac3229351ea3..a15913c17466 100644 --- a/csharp/ql/lib/semmle/code/csharp/Member.qll +++ b/csharp/ql/lib/semmle/code/csharp/Member.qll @@ -75,28 +75,6 @@ class Declaration extends NamedElement, @declaration { QualifiedName::hasQualifiedName(this, qualifier, name) } - /** - * Gets the fully qualified name of this declaration, including types, for example - * the fully qualified name with types of `M` on line 3 is `N.C.M(int, string)` in - * - * ```csharp - * namespace N { - * class C { - * void M(int i, string s) { } - * } - * } - * ``` - */ - deprecated string getFullyQualifiedNameWithTypes() { - exists(string fullqual, string qual, string name | - this.getDeclaringType().hasFullyQualifiedName(qual, name) and - fullqual = getQualifiedName(qual, name) and - if this instanceof NestedType - then result = fullqual + "+" + this.toStringWithTypes() - else result = fullqual + "." + this.toStringWithTypes() - ) - } - /** * Holds if this declaration has been generated by the compiler, for example * implicit constructors or accessors. diff --git a/csharp/ql/lib/semmle/code/csharp/Type.qll b/csharp/ql/lib/semmle/code/csharp/Type.qll index 7af167cd9bcb..0992df25902d 100644 --- a/csharp/ql/lib/semmle/code/csharp/Type.qll +++ b/csharp/ql/lib/semmle/code/csharp/Type.qll @@ -717,13 +717,6 @@ class Enum extends ValueType, @enum_type { * ``` */ class Struct extends ValueType, @struct_type { - /** - * DEPRECATED: Use `instanceof RefStruct` instead. - * - * Holds if this `struct` has a `ref` modifier. - */ - deprecated predicate isRef() { this.hasModifier("ref") } - /** Holds if this `struct` has a `readonly` modifier. */ predicate isReadonly() { this.hasModifier("readonly") } diff --git a/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll b/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll index e252d855da6e..031a48906869 100644 --- a/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll +++ b/csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll @@ -426,11 +426,6 @@ class DereferenceableExpr extends Expr { } } -/** - * DEPRECATED: Use `EnumerableCollectionExpr` instead. - */ -deprecated class CollectionExpr = EnumerableCollectionExpr; - /** * An expression that evaluates to a collection. That is, an expression whose * (transitive, reflexive) base type is `IEnumerable`. diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll index dcd07be496d9..ca7b95ab5e71 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll @@ -4,20 +4,6 @@ import csharp private import internal.FlowSummaryImpl as Impl private import internal.DataFlowDispatch as DataFlowDispatch -deprecated class ParameterPosition = DataFlowDispatch::ParameterPosition; - -deprecated class ArgumentPosition = DataFlowDispatch::ArgumentPosition; - -deprecated class SummaryComponent = Impl::Private::SummaryComponent; - -deprecated module SummaryComponent = Impl::Private::SummaryComponent; - -deprecated class SummaryComponentStack = Impl::Private::SummaryComponentStack; - -deprecated module SummaryComponentStack = Impl::Private::SummaryComponentStack; - -deprecated class RequiredSummaryComponentStack = Impl::Private::RequiredSummaryComponentStack; - /** Provides the `Range` class used to define the extent of `SummarizedCallable`. */ module SummarizedCallable { class Range = Impl::Public::SummarizedCallable; diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll index fee6bedf0f3e..e7eec8592230 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll @@ -440,64 +440,6 @@ module Ssa { result = SsaImpl::getADefinition(this) } - /** - * DEPRECATED. - * - * Holds if this definition updates a captured local scope variable, and the updated - * value may be read from the implicit entry definition `def` using one or more calls - * (as indicated by `additionalCalls`), starting from call `c`. - * - * Example: - * - * ```csharp - * class C { - * void M1() { - * int i = 0; - * void M2() => System.Console.WriteLine(i); - * i = 1; - * M2(); - * } - * } - * ``` - * - * If this definition is the update of `i` on line 5, then the value may be read inside - * `M2` via the call on line 6. - */ - deprecated final predicate isCapturedVariableDefinitionFlowIn( - ImplicitEntryDefinition def, ControlFlowNodes::ElementNode c, boolean additionalCalls - ) { - none() - } - - /** - * DEPRECATED. - * - * Holds if this definition updates a captured local scope variable, and the updated - * value may be read from the implicit call definition `cdef` using one or more calls - * (as indicated by `additionalCalls`). - * - * Example: - * - * ```csharp - * class C { - * void M1() { - * int i = 0; - * void M2() { i = 2; }; - * M2(); - * System.Console.WriteLine(i); - * } - * } - * ``` - * - * If this definition is the update of `i` on line 4, then the value may be read outside - * of `M2` via the call on line 5. - */ - deprecated final predicate isCapturedVariableDefinitionFlowOut( - ImplicitCallDefinition cdef, boolean additionalCalls - ) { - none() - } - override Element getElement() { result = ad.getElement() } } diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll index 7919b38de3fd..016135ed4fd1 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPublic.qll @@ -51,19 +51,6 @@ class Node extends TNode { /** Gets the location of this node. */ final Location getLocation() { result = this.(NodeImpl).getLocationImpl() } - - /** - * Holds if this element is at the specified location. - * The location spans column `startcolumn` of line `startline` to - * column `endcolumn` of line `endline` in file `filepath`. - * For more information, see - * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). - */ - deprecated predicate hasLocationInfo( - string filepath, int startline, int startcolumn, int endline, int endcolumn - ) { - this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) - } } /** diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll index 53e6d359c212..7fea93889737 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll @@ -86,14 +86,6 @@ class Expr extends ControlFlowElement, @expr { */ Expr stripCasts() { result = this } - /** - * DEPRECATED: Use `stripImplicit` instead. - * - * Gets an expression that is the result of stripping (recursively) all - * implicit casts from this expression, if any. - */ - deprecated Expr stripImplicitCasts() { result = this.stripImplicit() } - /** * Gets an expression that is the result of stripping (recursively) all * implicit casts and implicit ToString calls from this expression, if any. diff --git a/csharp/ql/lib/semmle/code/csharp/frameworks/Format.qll b/csharp/ql/lib/semmle/code/csharp/frameworks/Format.qll index d191f62aa920..6c92177f141e 100644 --- a/csharp/ql/lib/semmle/code/csharp/frameworks/Format.qll +++ b/csharp/ql/lib/semmle/code/csharp/frameworks/Format.qll @@ -265,16 +265,6 @@ class FormatCall extends FormatStringParseCallImpl { /** Holds if this call has one or more insertions. */ predicate hasInsertions() { exists(this.getArgument(this.getFirstArgument())) } - /** - * DEPRECATED: use `hasCollectionExpr` instead. - * - * Holds if the arguments are supplied in an array, not individually. - */ - deprecated predicate hasArrayExpr() { - this.getNumberOfArguments() = this.getFirstArgument() + 1 and - this.getArgument(this.getFirstArgument()).getType() instanceof ArrayType - } - /** * Holds if the arguments are supplied in a collection, not individually. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll index 2ea422855ad8..06bd570adef2 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll @@ -2,7 +2,6 @@ import csharp import semmle.code.csharp.security.dataflow.flowsources.FlowSources -deprecated import semmle.code.csharp.dataflow.flowsources.Remote import ActionMethods /** diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll index f567e3cbc021..a47348a8f0dd 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll @@ -42,20 +42,6 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig { */ module CodeInjection = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of local user input. - */ -deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll index b8c37d602b94..380f46562615 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll @@ -51,13 +51,6 @@ module CommandInjectionConfig implements DataFlow::ConfigSig { */ module CommandInjection = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll index a9ad31dc804c..b83a0f539537 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll @@ -54,13 +54,6 @@ private module ConditionalBypassConfig implements DataFlow::ConfigSig { */ module ConditionalBypass = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll index 06bfac6c5458..ca526217e5de 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll @@ -54,13 +54,6 @@ module LdapInjectionConfig implements DataFlow::ConfigSig { */ module LdapInjection = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreadModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll index 3fcdc2b88ca7..2e52221aeab8 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll @@ -49,13 +49,6 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig { */ module MissingXmlValidation = TaintTracking::Global; -/** - * DEPRECATED: Use `ActiveThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** * A source supported by the current threat model. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll index 8797d6654d3b..9ce9a5d350a2 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll @@ -42,13 +42,6 @@ private module ReDoSConfig implements DataFlow::ConfigSig { */ module ReDoS = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll index 5cd232588296..387703c843bf 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/RegexInjectionQuery.qll @@ -42,13 +42,6 @@ private module RegexInjectionConfig implements DataFlow::ConfigSig { */ module RegexInjection = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll index e1542986411f..21b0cfd8287e 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ResourceInjectionQuery.qll @@ -41,20 +41,6 @@ private module ResourceInjectionConfig implements DataFlow::ConfigSig { */ module ResourceInjection = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of local user input. - */ -deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll index addc19321776..bea063832ffd 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/SqlInjectionQuery.qll @@ -52,20 +52,6 @@ module SqlInjectionConfig implements DataFlow::ConfigSig { */ module SqlInjection = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of local user input. - */ -deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll index 668e3ddcb201..e74872657282 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/TaintedPathQuery.qll @@ -44,13 +44,6 @@ private module TaintedPathConfig implements DataFlow::ConfigSig { */ module TaintedPath = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll index 1e53fccaaea1..8a8ae778500d 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/UrlRedirectQuery.qll @@ -46,13 +46,6 @@ private module UrlRedirectConfig implements DataFlow::ConfigSig { */ module UrlRedirect = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll index 5cf934ef43e7..c34baa6ac050 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/XPathInjectionQuery.qll @@ -52,13 +52,6 @@ module XpathInjectionConfig implements DataFlow::ConfigSig { */ module XpathInjection = TaintTracking::Global; -/** - * DEPRECATED: Use `ThreatModelSource` instead. - * - * A source of remote user input. - */ -deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } - /** A source supported by the current threat model. */ class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll index bcc36a54abad..26c9814c88d5 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsinks/Html.qll @@ -55,20 +55,6 @@ class HtmlTextWriterSink extends HtmlSink { } } -/** - * DEPRECATED: Attribute collections are no longer considered HTML sinks. - */ -deprecated class AttributeCollectionSink extends DataFlow::ExprNode { - AttributeCollectionSink() { - exists(SystemWebUIAttributeCollectionClass ac, Parameter p | - p = ac.getAddMethod().getParameter(1) or - p = ac.getItemProperty().getSetter().getParameter(0) - | - this.getExpr() = p.getAnAssignedArgument() - ) - } -} - /** * An expression that is used as the second argument `HtmlElement.SetAttribute`. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll index 526e337e9dac..73ce31fc5536 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/FlowSources.qll @@ -19,14 +19,6 @@ abstract class SourceNode extends DataFlow::Node { abstract string getSourceType(); } -/** - * DEPRECATED: Use `ActiveThreatModelSource` instead. - * - * A class of data flow sources that respects the - * current threat model configuration. - */ -deprecated class ThreatModelFlowSource = ActiveThreatModelSource; - /** * A data flow source that is enabled in the current threat model configuration. */ diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll index aae6cfeca611..e8bd8719a9ed 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/flowsources/Stored.qll @@ -46,34 +46,6 @@ class DbDataReaderParameterStoredFlowSource extends DatabaseInputSource { } } -/** An expression that accesses a method of `DbDataReader` or a sub-class. */ -deprecated class DbDataReaderMethodStoredFlowSource extends DataFlow::Node { - DbDataReaderMethodStoredFlowSource() { - this.asExpr().(MethodCall).getTarget().getDeclaringType() = - any(SystemDataCommon::DbDataReader dataReader).getASubType*() - } -} - -/** An expression that accesses a property of `DbDataReader` or a sub-class. */ -deprecated class DbDataReaderPropertyStoredFlowSource extends DataFlow::Node { - DbDataReaderPropertyStoredFlowSource() { - this.asExpr().(PropertyAccess).getTarget().getDeclaringType() = - any(SystemDataCommon::DbDataReader dataReader).getASubType*() - } -} - -/** - * DEPRECATED: Use `EntityFramework::StoredFlowSource` and `NHibernate::StoredFlowSource` instead. - * - * A read of a mapped property. - */ -deprecated class ORMMappedProperty extends DataFlow::Node { - ORMMappedProperty() { - this instanceof EntityFramework::StoredFlowSource or - this instanceof NHibernate::StoredFlowSource - } -} - private class ExternalDatabaseInputSource extends DatabaseInputSource { ExternalDatabaseInputSource() { sourceNode(this, "database") } } diff --git a/csharp/ql/lib/semmle/code/csharp/serialization/Deserializers.qll b/csharp/ql/lib/semmle/code/csharp/serialization/Deserializers.qll index f7c6ade96eaf..85a36a24e434 100644 --- a/csharp/ql/lib/semmle/code/csharp/serialization/Deserializers.qll +++ b/csharp/ql/lib/semmle/code/csharp/serialization/Deserializers.qll @@ -560,12 +560,6 @@ class FsPicklerSerializerClassDeserializeSequenceMethod extends Method, UnsafeDe } } -/** - * DEPRECATED: Use `FsPicklerSerializerClassDeserializeSiftedMethod` instead. - */ -deprecated class FsPicklerSerializerClasDeserializeSiftedMethod = - FsPicklerSerializerClassDeserializeSiftedMethod; - /** `MBrace.FsPickler.FsPicklerSerializer.DeserializeSifted` method */ class FsPicklerSerializerClassDeserializeSiftedMethod extends Method, UnsafeDeserializer { FsPicklerSerializerClassDeserializeSiftedMethod() { diff --git a/csharp/ql/src/Likely Bugs/ParallelSink.qll b/csharp/ql/src/Likely Bugs/ParallelSink.qll deleted file mode 100644 index 99503c77417e..000000000000 --- a/csharp/ql/src/Likely Bugs/ParallelSink.qll +++ /dev/null @@ -1,6 +0,0 @@ -/** - * DEPRECATED: Use `ParallelSink` from `flowsinks.ParallelSink` instead. - */ - -import csharp -deprecated import semmle.code.csharp.security.dataflow.flowsinks.ParallelSink diff --git a/csharp/ql/src/Telemetry/ExternalApi.qll b/csharp/ql/src/Telemetry/ExternalApi.qll deleted file mode 100644 index 288f635022fb..000000000000 --- a/csharp/ql/src/Telemetry/ExternalApi.qll +++ /dev/null @@ -1,4 +0,0 @@ -// Use `semmle.code.csharp.telemetry.ExternalApi` instead. -deprecated module; - -import semmle.code.csharp.telemetry.ExternalApi diff --git a/csharp/ql/src/Telemetry/TestLibrary.qll b/csharp/ql/src/Telemetry/TestLibrary.qll deleted file mode 100644 index 0fcafb0a1d76..000000000000 --- a/csharp/ql/src/Telemetry/TestLibrary.qll +++ /dev/null @@ -1,4 +0,0 @@ -// Use `semmle.code.csharp.telemetry.TestLibrary` instead. -deprecated module; - -import semmle.code.csharp.telemetry.TestLibrary diff --git a/csharp/ql/src/change-notes/2026-11-18-outdated-deprecations.md b/csharp/ql/src/change-notes/2026-11-18-outdated-deprecations.md new file mode 100644 index 000000000000..7c42500cd845 --- /dev/null +++ b/csharp/ql/src/change-notes/2026-11-18-outdated-deprecations.md @@ -0,0 +1,5 @@ +--- +category: breaking +--- +* Removed the deprecated `ExternalApi` and `TestLibrary` telemetry helper modules. +* Removed the deprecated `Likely Bugs/ParallelSink.qll` re-export module. Import `semmle.code.csharp.security.dataflow.flowsinks.ParallelSink` directly instead.