Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: breaking
---
* Removed deprecated aliases and predicates from the AST, control-flow, data-flow, serialization, and security libraries.
23 changes: 0 additions & 23 deletions csharp/ql/lib/semmle/code/csharp/Element.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>`, 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.
*
Expand Down
22 changes: 0 additions & 22 deletions csharp/ql/lib/semmle/code/csharp/Member.qll
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,6 @@ class Declaration extends NamedElement, @declaration {
QualifiedName<FullyQualifiedNameInput>::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.
Expand Down
7 changes: 0 additions & 7 deletions csharp/ql/lib/semmle/code/csharp/Type.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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") }

Expand Down
5 changes: 0 additions & 5 deletions csharp/ql/lib/semmle/code/csharp/controlflow/Guards.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
14 changes: 0 additions & 14 deletions csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
58 changes: 0 additions & 58 deletions csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

/**
Expand Down
8 changes: 0 additions & 8 deletions csharp/ql/lib/semmle/code/csharp/exprs/Expr.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 0 additions & 10 deletions csharp/ql/lib/semmle/code/csharp/frameworks/Format.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import csharp
import semmle.code.csharp.security.dataflow.flowsources.FlowSources
deprecated import semmle.code.csharp.dataflow.flowsources.Remote
import ActionMethods

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig {
*/
module CodeInjection = TaintTracking::Global<CodeInjectionConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ module CommandInjectionConfig implements DataFlow::ConfigSig {
*/
module CommandInjection = TaintTracking::Global<CommandInjectionConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ private module ConditionalBypassConfig implements DataFlow::ConfigSig {
*/
module ConditionalBypass = TaintTracking::Global<ConditionalBypassConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ module LdapInjectionConfig implements DataFlow::ConfigSig {
*/
module LdapInjection = TaintTracking::Global<LdapInjectionConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig {
*/
module MissingXmlValidation = TaintTracking::Global<MissingXmlValidationConfig>;

/**
* 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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ private module ReDoSConfig implements DataFlow::ConfigSig {
*/
module ReDoS = TaintTracking::Global<ReDoSConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ private module RegexInjectionConfig implements DataFlow::ConfigSig {
*/
module RegexInjection = TaintTracking::Global<RegexInjectionConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,6 @@ private module ResourceInjectionConfig implements DataFlow::ConfigSig {
*/
module ResourceInjection = TaintTracking::Global<ResourceInjectionConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,6 @@ module SqlInjectionConfig implements DataFlow::ConfigSig {
*/
module SqlInjection = TaintTracking::Global<SqlInjectionConfig>;

/**
* 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 { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ private module TaintedPathConfig implements DataFlow::ConfigSig {
*/
module TaintedPath = TaintTracking::Global<TaintedPathConfig>;

/**
* 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 { }

Expand Down
Loading
Loading