Skip to content

Commit c7aaad9

Browse files
committed
JS: avoid adding a deprecated CryptographicOperation#getInput to py/ruby
1 parent 8d90c02 commit c7aaad9

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

javascript/ql/lib/semmle/javascript/Concepts.qll

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,22 @@ abstract class PersistentWriteAccess extends DataFlow::Node {
115115
* Provides models for cryptographic things.
116116
*/
117117
module Cryptography {
118-
import semmle.javascript.internal.ConceptsShared::Cryptography
118+
private import semmle.javascript.internal.ConceptsShared::Cryptography as SC
119+
120+
class CryptographicOperation extends SC::CryptographicOperation instanceof CryptographicOperation::Range {
121+
/** DEPRECATED. This predicate has been renamed to `getAnInput`. */
122+
deprecated final DataFlow::Node getInput() { result = this.getAnInput() }
123+
}
124+
125+
class EncryptionAlgorithm = SC::EncryptionAlgorithm;
126+
127+
class HashingAlgorithm = SC::HashingAlgorithm;
128+
129+
class PasswordHashingAlgorithm = SC::PasswordHashingAlgorithm;
130+
131+
module CryptographicOperation = SC::CryptographicOperation;
132+
133+
class BlockMode = SC::BlockMode;
134+
135+
class CryptographicAlgorithm = SC::CryptographicAlgorithm;
119136
}

javascript/ql/lib/semmle/javascript/internal/ConceptsShared.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ module Cryptography {
4343
/** Gets an input the algorithm is used on, for example the plain text input to be encrypted. */
4444
DataFlow::Node getAnInput() { result = super.getAnInput() }
4545

46-
/** DEPRECATED. This predicate has been renamed to `getAnInput`. */
47-
deprecated final DataFlow::Node getInput() { result = super.getInput() }
48-
4946
/**
5047
* Gets the block mode used to perform this cryptographic operation.
5148
* This may have no result - for example if the `CryptographicAlgorithm` used
@@ -70,9 +67,6 @@ module Cryptography {
7067
/** Gets an input the algorithm is used on, for example the plain text input to be encrypted. */
7168
abstract DataFlow::Node getAnInput();
7269

73-
/** DEPRECATED. This predicate has been renamed to `getAnInput`. */
74-
deprecated final DataFlow::Node getInput() { result = this.getAnInput() }
75-
7670
/**
7771
* Gets the block mode used to perform this cryptographic operation.
7872
* This may have no result - for example if the `CryptographicAlgorithm` used

python/ql/lib/semmle/python/internal/ConceptsShared.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ module Cryptography {
4343
/** Gets an input the algorithm is used on, for example the plain text input to be encrypted. */
4444
DataFlow::Node getAnInput() { result = super.getAnInput() }
4545

46-
/** DEPRECATED. This predicate has been renamed to `getAnInput`. */
47-
deprecated final DataFlow::Node getInput() { result = super.getInput() }
48-
4946
/**
5047
* Gets the block mode used to perform this cryptographic operation.
5148
* This may have no result - for example if the `CryptographicAlgorithm` used
@@ -70,9 +67,6 @@ module Cryptography {
7067
/** Gets an input the algorithm is used on, for example the plain text input to be encrypted. */
7168
abstract DataFlow::Node getAnInput();
7269

73-
/** DEPRECATED. This predicate has been renamed to `getAnInput`. */
74-
deprecated final DataFlow::Node getInput() { result = this.getAnInput() }
75-
7670
/**
7771
* Gets the block mode used to perform this cryptographic operation.
7872
* This may have no result - for example if the `CryptographicAlgorithm` used

ruby/ql/lib/codeql/ruby/internal/ConceptsShared.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ module Cryptography {
4343
/** Gets an input the algorithm is used on, for example the plain text input to be encrypted. */
4444
DataFlow::Node getAnInput() { result = super.getAnInput() }
4545

46-
/** DEPRECATED. This predicate has been renamed to `getAnInput`. */
47-
deprecated final DataFlow::Node getInput() { result = super.getInput() }
48-
4946
/**
5047
* Gets the block mode used to perform this cryptographic operation.
5148
* This may have no result - for example if the `CryptographicAlgorithm` used
@@ -70,9 +67,6 @@ module Cryptography {
7067
/** Gets an input the algorithm is used on, for example the plain text input to be encrypted. */
7168
abstract DataFlow::Node getAnInput();
7269

73-
/** DEPRECATED. This predicate has been renamed to `getAnInput`. */
74-
deprecated final DataFlow::Node getInput() { result = this.getAnInput() }
75-
7670
/**
7771
* Gets the block mode used to perform this cryptographic operation.
7872
* This may have no result - for example if the `CryptographicAlgorithm` used

0 commit comments

Comments
 (0)