Skip to content

Commit a88f3ce

Browse files
authored
Merge pull request #160 from microsoft/dilan/remove-js-dataflow-deprecation-labels
TEMPORARY: Remove JavaScript Deprecation Labels
2 parents 29d07ae + 34a577d commit a88f3ce

20 files changed

+159
-159
lines changed

javascript/ql/lib/semmle/javascript/dataflow/AdditionalFlowSteps.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class LegacyFlowStep extends Unit {
152152
* Holds if `pred` → `succ` should be considered a data flow edge
153153
* transforming values with label `predlbl` to have label `succlbl`.
154154
*/
155-
deprecated predicate step(
155+
predicate step(
156156
DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel predlbl,
157157
DataFlow::FlowLabel succlbl
158158
) {
@@ -207,7 +207,7 @@ module LegacyFlowStep {
207207
* transforming values with label `predlbl` to have label `succlbl`.
208208
*/
209209
cached
210-
deprecated predicate step(
210+
predicate step(
211211
DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel predlbl,
212212
DataFlow::FlowLabel succlbl
213213
) {
@@ -282,7 +282,7 @@ class SharedFlowStep extends Unit {
282282
* Holds if `pred` → `succ` should be considered a data flow edge
283283
* transforming values with label `predlbl` to have label `succlbl`.
284284
*/
285-
deprecated predicate step(
285+
predicate step(
286286
DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel predlbl,
287287
DataFlow::FlowLabel succlbl
288288
) {
@@ -364,7 +364,7 @@ module SharedFlowStep {
364364
* Holds if `pred` → `succ` should be considered a data flow edge
365365
* transforming values with label `predlbl` to have label `succlbl`.
366366
*/
367-
deprecated predicate step(
367+
predicate step(
368368
DataFlow::Node pred, DataFlow::Node succ, DataFlow::FlowLabel predlbl,
369369
DataFlow::FlowLabel succlbl
370370
) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Alias for the library `semmle.javascript.explore.BackwardDataFlow`.
33
*/
4-
deprecated module;
4+
// deprecated module;
55

66
import semmle.javascript.explore.BackwardDataFlow

javascript/ql/lib/semmle/javascript/dataflow/Configuration.qll

Lines changed: 93 additions & 93 deletions
Large diffs are not rendered by default.

javascript/ql/lib/semmle/javascript/dataflow/DataFlow.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ module DataFlow {
19291929
import Nodes
19301930
import Sources
19311931
import TypeInference
1932-
deprecated import Configuration
1932+
import Configuration
19331933
import TypeTracking
19341934
import AdditionalFlowSteps
19351935
import internal.FunctionWrapperSteps
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Alias for the library `semmle.javascript.explore.ForwardDataFlow`.
33
*/
4-
deprecated module;
4+
// deprecated module;
55

66
import semmle.javascript.explore.ForwardDataFlow

javascript/ql/lib/semmle/javascript/dataflow/TaintTracking.qll

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module TaintTracking {
3737
* If a different set of flow edges is desired, extend this class and override
3838
* `isAdditionalTaintStep`.
3939
*/
40-
abstract deprecated class Configuration extends DataFlow::Configuration {
40+
abstract class Configuration extends DataFlow::Configuration {
4141
bindingset[this]
4242
Configuration() { any() }
4343

@@ -210,16 +210,16 @@ module TaintTracking {
210210
abstract private class LegacyAdditionalBarrierGuard extends AdditionalBarrierGuard,
211211
AdditionalSanitizerGuardNodeDeprecated
212212
{
213-
deprecated override predicate sanitizes(boolean outcome, Expr e) { this.blocksExpr(outcome, e) }
213+
override predicate sanitizes(boolean outcome, Expr e) { this.blocksExpr(outcome, e) }
214214

215-
deprecated override predicate appliesTo(Configuration cfg) { any() }
215+
override predicate appliesTo(Configuration cfg) { any() }
216216
}
217217

218218
/**
219219
* DEPRECATED. This class was part of the old data flow library which is now deprecated.
220220
* Use `TaintTracking::AdditionalBarrierGuard` instead.
221221
*/
222-
deprecated class AdditionalSanitizerGuardNode = AdditionalSanitizerGuardNodeDeprecated;
222+
class AdditionalSanitizerGuardNode = AdditionalSanitizerGuardNodeDeprecated;
223223

224224
cached
225225
abstract private class AdditionalSanitizerGuardNodeDeprecated extends DataFlow::Node {
@@ -229,20 +229,20 @@ module TaintTracking {
229229
* Holds if this node blocks expression `e`, provided it evaluates to `outcome`.
230230
*/
231231
cached
232-
deprecated predicate blocks(boolean outcome, Expr e) { none() }
232+
predicate blocks(boolean outcome, Expr e) { none() }
233233

234234
/**
235235
* Holds if this node sanitizes expression `e`, provided it evaluates
236236
* to `outcome`.
237237
*/
238238
cached
239-
abstract deprecated predicate sanitizes(boolean outcome, Expr e);
239+
abstract predicate sanitizes(boolean outcome, Expr e);
240240

241241
/**
242242
* Holds if this node blocks expression `e` from flow of type `label`, provided it evaluates to `outcome`.
243243
*/
244244
cached
245-
deprecated predicate blocks(boolean outcome, Expr e, DataFlow::FlowLabel label) {
245+
predicate blocks(boolean outcome, Expr e, DataFlow::FlowLabel label) {
246246
this.sanitizes(outcome, e) and label.isTaint()
247247
or
248248
this.sanitizes(outcome, e, label)
@@ -253,13 +253,13 @@ module TaintTracking {
253253
* to `outcome`.
254254
*/
255255
cached
256-
deprecated predicate sanitizes(boolean outcome, Expr e, DataFlow::FlowLabel label) { none() }
256+
predicate sanitizes(boolean outcome, Expr e, DataFlow::FlowLabel label) { none() }
257257

258258
/**
259259
* Holds if this guard applies to the flow in `cfg`.
260260
*/
261261
cached
262-
abstract deprecated predicate appliesTo(Configuration cfg);
262+
abstract predicate appliesTo(Configuration cfg);
263263
}
264264

265265
/**
@@ -274,7 +274,7 @@ module TaintTracking {
274274
* implementations of `sanitizes` will _both_ apply to any configuration that includes either of
275275
* them.
276276
*/
277-
abstract deprecated class SanitizerGuardNode extends DataFlow::BarrierGuardNode {
277+
abstract class SanitizerGuardNode extends DataFlow::BarrierGuardNode {
278278
override predicate blocks(boolean outcome, Expr e) { none() }
279279

280280
/**
@@ -299,7 +299,7 @@ module TaintTracking {
299299
/**
300300
* A sanitizer guard node that only blocks specific flow labels.
301301
*/
302-
abstract deprecated class LabeledSanitizerGuardNode extends SanitizerGuardNode,
302+
abstract class LabeledSanitizerGuardNode extends SanitizerGuardNode,
303303
DataFlow::BarrierGuardNode
304304
{
305305
override predicate sanitizes(boolean outcome, Expr e) { none() }
@@ -902,7 +902,7 @@ module TaintTracking {
902902
}
903903
}
904904

905-
deprecated private class AdHocWhitelistCheckSanitizerAsSanitizerGuardNode extends SanitizerGuardNode instanceof AdHocWhitelistCheckSanitizer
905+
private class AdHocWhitelistCheckSanitizerAsSanitizerGuardNode extends SanitizerGuardNode instanceof AdHocWhitelistCheckSanitizer
906906
{
907907
override predicate sanitizes(boolean outcome, Expr e) { super.blocksExpr(outcome, e) }
908908
}

javascript/ql/lib/semmle/javascript/dataflow/internal/BarrierGuards.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module MakeBarrierGuard<BarrierGuardSig BaseGuard> {
3636
}
3737
}
3838

39-
deprecated private module DeprecationWrapper {
39+
private module DeprecationWrapper {
4040
signature class LabeledBarrierGuardSig extends DataFlow::Node {
4141
/**
4242
* Holds if this node acts as a barrier for `label`, blocking further flow from `e` if `this` evaluates to `outcome`.
@@ -48,7 +48,7 @@ deprecated private module DeprecationWrapper {
4848
/**
4949
* Converts a barrier guard class to a set of nodes to include in an implementation of `isBarrier(node, label)`.
5050
*/
51-
deprecated module MakeLabeledBarrierGuard<DeprecationWrapper::LabeledBarrierGuardSig BaseGuard> {
51+
module MakeLabeledBarrierGuard<DeprecationWrapper::LabeledBarrierGuardSig BaseGuard> {
5252
final private class FinalBaseGuard = BaseGuard;
5353

5454
private class Adapter extends FinalBaseGuard {
@@ -71,15 +71,15 @@ deprecated module MakeLabeledBarrierGuard<DeprecationWrapper::LabeledBarrierGuar
7171
* This module is a workaround for the fact that deprecated signatures can't refer to deprecated classes
7272
* without getting a deprecation warning
7373
*/
74-
deprecated private module DeprecatedSigs {
74+
private module DeprecatedSigs {
7575
signature predicate isBarrierGuardSig(DataFlow::BarrierGuardNode node);
7676
}
7777

7878
/**
7979
* Converts a labeled barrier guard class to a set of nodes to include in an implementation of `isBarrier(node)` and `isBarrier(node, label)`
8080
* in a `DataFlow::StateConfigSig` implementation.
8181
*/
82-
deprecated module MakeLegacyBarrierGuardLabeled<DeprecatedSigs::isBarrierGuardSig/1 isBarrierGuard> {
82+
module MakeLegacyBarrierGuardLabeled<DeprecatedSigs::isBarrierGuardSig/1 isBarrierGuard> {
8383
final private class FinalNode = DataFlow::Node;
8484

8585
private class Adapter extends FinalNode instanceof DataFlow::BarrierGuardNode {
@@ -110,7 +110,7 @@ deprecated module MakeLegacyBarrierGuardLabeled<DeprecatedSigs::isBarrierGuardSi
110110
/**
111111
* Converts a barrier guard class to a set of nodes to include in an implementation of `isBarrier(node)` in a `DataFlow::ConfigSig` implementation.
112112
*/
113-
deprecated module MakeLegacyBarrierGuard<DeprecatedSigs::isBarrierGuardSig/1 isBarrierGuard> {
113+
module MakeLegacyBarrierGuard<DeprecatedSigs::isBarrierGuardSig/1 isBarrierGuard> {
114114
final private class FinalNode = DataFlow::Node;
115115

116116
private class Adapter extends FinalNode instanceof DataFlow::BarrierGuardNode {

javascript/ql/lib/semmle/javascript/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ abstract private class BarrierGuardAdapter extends DataFlow::Node {
10841084
predicate blocksExpr(boolean outcome, Expr e) { none() }
10851085
}
10861086

1087-
deprecated private class BarrierGuardAdapterSubclass extends BarrierGuardAdapter instanceof DataFlow::AdditionalBarrierGuardNode
1087+
private class BarrierGuardAdapterSubclass extends BarrierGuardAdapter instanceof DataFlow::AdditionalBarrierGuardNode
10881088
{
10891089
override predicate blocksExpr(boolean outcome, Expr e) { super.blocks(outcome, e) }
10901090
}

javascript/ql/lib/semmle/javascript/dataflow/internal/FlowSteps.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import javascript
8-
deprecated import semmle.javascript.dataflow.Configuration
8+
import semmle.javascript.dataflow.Configuration
99
import semmle.javascript.dataflow.internal.CallGraphs
1010
private import semmle.javascript.internal.CachedStages
1111

@@ -49,7 +49,7 @@ private predicate legacyPostUpdateStep(DataFlow::Node pred, DataFlow::Node succ)
4949
* additional steps from the configuration into account.
5050
*/
5151
pragma[inline]
52-
deprecated predicate localFlowStep(
52+
predicate localFlowStep(
5353
DataFlow::Node pred, DataFlow::Node succ, DataFlow::Configuration configuration,
5454
FlowLabel predlbl, FlowLabel succlbl
5555
) {
@@ -545,9 +545,9 @@ class Boolean extends boolean {
545545
/**
546546
* A summary of an inter-procedural data flow path.
547547
*/
548-
deprecated newtype TPathSummary =
548+
newtype TPathSummary =
549549
/** A summary of an inter-procedural data flow path. */
550-
deprecated MkPathSummary(Boolean hasReturn, Boolean hasCall, FlowLabel start, FlowLabel end)
550+
MkPathSummary(Boolean hasReturn, Boolean hasCall, FlowLabel start, FlowLabel end)
551551

552552
/**
553553
* A summary of an inter-procedural data flow path.
@@ -560,7 +560,7 @@ deprecated newtype TPathSummary =
560560
* We only want to build properly matched call/return sequences, so if a path has both
561561
* call steps and return steps, all return steps must precede all call steps.
562562
*/
563-
deprecated class PathSummary extends TPathSummary {
563+
class PathSummary extends TPathSummary {
564564
Boolean hasReturn;
565565
Boolean hasCall;
566566
FlowLabel start;
@@ -634,7 +634,7 @@ deprecated class PathSummary extends TPathSummary {
634634
}
635635
}
636636

637-
deprecated module PathSummary {
637+
module PathSummary {
638638
/**
639639
* Gets a summary describing a path without any calls or returns.
640640
*/

javascript/ql/lib/semmle/javascript/explore/BackwardDataFlow.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
* Backward exploration in particular does not scale on non-trivial code bases and hence is of limited
1313
* usefulness as it stands.
1414
*/
15-
deprecated module;
15+
module;
1616

1717
import javascript
1818

19-
deprecated private class BackwardExploringConfiguration extends DataFlow::Configuration {
19+
private class BackwardExploringConfiguration extends DataFlow::Configuration {
2020
BackwardExploringConfiguration() { this = any(DataFlow::Configuration cfg) }
2121

2222
override predicate isSource(DataFlow::Node node) { any() }

0 commit comments

Comments
 (0)