Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Rust: Prefer getExpr() over getAstNode().
  • Loading branch information
geoffw0 committed May 19, 2025
commit b503b1ef6ccae745b728267da585dc0559333bb5
4 changes: 2 additions & 2 deletions rust/ql/lib/codeql/rust/security/SensitiveData.qll
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ private class SensitiveVariableAccess extends SensitiveData {

SensitiveVariableAccess() {
HeuristicNames::nameIndicatesSensitiveData(this.asExpr()
.getAstNode()
.getExpr()
.(VariableAccess)
.getVariable()
.(Variable)
@@ -69,7 +69,7 @@ private class SensitiveFieldAccess extends SensitiveData {
SensitiveDataClassification classification;

SensitiveFieldAccess() {
exists(FieldExpr fe | fieldExprParentField*(fe) = this.asExpr().getAstNode() |
exists(FieldExpr fe | fieldExprParentField*(fe) = this.asExpr().getExpr() |
HeuristicNames::nameIndicatesSensitiveData(fe.getIdentifier().getText(), classification)
)
}