Skip to content

Commit b6f8e50

Browse files
committed
JS: Rewrite to use SensitiveDataClassification::password (and like)
1 parent 94fec5f commit b6f8e50

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

javascript/ql/src/semmle/javascript/security/SensitiveActions.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ class ProtectCall extends DataFlow::CallNode {
169169

170170
/** An expression that might contain a clear-text password. */
171171
class CleartextPasswordExpr extends SensitiveExpr {
172-
CleartextPasswordExpr() { this.(SensitiveExpr).getClassification() = SensitiveExpr::password() }
172+
CleartextPasswordExpr() {
173+
this.(SensitiveExpr).getClassification() = SensitiveDataClassification::password()
174+
}
173175

174176
override string describe() { none() }
175177

javascript/ql/src/semmle/javascript/security/dataflow/CleartextStorageCustomizations.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module CleartextStorage {
3535

3636
SensitiveExprSource() {
3737
// storing user names or account names in plaintext isn't usually a problem
38-
astNode.getClassification() != SensitiveExpr::id()
38+
astNode.getClassification() != SensitiveDataClassification::id()
3939
}
4040

4141
override string describe() { result = astNode.describe() }

javascript/ql/src/semmle/javascript/security/dataflow/InsufficientPasswordHashCustomizations.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ module InsufficientPasswordHash {
3434
class CleartextPasswordSource extends Source, DataFlow::ValueNode {
3535
override SensitiveExpr astNode;
3636

37-
CleartextPasswordSource() { astNode.getClassification() = SensitiveExpr::password() }
37+
CleartextPasswordSource() {
38+
astNode.getClassification() = SensitiveDataClassification::password()
39+
}
3840

3941
override string describe() { result = astNode.describe() }
4042
}

0 commit comments

Comments
 (0)