Skip to content
Open
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, API-graph, data-flow, type-tracking, and security libraries.
22 changes: 0 additions & 22 deletions python/ql/lib/semmle/python/ApiGraphs.qll
Original file line number Diff line number Diff line change
Expand Up @@ -344,28 +344,6 @@ module API {
/** Gets the location of this node */
PY::Location getLocation() { result = this.getInducingNode().getLocation() }

/**
* 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.getInducingNode().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
or
// For nodes that do not have a meaningful location, `path` is the empty string and all other
// parameters are zero.
not exists(this.getInducingNode()) and
filepath = "" and
startline = 0 and
startcolumn = 0 and
endline = 0 and
endcolumn = 0
}

/**
* Gets a textual representation of this element.
*/
Expand Down
6 changes: 0 additions & 6 deletions python/ql/lib/semmle/python/Exprs.qll
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,6 @@ private string non_byte_prefix() {
not result.charAt(_) in ["b", "B"]
}

/** DEPRECATED. Use `StringLiteral` instead. */
deprecated class Str = StringLiteral;

/** DEPRECATED. Use `StringLiteral` instead. */
deprecated class StrConst = StringLiteral;

/** A string constant. */
class StringLiteral extends Str_, ImmutableLiteral {
/* syntax: "hello" */
Expand Down
3 changes: 0 additions & 3 deletions python/ql/lib/semmle/python/dataflow/new/BarrierGuards.qll
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ private predicate constCompare(DataFlow::GuardNode g, ControlFlowNode node, bool
class ConstCompareBarrier extends DataFlow::Node {
ConstCompareBarrier() { this = DataFlow::BarrierGuard<constCompare/3>::getABarrierNode() }
}

/** DEPRECATED: Use ConstCompareBarrier instead. */
deprecated class StringConstCompareBarrier = ConstCompareBarrier;
11 changes: 0 additions & 11 deletions python/ql/lib/semmle/python/dataflow/new/FlowSummary.qll
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ private module Summaries {
private import semmle.python.frameworks.data.ModelsAsData
}

deprecated class SummaryComponent = Impl::Private::SummaryComponent;

/** Provides predicates for constructing summary components. */
deprecated module SummaryComponent = Impl::Private::SummaryComponent;

deprecated class SummaryComponentStack = Impl::Private::SummaryComponentStack;

deprecated module SummaryComponentStack = Impl::Private::SummaryComponentStack;

class Provenance = Impl::Public::Provenance;

/** Provides the `Range` class used to define the extent of `SummarizedCallable`. */
Expand Down Expand Up @@ -57,5 +48,3 @@ final private class SummarizedCallableFinal = SummarizedCallable::Range;
final class SummarizedCallable extends SummarizedCallableFinal,
Impl::Public::RelevantSummarizedCallable
{ }

deprecated class RequiredSummaryComponentStack = Impl::Private::RequiredSummaryComponentStack;
7 changes: 0 additions & 7 deletions python/ql/lib/semmle/python/dataflow/new/TypeTracking.qll
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ private import semmle.python.Files
import Impl::Shared::TypeTracking<Location, Impl::TypeTrackingInput>
private import semmle.python.dataflow.new.internal.DataFlowPublic as DataFlowPublic

/**
* DEPRECATED.
*
* A string that may appear as the name of an attribute or access path.
*/
deprecated class AttributeName = Impl::TypeTrackingInput::Content;

/**
* A summary of the steps needed to track a value to a given dataflow node.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,6 @@ class Node extends TNode {
cached
Location getLocation() { none() }

/**
* 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
) {
Stages::DataFlow::ref() and
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
}

/** Gets the control-flow node corresponding to this node, if any. */
ControlFlowNode asCfgNode() { none() }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ module CodeInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand All @@ -57,9 +52,6 @@ module CodeInjection {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

/**
* A sanitizer defined via models-as-data with kind "code-injection".
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ module CommandInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down Expand Up @@ -92,9 +87,6 @@ module CommandInjection {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

/**
* A sanitizer defined via models-as-data with kind "command-injection".
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ module CookieInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ module HttpHeaderInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ module LdapInjection {
*/
abstract class FilterSanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand All @@ -69,17 +64,11 @@ module LdapInjection {
*/
class ConstCompareAsDnSanitizerGuard extends DnSanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsDnSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsDnSanitizerGuard;

/**
* A comparison with a constant, considered as a sanitizer-guard.
*/
class ConstCompareAsFilterSanitizerGuard extends FilterSanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsFilterSanitizerGuard instead. */
deprecated class StringConstCompareAsFilterSanitizerGuard = ConstCompareAsFilterSanitizerGuard;

/**
* A call to replace line breaks functions as a sanitizer.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ module LogInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down Expand Up @@ -85,9 +80,6 @@ module LogInjection {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

/**
* A call to replace line breaks, considered as a sanitizer.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ module PamAuthorizationCustomizations {
*/
abstract class Sink extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ module PathInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down Expand Up @@ -95,9 +90,6 @@ module PathInjection {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

/**
* A sanitizer defined via models-as-data with kind "path-injection".
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ module PolynomialReDoS {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand All @@ -82,7 +77,4 @@ module PolynomialReDoS {
* A comparison with a constant, considered as a sanitizer-guard.
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ module ReflectedXss {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down Expand Up @@ -81,9 +76,6 @@ module ReflectedXss {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

/**
* A sanitizer defined via models-as-data with kind "html-injection" or "js-injection".
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ module RegexInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ module ServerSideRequestForgery {
*/
abstract class FullUrlControlSanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand Down Expand Up @@ -81,9 +76,6 @@ module ServerSideRequestForgery {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

/**
* A string construction (concat, format, f-string) where the left side is not
* user-controlled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ module SqlInjection {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand All @@ -59,9 +54,6 @@ module SqlInjection {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

private import semmle.python.frameworks.data.ModelsAsData

/** A sink for sql-injection from model data. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ module UnsafeDeserialization {
*/
abstract class Sanitizer extends DataFlow::Node { }

/**
* DEPRECATED: Use `ActiveThreatModelSource` from Concepts instead!
*/
deprecated class RemoteFlowSourceAsSource = ActiveThreatModelSourceAsSource;

/** An active threat-model source, considered as a flow source. */
private class ActiveThreatModelSourceAsSource extends Source instanceof ActiveThreatModelSource {
}
Expand All @@ -62,9 +57,6 @@ module UnsafeDeserialization {
*/
class ConstCompareAsSanitizerGuard extends Sanitizer, ConstCompareBarrier { }

/** DEPRECATED: Use ConstCompareAsSanitizerGuard instead. */
deprecated class StringConstCompareAsSanitizerGuard = ConstCompareAsSanitizerGuard;

/**
* A sanitizer defined via models-as-data with kind "unsafe-deserialization".
*/
Expand Down
Loading
Loading