Add aliases for public, importable renamed classes and predicates.

Also rename and aliases a couple of uses of Access noted along the way.
This commit is contained in:
Chris Smowton
2023-10-24 10:54:35 +01:00
committed by GitHub
parent f552a15aae
commit 59a49eef0b
20 changed files with 93 additions and 19 deletions

View File

@@ -54,6 +54,9 @@ class SqlResourceOpeningMethodCall extends MethodCall {
}
}
/** DEPRECATED: Alias for `SqlResourceOpeningMethodCall`. */
deprecated class SqlResourceOpeningMethodAccess = SqlResourceOpeningMethodCall;
/**
* A candidate for a "closeable init" expression, which may require calling a "close" method.
*/

View File

@@ -13,6 +13,6 @@
import java
import semmle.code.java.security.HardcodedCredentialsComparison
from EqualsAccess sink, HardcodedExpr source, PasswordVariable p
from EqualsCall sink, HardcodedExpr source, PasswordVariable p
where isHardcodedCredentialsComparison(sink, source, p)
select source, "Hard-coded value is $@ with password variable $@.", sink, "compared", p, p.getName()

View File

@@ -45,8 +45,8 @@ module UnsafeReflectionConfig implements DataFlow::ConfigSig {
// Qualifier -> return of Class.getDeclaredConstructors/Methods and similar
exists(MethodCall ma |
(
ma instanceof ReflectiveConstructorsAccess or
ma instanceof ReflectiveMethodsAccess
ma instanceof ReflectiveConstructorsCall or
ma instanceof ReflectiveMethodsCall
) and
ma.getQualifier() = pred.asExpr() and
ma = succ.asExpr()