- When a code-scanning configuration specifies the
paths:and/orpaths-ignore:settings, these are now taken into account by the Java extractor's search for XML and properties files. - Additional remote flow sources from the
org.springframework.web.socketpackage have been modeled. - A sanitizer has been added to
java/ssrfto remove alerts when a regular expression check is used to verify that the value is safe. - URI template variables of all Spring
RestTemplatemethods are now considered as request forgery sinks. Previously only thegetForObjectmethod was considered. This may lead to more alerts for the queryjava/ssrf. - Added more dataflow models of
org.apache.commons.fileupload.FileItem,javax/jakarta.servlet.http.Partandorg.apache.commons.fileupload.util.Streams.
No user-facing changes.
No user-facing changes.
No user-facing changes.
- The SSA interface has been updated and all classes and several predicates have been renamed. See the qldoc for more specific migration information.
No user-facing changes.
No user-facing changes.
- Fields of certain objects are considered tainted if the object is tainted. This holds, for example, for objects that occur directly as sources in the active threat model (for instance, a remote flow source). This has now been amended to also include array types, such that if an array like
MyPojo[]is a source, then fields of a taintedMyPojoare now also considered tainted.
No user-facing changes.
- The Java extractor and QL libraries now support Java 25.
- Added support for Java 25 compact source files (JEP 512). The new predicate
Class.isImplicit()identifies classes that are implicitly declared when using compact source files, and the new predicateCompilationUnit.isCompactSourceFile()identifies compilation units that contain compact source files. - Added support for Java 25 module import declarations.
- Add
ModuleImportDeclarationclass.
- Improved support for various assertion libraries, in particular JUnit. This affects the control-flow graph slightly, and in turn affects several queries (mainly quality queries). Most queries should see improved precision (new true positives and fewer false positives), in particular
java/constant-comparison,java/index-out-of-bounds,java/dereferenced-value-may-be-null, andjava/useless-null-check. Some medium precision queries likejava/toctou-race-conditionandjava/unreleased-lockmay see mixed result changes (both slight improvements and slight regressions). - Added taint flow model for
java.crypto.KDF. - Added taint flow model for
java.lang.ScopedValue.
No user-facing changes.
- Added library models for the relevant method calls under
jakarta.servlet.ServletRequestandjakarta.servlet.http.HttpServletRequestas remote flow sources.
- Guard implication logic involving wrapper methods has been improved. In particular, this means fewer false positives for
java/dereferenced-value-may-be-null.
- Kotlin versions up to 2.2.2\ x are now supported.
- The module
semmle.code.java.frameworks.Castorhas been deprecated and will be removed in a future release. - The module
semmle.code.java.frameworks.JYamlhas been deprecated and will be removed in a future release. - The classes
UnsafeHessianInputReadObjectMethodandBurlapInputReadObjectMethodin the modulesemmle.code.java.frameworks.HessianBurlaphave been deprecated and will be removed in a future release. - The class
YamlBeansReaderReadMethodin the modulesemmle.code.java.frameworks.YamlBeanshas been deprecated and will be removed in a future release. - The class
MethodApacheSerializationUtilsDeserializein the modulesemmle.code.java.frameworks.apache.Langhas been deprecated and will be removed in a future release.
- You can now add sinks for the query "Deserialization of user-controlled data" (
java/unsafe-deserialization) using data extensions by extendingsinkModeland using the kind "unsafe-deserialization". The existing sinks that do not require extra logic to determine if they are unsafe are now defined in this way.
- The qualifiers of a calls to
readObjecton any classes that implementjava.io.ObjectInputare now recognised as sinks forjava/unsafe-deserialization. Previously this was only the case for classes which extendjava.io.ObjectInputStream.
- Java
assertstatements are now assumed to be executed for the purpose of analysing control flow. This improves precision for a number of queries.
No user-facing changes.
- The predicate
getValue()onSpringRequestMappingMethodis now deprecated. UsegetAValue()instead. - Java now uses the shared
BasicBlocklibrary. This means that the names of several member predicates have been changed to align with the names used in other languages. The old predicates have been deprecated. TheBasicBlockclass itself no longer extendsControlFlowNode- the predicategetFirstNodecan be used to fix any QL code that somehow relied on this.
- Kotlin versions up to 2.2.0\ x are now supported. Support for the Kotlin 1.5.x series is dropped (so the minimum Kotlin version is now 1.6.0).
No user-facing changes.
- Enum-typed values are now assumed to be safe by most queries. This means that queries may return fewer results where an enum value is used in a sensitive context, e.g. pasted into a query string.
- All existing modelling and support for
javax.persistencenow applies tojakarta.persistenceas well.
- Java extraction is now able to download Maven 3.9.x if a Maven Enforcer Plugin configuration indicates it is necessary. Maven 3.8.x is still preferred if the enforcer-plugin configuration (if any) permits it.
- Added a path injection sanitizer for calls to
java.lang.String.matches,java.lang.String.replace, andjava.lang.String.replaceAllthat make sure/,\\,..are not in the path.
- In
build-mode: nonewhere the project has a Gradle build system, database creation no longer attempts to download some non-existent jar files relating to non-jar Maven artifacts, such as BOMs. This was harmless, but saves some time and reduces spurious warnings. - Java extraction no longer freezes for a long time or times out when using libraries that feature expanding cyclic generic types. For example, this was known to occur when using some classes from the Blazebit Persistence library.
- Java build-mode
noneno longer fails when a required version of Gradle cannot be downloaded using thegradle wrappercommand, such as due to a firewall. It will now attempt to use the system version of Gradle if present, or otherwise proceed without detailed dependency information. - Java build-mode
noneno longer fails when a required version of Maven cannot be downloaded, such as due to a firewall. It will now attempt to use the system version of Maven if present, or otherwise proceed without detailed dependency information. - Java build-mode
nonenow correctly uses Maven dependency information on Windows platforms.
No user-facing changes.
- The Java extractor and QL libraries now support Java 24.
- Added a path injection sanitizer for the
childargument of ajava.io.Fileconstructor if that argument does not contain path traversal sequences.
No user-facing changes.
- Deleted the deprecated
isLValueandisRValuepredicates from theVarAccessclass, useisVarWriteandisVarReadrespectively instead. - Deleted the deprecated
getRhspredicate from theVarWriteclass, usegetASourceinstead. - Deleted the deprecated
LValueandRValueclasses, useVarWriteandVarReadrespectively instead. - Deleted a lot of deprecated classes ending in
*Access, use the corresponding*Callclasses instead. - Deleted a lot of deprecated predicates ending in
*Access, use the corresponding*Callpredicates instead. - Deleted the deprecated
EnvInputandDatabaseInputclasses fromFlowSources.qll, use the threat models feature instead. - Deleted some deprecated API predicates from
SensitiveApi.qll, use the Sink classes from that file instead.
- We now allow classes which don't have any JAX-RS annotations to inherit JAX-RS annotations from superclasses or interfaces. This is not allowed in the JAX-RS specification, but some implementations, like Apache CXF, allow it. This may lead to more alerts being found.
- The Java and Kotlin extractors now support
CODEQL_PATH_TRANSFORMER.SEMMLE_PATH_TRANSFORMERis still supported, but deprecated.
JavacTool-based compiler interception no longer requires an--add-opensdirective whenFileObject.toUriis accessible.JavacTool-based compiler interception no longer throws an exception visible to the program usingJavacToolon failure to extract a file path from a passedJavaFileObject.JavacTool-based compiler interception now supports files that don't simply wrap afile://URL, such as a source file inside a JAR, or an in-memory file, but which do implementgetCharContent.
- The class
ControlFlowNode(and by extensionBasicBlock) is no longer directly equatable toExprandStmt. Any queries that have been exploiting these equalities, for example by using casts, will need minor updates in order to fix any compilation errors. Conversions can be inserted in either direction depending on what is most convenient. Available conversions includeExpr.getControlFlowNode(),Stmt.getControlFlowNode(),ControlFlowNode.asExpr(),ControlFlowNode.asStmt(), andControlFlowNode.asCall(). Exit nodes were until now modelled as aControlFlowNodeequal to its enclosingCallable; these are now instead modelled by the classControlFlow::ExitNode.
- Added
java.io.File.getName()as a path injection sanitizer. - The data flow library has been updated to track types in a slightly different way: The type of the tainted data (which may be stored into fields, etc.) is tracked more precisely, while the types of intermediate containers for nested contents is tracked less precisely. This may have a slight effect on false positives for complex flow paths.
- Added a sink for "Server-side request forgery" (
java/ssrf) for the third parameter to org.springframework.web.client.RestTemplate.getForObject, when we cannot statically determine that it does not affect the host in the URL.
- Deleted the old deprecated data flow API that was based on extending a configuration class. See https://github.blog/changelog/2023-08-14-new-dataflow-api-for-writing-custom-codeql-queries for instructions on migrating your queries to use the new API.
- Calling
coll.contains(x)is now a taint sanitizer (for any query) for the valuex, wherecollis a collection of constants.
- In a switch statement with a constant switch expression, all non-matching cases were being marked as unreachable, including those that can be reached by falling through from the matching case. This has now been fixed.
- Java: The generated JDK 17 models have been updated.
- Java
build-mode=noneextraction now packages the Maven plugin used to examine project dependencies. This means that dependency identification is more likely to succeed, and therefore analysis quality may rise, in scenarios where Maven Central is not reachable.
No user-facing changes.
- The
Field.getSourceDeclaration()predicate has been deprecated. The result was always the original field, so calls to it can simply be removed. - The
Field.isSourceDeclaration()predicate has been deprecated. It always holds. - The
RefType.nestedName()predicate has been deprecated, andRefType.getNestedName()added to replace it. - The class
ThreatModelFlowSourcehas been renamed toActiveThreatModelSourceto more clearly reflect it only contains the currently active threat model sources.ThreatModelFlowSourcehas been marked as deprecated.
- The Java extractor and QL libraries now support Java 23.
- Kotlin versions up to 2.1.0\ x are now supported.
- Deleted the deprecated
ProcessBuilderConstructor,MethodProcessBuilderCommand, andMethodRuntimeExecfromJDK.qll. - Deleted the deprecated
explorationLimitpredicate fromDataFlow::Configuration, useFlowExploration<explorationLimit>instead. - Deleted many deprecated taint-tracking configurations based on
TaintTracking::Configuration. - Deleted the deprecated
getURIpredicate fromCamelJavaDslToDeclandSpringCamelXmlToElement, usegetUriinstead. - Deleted the deprecated
ExecCallableclass fromExternalProcess.qll. - Deleted many deprecated dataflow configurations based on
DataFlow::Configuration. - Deleted the deprecated
PathCreation.qllfile. - Deleted the deprecated
WebviewDubuggingEnabledQuery.qllfile.
- A generated (Models as Data) summary model is no longer used, if there exists a source code alternative. This primarily affects the analysis, when the analysis includes generated models for the source code being analysed.
No user-facing changes.
- Threat-model for
System.inchanged fromcommandargsto newly createdstdin(both subgroups oflocal).
- Fixed an issue where analysis in
build-mode: nonemay very occasionally throw aCoderMalfunctionErrorwhile resolving dependencies provided by a build system (Maven or Gradle), which could cause some dependency resolution and consequently alerts to vary unpredictably from one run to another. - Fixed an issue where Java analysis in
build-mode: nonewould fail to resolve dependencies using theexecutable-warMaven artifact type. - Fixed an issue where analysis in
build-mode: nonemay fail to resolve dependencies of Gradle projects where the dependency uses a non-empty artifact classifier -- for example,someproject-1.2.3-tests.jar, which has the classifiertests.
- The Java and Kotlin extractors no longer support the
SOURCE_ARCHIVEandTRAP_FOLDERlegacy environment variable.
- Java support for
build-mode: noneis now out of beta, and generally available.
- We previously considered reverse DNS resolutions (IP address -> domain name) as sources of untrusted data, since compromised/malicious DNS servers could potentially return malicious responses to arbitrary requests. We have now removed this source from the default set of untrusted sources and made a new threat model kind for them, called "reverse-dns". You can optionally include other threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see Analyzing your code with CodeQL queries and Customizing your advanced setup for code scanning.
- Added flow through some methods of the class
java.net.URLby ensuring that the fields of a URL are tainted. - Added path-injection sinks for
org.apache.tools.ant.taskdefs.Property.setFileandorg.apache.tools.ant.taskdefs.Property.setResource. - Adds models for request handlers using the
org.lastaflute.webweb framework.
- The Java extractor no longer supports the
SEMMLE_DISTlegacy environment variable.
- The predicate
isAndroidfrom the modulesemmle.code.java.security.AndroidCertificatePinningQueryhas been deprecated. Usesemmle.code.java.frameworks.android.Android::inAndroidApplication(File)instead.
- Kotlin support is now out of beta, and generally available
- Kotlin versions up to 2.0.2x are now supported.
- Added a path-injection sink for
hudson.FilePath.exists(). - Added summary models for
org.apache.commons.io.IOUtils.toByteArray. - Java build-mode
noneanalyses now only report a warning on the CodeQL status page when there are significant analysis problems-- defined as 5% of expressions lacking a type, or 5% of call targets being unknown. Other messages reported on the status page are downgraded from warnings to notes and so are less prominent, but are still available for review.
-
Added models for the following packages:
- io.undertow.server.handlers.resource
- jakarta.faces.context
- javax.faces.context
- javax.servlet
- org.jboss.vfs
- org.springframework.core.io
-
A bug has been fixed in the heuristic identification of uncertain control flow, which is used to filter data flow in order to improve performance and reduce false positives. This fix means that slightly more code is identified and hence pruned from data flow.
-
Excluded reverse DNS from the loopback address as a source of untrusted data.
- Support for
codeql test runfor Kotlin sources has been fixed.
No user-facing changes.
- The precision of virtual dispatch has been improved. This increases precision in general for all data flow queries.
- Support for Eclipse Compiler for Java (ecj) has been fixed to work with (a) runs that don't pass
-noExitand (b) runs that use post-Java-9 command-line arguments.
- CodeQL package management is now generally available, and all GitHub-produced CodeQL packages have had their version numbers increased to 1.0.0.
- Added support for data flow through side-effects on static fields. For example, when a static field containing an array is updated.
- JDK version detection based on Gradle projects has been improved. Java extraction using build-modes
autobuildornoneis more likely to pick an appropriate JDK version, particularly when the Android Gradle Plugin or Spring Boot Plugin are in use.
- The Java extractor no longer supports the
ODASA_JAVA_LAYOUT,ODASA_TOOLSandODASA_HOMElegacy environment variables. - The Java extractor no longer supports the
ODASA_BUILD_ERROR_DIRlegacy environment variable.
- Deleted the deprecated
AssignLShiftExpr,AssignRShiftExpr,AssignURShiftExpr,LShiftExpr,RShiftExpr, andURShiftExpraliases.
- About 6,700 summary models and 6,800 neutral summary models for the JDK that were generated using data flow have been added. This may lead to new alerts being reported.
- The Java extractor no longer supports the
ODASA_SNAPSHOTlegacy environment variable.
- Increased the precision of some dataflow models of the class
java.net.URLby distinguishing the parts of a URL. - The Java extractor and QL libraries now support Java 22, including support for anonymous variables, lambda parameters and patterns.
- Pattern cases with multiple patterns and that fall through to or from other pattern cases are now supported. The
PatternCaseclass gains the newgetPatternAtIndexandgetAPatternpredicates, and deprecatesgetPattern. - Added a
path-injectionsink for theopenmethods of theandroid.os.ParcelFileDescriptorclass.
No user-facing changes.
No user-facing changes.
- Java expressions with erroneous types (e.g. the result of a call whose callee couldn't be resolved during extraction) are now given a CodeQL
ErrorTypemore often.
- Fixed the Java autobuilder overriding the version of Maven used by a project when the Maven wrapper
mvnwis in use and themaven-wrapper.jarfile is not present in the repository. - Some flow steps related to
android.text.Editable.toStringthat were accidentally disabled have been re-enabled.
- The
PathCreationclass inPathCreation.qllhas been deprecated.
-
An extension point for sanitizers of the query
java/unvalidated-url-redirectionhas been added. -
Added models for the following packages:
- java.io
- java.lang
- java.net
- java.net.http
- java.nio.file
- java.util.zip
- javax.servlet
- org.apache.commons.io
- org.apache.hadoop.fs
- org.apache.hadoop.fs.s3a
- org.eclipse.jetty.client
- org.gradle.api.file
-
Added models for the following packages:
- com.fasterxml.jackson.databind
- javax.servlet
-
Added the
java.util.Dateandjava.util.UUIDclasses to the list of types in theSimpleTypeSanitizerclass insemmle.code.java.security.Sanitizers.
- Added a new library
semmle.code.java.security.Sanitizerswhich contains a new sanitizer classSimpleTypeSanitizer, which represents nodes which cannot realistically carry taint for most queries (e.g. primitives, their boxed equivalents, and numeric types). - Converted definitions of
isBarrierand sanitizer classes to useSimpleTypeSanitizerinstead of checking ifnode.getType()isPrimitiveTypeorBoxedType.
- Deleted many deprecated predicates and classes with uppercase
EJB,JMX,NFE,DNSetc. in their names. Use the PascalCased versions instead. - Deleted the deprecated
semmle/code/java/security/OverlyLargeRangeQuery.qll,semmle/code/java/security/regexp/ExponentialBackTracking.qll,semmle/code/java/security/regexp/NfaUtils.qll, andsemmle/code/java/security/regexp/NfaUtils.qllfiles. - Improved models for
java.lang.Throwableandjava.lang.Exception, and thevalueOfmethod ofjava.lang.String. - Added taint tracking for the following GSON methods:
com.google.gson.stream.JsonReaderconstructorcom.google.gson.stream.JsonWriterconstructorcom.google.gson.JsonObject.getAsJsonArraycom.google.gson.JsonObject.getAsJsonObjectcom.google.gson.JsonObject.getAsJsonPrimitivecom.google.gson.JsonParser.parseReadercom.google.gson.JsonParser.parseString
- Added a dataflow model for
java.awt.Desktop.browse(URI).
- Fixed regular expressions containing flags not being parsed correctly in some cases.
- Imports of the old dataflow libraries (e.g.
semmle.code.java.dataflow.DataFlow2) have been deprecated in the libraries under thesemmle.code.java.securitynamespace.
-
Added the
Map#replaceandMap#replaceAllmethods to theMapMutatorclass insemmle.code.java.Maps. -
Taint tracking now understands Kotlin's
Array.getandArray.setmethods. -
Added a sink model for the
createRelativemethod of theorg.springframework.core.io.Resourceinterface. -
Added source models for methods of the
org.springframework.web.util.UrlPathHelperclass and removed their taint flow models. -
Added models for the following packages:
- com.google.common.io
- hudson
- hudson.console
- java.lang
- java.net
- java.util.logging
- javax.imageio.stream
- org.apache.commons.io
- org.apache.hadoop.hive.ql.exec
- org.apache.hadoop.hive.ql.metadata
- org.apache.tools.ant.taskdefs
-
Added models for the following packages:
- com.alibaba.druid.sql.repository
- jakarta.persistence
- jakarta.persistence.criteria
- liquibase.database.jvm
- liquibase.statement.core
- org.apache.ibatis.mapping
- org.keycloak.models.map.storage
No user-facing changes.
- The diagnostic query
java/diagnostics/successfully-extracted-files, and therefore the Code Scanning UI measure of scanned Java files, now considers any Java file seen during extraction, even one with some errors, to be extracted / scanned. - Switch cases using binding patterns and
case null[, default]are now supported. ClassesPatternCaseandNullDefaultCaseare introduced to represent new kinds of case statement. - Both switch cases and instanceof expressions using record patterns are now supported. The new class
RecordPatternExpris introduced to represent record patterns, andInstanceOfExprgainsgetPatternto replacegetLocalVariableDeclExpr. - The control-flow graph and therefore dominance information regarding switch blocks in statement context but with an expression rule (e.g.
switch(...) { case 1 -> System.out.println("Hello world!") }) has been fixed. This reduces false positives and negatives from various queries relating to functions featuring such statements.
- In
SensitiveApi.qll,javaApiCallablePasswordParam,javaApiCallableUsernameParam,javaApiCallableCryptoKeyParam, andotherApiCallableCredentialParampredicates have been deprecated. They have been replaced with a new classCredentialsSinkNodeand its child classesPasswordSink,UsernameSink, andCryptoKeySink. The predicates have been changed to using the new classes, so there may be minor changes in results relying on these predicates.
- The types
java.util.SequencedCollection,SequencedSetandSequencedMap, as well as the relatedCollections.unmodifiableSequenced*methods are now modelled. This means alerts may be raised relating to data flow through these types and methods.
-
Java classes
MethodAccess,LValueandRValuewere renamed toMethodCall,VarWriteandVarReadrespectively, along with related predicates and class names. The old names remain usable for the time being but are deprecated and should be replaced. -
New class
NewClassExprwas added to represent specifically an explicitnew ClassName(...)invocation, in contrast toClassInstanceExprwhich also includes expressions that implicitly instantiate classes, such as defining a lambda or taking a method reference. -
Added up to date models related to Spring Framework 6's
org.springframework.http.ResponseEntity. -
Added models for the following packages:
- com.alibaba.fastjson2
- javax.management
- org.apache.http.client.utils
- Added predicate
MemberRefExpr::getReceiverExpr
- The
isBarrier,isBarrierIn,isBarrierOut, andisAdditionalFlowStepmethods of the taint-tracking configurations for local queries in theArithmeticTaintedLocalQuery,ExternallyControlledFormatStringLocalQuery,ImproperValidationOfArrayIndexQuery,NumericCastTaintedQuery,ResponseSplittingLocalQuery,SqlTaintedLocalQuery, andXssLocalQuerylibraries have been changed to match their remote counterpart configurations. - Deleted the deprecated
isBarrierGuardpredicate from the dataflow library and its uses, useisBarrierand theBarrierGuardmodule instead. - Deleted the deprecated
getAValuepredicate from theAnnotationclass. - Deleted the deprecated alias
FloatingPointLiteral, useFloatLiteralinstead. - Deleted the deprecated
getASuppressedWarningLiteralpredicate from theSuppressWarningsAnnotationclass. - Deleted the deprecated
getATargetExpressionpredicate form theTargetAnnotationclass. - Deleted the deprecated
getRetentionPolicyExpressionpredicate from theRetentionAnnotationclass. - Deleted the deprecated
conditionCheckpredicate fromPreconditions.qll. - Deleted the deprecated
semmle.code.java.security.performancefolder, usesemmle.code.java.security.regexpinstead. - Deleted the deprecated
ExternalAPIclass fromExternalApi.qll, useExternalApiinstead. - Modified the
EnvInputclass insemmle.code.java.dataflow.FlowSourcesto includeenvironmentandfilesource nodes. There are no changes to results unless you add source models using theenvironmentorfilesource kinds. - Added
environmentsource models for the following methods:java.lang.System#getenvjava.lang.System#getPropertiesjava.lang.System#getPropertyjava.util.Properties#getjava.util.Properties#getProperty
- Added
filesource models for the following methods:- the
java.io.FileInputStreamconstructor hudson.FilePath#newInputStreamDenyingSymlinkAsNeededhudson.FilePath#openInputStreamhudson.FilePath#readhudson.FilePath#readFromOffsethudson.FilePath#readToString
- the
- Modified the
DatabaseInputclass insemmle.code.java.dataflow.FlowSourcesto includedatabasesource nodes. There are no changes to results unless you add source models using thedatabasesource kind. - Added
databasesource models for the following method:java.sql.ResultSet#getString
- Kotlin versions up to 1.9.20 are now supported.
- Fixed a control-flow bug where case rule statements would incorrectly include a fall-through edge.
- Added support for default cases as proper guards in switch expressions to match switch statements.
- Improved the class
ArithExprof theOverflow.qllmodule to also include compound operators. Because of this, new alerts may be raised in queries related to overflows/underflows. - Added new dataflow models for the Apache CXF framework.
- Regular expressions containing multiple parse mode flags are now interpretted correctly. For example
"(?is)abc.*"with both theiandsflags.
- The regular expressions library no longer incorrectly matches mode flag characters against the input.
No user-facing changes.
- Kotlin versions up to 1.9.10 are now supported.
- Fixed the MaD signature specifications to use proper nested type names.
- Added new sanitizer to Java command injection model
- Added more dataflow models for JAX-RS.
- The predicate
JaxWsEndpoint::getARemoteMethodno longer requires the result to be annotated with@WebMethod. Instead, the requirements listed in the JAX-RPC Specification 1.1 for required parameter and return types are used. Applications using JAX-RS may see an increase in results.
- Improved support for flow through captured variables that properly adheres to inter-procedural control flow.
- Modified the
getSecureAlgorithmNamepredicate inEncryption.qllto also includeSHA-256andSHA-512. Previously only the versions of the names without dashes were considered secure. - Add support for
WithElementandWithoutElementfor MaD access paths.
- A
Diagnostic.getCompilationInfo()predicate has been added.
- Fixed a typo in the
StdlibRandomSourceclass inRandomDataSource.qll, which caused the class to improperly model calls to thenextBytesmethod. Queries relying onStdlibRandomSourcemay see an increase in results. - Improved the precision of virtual dispatch of
java.io.InputStreammethods. Now, calls to these methods will not dispatch to arbitrary implementations ofInputStreamif there is a high-confidence alternative (like a models-as-data summary). - Added more dataflow steps for
java.io.InputStreams that wrap otherjava.io.InputStreams. - Added models for the Struts 2 framework.
- Improved the modeling of Struts 2 sources of untrusted data by tainting the whole object graph of the objects unmarshaled from an HTTP request.
- The
DataFlow::StateConfigSigsignature module has gained default implementations forisBarrier/2andisAdditionalFlowStep/4. Hence it is no longer needed to providenone()implementations of these predicates if they are not needed. - A
Class.isFileClass()predicate, to identify Kotlin file classes, has been added.
-
Data flow configurations can now include a predicate
neverSkip(Node node)in order to ensure inclusion of certain nodes in the path explanations. The predicate defaults to the end-points of the additional flow steps provided in the configuration, which means that such steps now always are visible by default in path explanations. -
Added models for Apache Commons Lang3
ToStringBuilder.reflectionToStringmethod. -
Added support for the Kotlin method
apply. -
Added models for the following packages:
- java.io
- java.lang
- java.net
- java.nio.channels
- java.nio.file
- java.util.zip
- okhttp3
- org.gradle.api.file
- retrofit2
- The
ExecCallableclass inExternalProcess.qllhas been deprecated.
- The data flow library now performs type strengthening. This increases precision for all data flow queries by excluding paths that can be inferred to be impossible due to incompatible types.
- Added automatically-generated dataflow models for
javax.portlet. - Added a missing summary model for the method
java.net.URL.toString. - Added automatically-generated dataflow models for the following frameworks and libraries:
hudsonjenkinsnet.sf.jsonstapler
- Added more models for the Hudson framework.
- Added more models for the Stapler framework.
No user-facing changes.
- Kotlin versions up to 1.9.0 are now supported.
-
Added flow through the block arguments of
kotlin.io.useandkotlin.with. -
Added models for the following packages:
- com.alibaba.druid.sql
- com.fasterxml.jackson.databind
- com.jcraft.jsch
- io.netty.handler.ssl
- okhttp3
- org.antlr.runtime
- org.fusesource.leveldbjni
- org.influxdb
- org.springframework.core.io
- org.yaml.snakeyaml
-
Deleted the deprecated
getRHSpredicate from theLValueclass, usegetRhsinstead. -
Deleted the deprecated
getCFGNodepredicate from theSsaVariableclass, usegetCfgNodeinstead. -
Deleted many deprecated predicates and classes with uppercase
XML,JSON,URL,API, etc. in their names. Use the PascalCased versions instead. -
Added models for the following packages:
- java.lang
- java.nio.file
-
Added dataflow models for the Gson deserialization library.
-
Added models for the following packages:
- okhttp3
-
Added more dataflow models for the Play Framework.
-
Modified the models related to
java.nio.file.Files.copyso that generic[Input|Output]Streamarguments are not considered file-related sinks. -
Dataflow analysis has a new flow step through constructors of transitive subtypes of
java.io.InputStreamthat wrap an underlying data source. Previously, the step only existed for direct subtypes ofjava.io.InputStream. -
Path creation sinks modeled in
PathCreation.qllhave been added to the models-as-data sink kindpath-injection. -
Updated the regular expression in the
HostnameSanitizersanitizer in thesemmle.code.java.security.RequestForgerylibrary to better detect strings prefixed with a hostname. -
Changed the
android-widgetJava source kind toremote. Any custom data extensions that use theandroid-widgetsource kind will need to be updated accordingly in order to continue working. -
Updated the following Java sink kind names. Any custom data extensions will need to be updated accordingly in order to continue working.
sqltosql-injectionurl-redirecttourl-redirectionxpathtoxpath-injectionsstitotemplate-injectionloggingtolog-injectiongroovytogroovy-injectionjexltojexl-injectionmveltomvel-injectionxslttoxslt-injectionldaptoldap-injectionpending-intent-senttopending-intentsintent-starttointent-redirectionset-hostname-verifiertohostname-verificationheader-splittingtoresponse-splittingxsstohtml-injectionandjs-injectionwrite-filetofile-system-storecreate-fileandread-filetopath-injectionopen-urlandjdbc-urltorequest-forgery
-
Added SQL injection sinks for Spring JDBC's
NamedParameterJdbcOperations. -
Added models for the following packages:
- org.apache.hadoop.fs
-
Added the
ArithmeticCommon.qlllibrary to provide predicates for reasoning about arithmetic operations. -
Added the
ArithmeticTaintedLocalQuery.qlllibrary to provide theArithmeticTaintedLocalOverflowFlowandArithmeticTaintedLocalUnderflowFlowtaint-tracking modules to reason about arithmetic with unvalidated user input. -
Added the
ArithmeticTaintedQuery.qlllibrary to provide theRemoteUserInputOverflowandRemoteUserInputUnderflowtaint-tracking modules to reason about arithmetic with unvalidated user input. -
Added the
ArithmeticUncontrolledQuery.qlllibrary to provide theArithmeticUncontrolledOverflowFlowandArithmeticUncontrolledUnderflowFlowtaint-tracking modules to reason about arithmetic with uncontrolled user input. -
Added the
ArithmeticWithExtremeValuesQuery.qlllibrary to provide theMaxValueFlowandMinValueFlowdataflow modules to reason about arithmetic with extreme values. -
Added the
BrokenCryptoAlgorithmQuery.qlllibrary to provide theInsecureCryptoFlowtaint-tracking module to reason about broken cryptographic algorithm vulnerabilities. -
Added the
ExecTaintedLocalQuery.qlllibrary to provide theLocalUserInputToArgumentToExecFlowtaint-tracking module to reason about command injection vulnerabilities caused by local data flow. -
Added the
ExternallyControlledFormatStringLocalQuery.qlllibrary to provide theExternallyControlledFormatStringLocalFlowtaint-tracking module to reason about format string vulnerabilities caused by local data flow. -
Added the
ImproperValidationOfArrayConstructionCodeSpecifiedQuery.qlllibrary to provide theBoundedFlowSourceFlowdataflow module to reason about improper validation of code-specified sizes used for array construction. -
Added the
ImproperValidationOfArrayConstructionLocalQuery.qlllibrary to provide theImproperValidationOfArrayConstructionLocalFlowtaint-tracking module to reason about improper validation of local user-provided sizes used for array construction caused by local data flow. -
Added the
ImproperValidationOfArrayConstructionQuery.qlllibrary to provide theImproperValidationOfArrayConstructionFlowtaint-tracking module to reason about improper validation of user-provided size used for array construction. -
Added the
ImproperValidationOfArrayIndexCodeSpecifiedQuery.qlllibrary to provide theBoundedFlowSourceFlowdata flow module to reason about about improper validation of code-specified array index. -
Added the
ImproperValidationOfArrayIndexLocalQuery.qlllibrary to provide theImproperValidationOfArrayIndexLocalFlowtaint-tracking module to reason about improper validation of a local user-provided array index. -
Added the
ImproperValidationOfArrayIndexQuery.qlllibrary to provide theImproperValidationOfArrayIndexFlowtaint-tracking module to reason about improper validation of user-provided array index. -
Added the
InsecureCookieQuery.qlllibrary to provide theSecureCookieFlowtaint-tracking module to reason about insecure cookie vulnerabilities. -
Added the
MaybeBrokenCryptoAlgorithmQuery.qlllibrary to provide theInsecureCryptoFlowtaint-tracking module to reason about broken cryptographic algorithm vulnerabilities. -
Added the
NumericCastTaintedQuery.qlllibrary to provide theNumericCastTaintedFlowtaint-tracking module to reason about numeric cast vulnerabilities. -
Added the
ResponseSplittingLocalQuery.qlllibrary to provide theResponseSplittingLocalFlowtaint-tracking module to reason about response splitting vulnerabilities caused by local data flow. -
Added the
SqlConcatenatedQuery.qlllibrary to provide theUncontrolledStringBuilderSourceFlowtaint-tracking module to reason about SQL injection vulnerabilities caused by concatenating untrusted strings. -
Added the
SqlTaintedLocalQuery.qlllibrary to provide theLocalUserInputToArgumentToSqlFlowtaint-tracking module to reason about SQL injection vulnerabilities caused by local data flow. -
Added the
StackTraceExposureQuery.qlllibrary to provide theprintsStackExternally,stringifiedStackFlowsExternally, andgetMessageFlowsExternallypredicates to reason about stack trace exposure vulnerabilities. -
Added the
TaintedPermissionQuery.qlllibrary to provide theTaintedPermissionFlowtaint-tracking module to reason about tainted permission vulnerabilities. -
Added the
TempDirLocalInformationDisclosureQuery.qlllibrary to provide theTempDirSystemGetPropertyToCreatetaint-tracking module to reason about local information disclosure vulnerabilities caused by local data flow. -
Added the
UnsafeHostnameVerificationQuery.qlllibrary to provide theTrustAllHostnameVerifierFlowtaint-tracking module to reason about insecure hostname verification vulnerabilities. -
Added the
UrlRedirectLocalQuery.qlllibrary to provide theUrlRedirectLocalFlowtaint-tracking module to reason about URL redirection vulnerabilities caused by local data flow. -
Added the
UrlRedirectQuery.qlllibrary to provide theUrlRedirectFlowtaint-tracking module to reason about URL redirection vulnerabilities. -
Added the
XPathInjectionQuery.qlllibrary to provide theXPathInjectionFlowtaint-tracking module to reason about XPath injection vulnerabilities. -
Added the
XssLocalQuery.qlllibrary to provide theXssLocalFlowtaint-tracking module to reason about XSS vulnerabilities caused by local data flow. -
Moved the
url-open-streamsink models to experimental and removedurl-open-streamas a sink option from the Customizing Library Models for Java documentation. -
Added models for the Apache Commons Net library.
-
Updated the
neutralModelextensible predicate to include akindcolumn. -
Added models for the
io.jsonwebtokenlibrary.
- The
sensitiveResultReceiverpredicate inSensitiveResultReceiverQuery.qllhas been deprecated and replaced withisSensitiveResultReceiverin order to use the new dataflow API.
- Changed some models of Spring's
FileCopyUtils.copyto be path injection sinks instead of summaries. - Added models for the following packages:
- java.nio.file
- Added models for Apache HttpComponents versions 4 and 5.
- Added sanitizers that recognize line breaks to the query
java/log-injection. - Added new flow steps for
java.util.StringJoiner.
- The
execTaintedpredicate inCommandLineQuery.qllhas been deprecated and replaced with the predicateexecIsTainted. - The recently introduced new data flow and taint tracking APIs have had a number of module and predicate renamings. The old APIs remain in place for now.
- The
WebViewDubuggingQuerylibrary has been renamed toWebViewDebuggingQueryto fix the typo in the file name.WebViewDubuggingQueryis now deprecated.
- Predicates
Compilation.getExpandedArgumentandCompilation.getAnExpandedArgumenthas been added.
- Fixed a bug in the regular expression used to identify sensitive information in
SensitiveActions::getCommonSensitiveInfoRegex. This may affect the results of the queriesjava/android/sensitive-communication,java/android/sensitive-keyboard-cache, andjava/sensitive-log. - Added a summary model for the
java.lang.UnsupportedOperationException(String)constructor. - The filenames embedded in
Compilation.toString()now use/as the path separator on all platforms. - Added models for the following packages:
java.langjava.netjava.nio.filejava.iojava.lang.moduleorg.apache.commons.httpclient.utilorg.apache.commons.ioorg.apache.http.clientorg.eclipse.jetty.clientcom.google.common.iokotlin.io
- Added the
TaintedPathQuery.qlllibrary to provide theTaintedPathFlowandTaintedPathLocalFlowtaint-tracking modules to reason about tainted path vulnerabilities. - Added the
ZipSlipQuery.qlllibrary to provide theZipSlipFlowtaint-tracking module to reason about zip-slip vulnerabilities. - Added the
InsecureBeanValidationQuery.qlllibrary to provide theBeanValidationFlowtaint-tracking module to reason about bean validation vulnerabilities. - Added the
XssQuery.qlllibrary to provide theXssFlowtaint-tracking module to reason about cross site scripting vulnerabilities. - Added the
LdapInjectionQuery.qlllibrary to provide theLdapInjectionFlowtaint-tracking module to reason about LDAP injection vulnerabilities. - Added the
ResponseSplittingQuery.qlllibrary to provide theResponseSplittingFlowtaint-tracking module to reason about response splitting vulnerabilities. - Added the
ExternallyControlledFormatStringQuery.qlllibrary to provide theExternallyControlledFormatStringFlowtaint-tracking module to reason about externally controlled format string vulnerabilities. - Improved the handling of addition in the range analysis. This can cause in minor changes to the results produced by
java/index-out-of-boundsandjava/constant-comparison. - A new models as data sink kind
command-injectionhas been added. - The queries
java/command-line-injectionandjava/concatenated-command-linenow can be extended using thecommand-injectionmodels as data sink kind. - Added more sink and summary dataflow models for the following packages:
java.netjava.nio.filejavax.imageio.streamjavax.namingjavax.servletorg.geogebra.web.full.mainhudsonhudson.clihudson.lifecyclehudson.modelhudson.scmhudson.utilhudson.util.io
- Added the extensible abstract class
JndiInjectionSanitizer. Now this class can be extended to add more sanitizers to thejava/jndi-injectionquery. - Added a summary model for the
nativeSQLmethod of thejava.sql.Connectioninterface. - Added sink and summary dataflow models for the Jenkins and Netty frameworks.
- The Models as Data syntax for selecting the qualifier has been changed from
-1tothis(e.g.Argument[-1]is now written asArgument[this]). - Added sources and flow step models for the Netty framework up to version 4.1.
- Added more dataflow models for frequently-used JDK APIs.
- Fixed some accidental predicate visibility in the backwards-compatible wrapper for data flow configurations. In particular
DataFlow::hasFlowPath,DataFlow::hasFlow,DataFlow::hasFlowTo, andDataFlow::hasFlowToExprwere accidentally exposed in a single version.
No user-facing changes.
- Added support for merging two
PathGraphs via disjoint union to allow results from multiple data flow computations in a singlepath-problemquery.
- Removed low-confidence call edges to known neutral call targets from the call graph used in data flow analysis. This includes, for example, custom
List.containsimplementations when the best inferrable type at the call site is simplyList. - Added more sink and summary dataflow models for the following packages:
java.iojava.langjava.sqljavafx.scene.weborg.apache.commons.compress.archivers.tarorg.apache.http.client.utilsorg.codehaus.cargo.container.installer
- The main data flow and taint tracking APIs have been changed. The old APIs remain in place for now and translate to the new through a backwards-compatible wrapper. If multiple configurations are in scope simultaneously, then this may affect results slightly. The new API is quite similar to the old, but makes use of a configuration module instead of a configuration class.
- Deleted the deprecated
getPathandgetFolderpredicates from theXmlFileclass. - Deleted the deprecated
getRepresentedStringpredicate from theStringLiteralclass. - Deleted the deprecated
ServletWriterSourceclass. - Deleted the deprecated
getGroupID,getArtefactID, andartefactMatchespredicates from theMavenRepoJarclass.
- Added new sinks for
java/hardcoded-credential-api-callto identify the use of hardcoded secrets in the creation and verification of JWT tokens usingcom.auth0.jwt. These sinks are from an experimental query submitted by @luchua. - The Java extractor now supports builds against JDK 20.
- The query
java/hardcoded-credential-api-callnow recognizes methods that accept user and password from the SQLServerDataSource class of the Microsoft JDBC Driver for SQL Server.
- Kotlin versions up to 1.8.20 are now supported.
- Removed the first argument of
java.nio.file.Files#createTempDirectory(String,FileAttribute[])as a "create-file" sink. - Added the first argument of
java.nio.file.Files#copyas a "read-file" sink for thejava/path-injectionquery. - The data flow library now disregards flow through code that is dead based on some basic constant propagation, for example, guards like
if (1+1>3).
- Added sink models for the
createQuery,createNativeQuery, andcreateSQLQuerymethods of theorg.hibernate.query.QueryProducerinterface.
- Added sink models for the constructors of
org.springframework.jdbc.object.MappingSqlQueryandorg.springframework.jdbc.object.MappingSqlQueryWithParameters. - Added more dataflow models for frequently-used JDK APIs.
- Removed summary model for
java.lang.String#endsWith(String)and added neutral model for this API. - Added additional taint step for
java.lang.String#endsWith(String)toConditionalBypassFlowConfig. - Added
AllowContentAccessMethodto represent thesetAllowContentAccessmethod of theandroid.webkit.WebSettingsclass. - Added an external flow source for the parameters of methods annotated with
android.webkit.JavascriptInterface.
- Added more dataflow models for frequently-used JDK APIs.
- The extraction of Kotlin extension methods has been improved when default parameter values are present. The dispatch and extension receiver parameters are extracted in the correct order. The
ExtensionMethod::getExtensionReceiverParameterIndexpredicate has been introduced to facilitate getting the correct extension parameter index. - The query
java/insecure-cookienow uses global dataflow to track secure cookies being set to the HTTP response object. - The library
PathSanitizer.qllhas been improved to detect more path validation patterns in Kotlin. - Models as Data models for Java are defined as data extensions instead of being inlined in the code. New models should be added in the
lib/extfolder. - Added a taint model for the method
java.nio.file.Path.getParent. - Fixed a problem in the taint model for the method
java.nio.file.Paths.get. - Deleted the deprecated
LocalClassDeclStmtNodeandLocalClassDeclStmtclasses fromPrintAst.qllandStatement.qllrespectively. - Deleted the deprecated
getLocalClasspredicate fromLocalTypeDeclStmt, and the deprecatedgetLocalClassDeclStmtpredicate fromLocalClassOrInterface. - Added support for Android Manifest
<activity-aliases>elements in data flow sources.
- We now correctly handle empty block comments, like
/**/. Previously these could be mistaken for Javadoc comments and led to attribution of Javadoc tags to the wrong declaration.
No user-facing changes.
No user-facing changes.
- Kotlin support is now in beta. This means that Java analyses will also include Kotlin code by default. Kotlin support can be disabled by setting
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLINtotruein the environment. - The new
string Compilation.getInfo(string)predicate provides access to some information about compilations.
- The ReDoS libraries in
semmle.code.java.security.regexphas been moved to a shared pack inside theshared/folder, and the previous location has been deprecated. - Added data flow summaries for tainted Android intents sent to activities via
Activity.startActivities.
No user-facing changes.
- Deprecated
ContextStartActivityMethod. UseStartActivityMethodinstead.
- Added a new predicate,
hasIncompletePermissions, in theAndroidProviderXmlElementclass. This predicate detects if a provider element does not provide both read and write permissions.
- Added support for common patterns involving
Stream.collectand common collectors likeCollectors.toList(). - The class
TypeVariablenow also extendsModifiable. - Added data flow steps for tainted Android intents that are sent to services and receivers.
- Improved the data flow step for tainted Android intents that are sent to activities so that more cases are covered.
- Added external flow sources for the intents received in exported Android services.
- The
Member.getQualifiedName()predicate result now includes the qualified name of the declaring type.
- The predicate
Annotation.getAValue()has been deprecated because it might lead to obtaining the value of the wrong annotation element by accident.getValue(string)(or one of the value type specific predicates) should be used to explicitly specify the name of the annotation element. - The predicate
Annotation.getAValue(string)has been renamed togetAnArrayValue(string). - The predicate
SuppressWarningsAnnotation.getASuppressedWarningLiteral()has been deprecated because it unnecessarily restricts the result type;getASuppressedWarning()should be used instead. - The predicates
TargetAnnotation.getATargetExpression()andRetentionAnnotation.getRetentionPolicyExpression()have been deprecated because getting the enum constant read expression is rarely useful, instead the corresponding predicates for getting the name of the referenced enum constants should be used.
- Added a new predicate,
allowsBackup, in theAndroidApplicationXmlElementclass. This predicate detects if the application element does not disable theandroid:allowBackupattribute. - The predicates of the CodeQL class
Annotationhave been improved:- Convenience value type specific predicates have been added, such as
getEnumConstantValue(string)orgetStringValue(string). - Convenience predicates for elements with array values have been added, such as
getAnEnumConstantArrayValue(string). While the behavior of the existing predicates has not changed, usage of them should be reviewed (or replaced with the newly added predicate) to make sure they work correctly for elements with array values. - Some internal CodeQL usage of the
Annotationpredicates has been adjusted and corrected; this might affect the results of some queries.
- Convenience value type specific predicates have been added, such as
- New predicates have been added to the CodeQL class
Annotatableto support getting declared and associated annotations. As part of that,hasAnnotation()has been changed to also consider inherited annotations, to be consistent withhasAnnotation(string, string)andgetAnAnnotation(). The newly added predicatehasDeclaredAnnotation()can be used as replacement for the old functionality. - New predicates have been added to the CodeQL class
AnnotationTypeto simplify getting information about usage of JDK meta-annotations, such as@Retention.
- The virtual dispatch relation used in data flow now favors summary models over source code for dispatch to interface methods from
java.utilunless there is evidence that a specific source implementation is reachable. This should provide increased precision for any projects that include, for example, customListorMapimplementations.
- Added new sinks to the query
java/android/implicit-pendingintentsto take into account the classesandroidx.core.app.NotificationManagerCompatandandroidx.core.app.AlarmManagerCompat. - Added new flow steps for
androidx.core.app.NotificationCompatand its inner classes. - Added flow sinks, sources and summaries for the Kotlin standard library.
- Added flow summary for
org.springframework.data.repository.CrudRepository.save(). - Added new flow steps for the following Android classes:
android.content.ContentResolverandroid.content.ContentProviderClientandroid.content.ContentProviderOperationandroid.content.ContentProviderOperation$Builderandroid.content.ContentProviderResultandroid.database.Cursor
- Added taint flow models for the
java.lang.String.(charAt|getBytes)methods. - Improved taint flow models for the
java.lang.String.(replace|replaceFirst|replaceAll)methods. Additional results may be found where users do not properly sanitize their inputs.
- Fixed an issue in the taint tracking analysis where implicit reads were not allowed by default in sinks or additional taint steps that used flow states.
- Many classes/predicates/modules with upper-case acronyms in their name have been renamed to follow our style-guide. The old name still exists as a deprecated alias.
- The utility files previously in the
semmle.code.java.security.performancepackage have been moved to thesemmle.code.java.security.regexppackage.
The previous files still exist as deprecated aliases.
- Added a new predicate,
requiresPermissions, in theAndroidComponentXmlElementandAndroidApplicationXmlElementclasses to detect if the element has explicitly set a value for itsandroid:permissionattribute. - Added a new predicate,
hasAnIntentFilterElement, in theAndroidComponentXmlElementclass to detect if a component contains an intent filter element. - Added a new predicate,
hasExportedAttribute, in theAndroidComponentXmlElementclass to detect if a component has anandroid:exportedattribute. - Added a new class,
AndroidCategoryXmlElement, to represent a category element in an Android manifest file. - Added a new predicate,
getACategoryElement, in theAndroidIntentFilterXmlElementclass to get a category element of an intent filter. - Added a new predicate,
isInBuildDirectory, in theAndroidManifestXmlFileclass. This predicate detects if the manifest file is located in a build directory. - Added a new predicate,
isDebuggable, in theAndroidApplicationXmlElementclass. This predicate detects if the application element has itsandroid:debuggableattribute enabled.
- Added new flow steps for the classes
java.nio.file.Pathandjava.nio.file.Paths. - The class
AndroidFragmentnow also models the Android Jetpack version of theFragmentclass (androidx.fragment.app.Fragment). - Java 19 builds can now be extracted. There are no non-preview new language features in this release, so the only user-visible change is that the CodeQL extractor will now correctly trace compilations using the JDK 19 release of
javac. - Classes and methods that are seen with several different paths during the extraction process (for example, packaged into different JAR files) now report an arbitrarily selected location via their
getLocationandhasLocationInfopredicates, rather than reporting all of them. This may lead to reduced alert duplication. - The query
java/hardcoded-credential-api-callnow recognises methods that consume usernames, passwords and keys from the JSch, Ganymed, Apache SSHD, sshj, Trilead SSH-2, Apache FTPClient and MongoDB projects.
- Improved analysis of the Android class
AsyncTaskso that data can properly flow through its methods according to the life-cycle steps described here: https://developer.android.com/reference/android/os/AsyncTask#the-4-steps. - Added a data-flow model for the
setPropertymethod ofjava.util.Properties. Additional results may be found where relevant data is stored in and then retrieved from aPropertiesinstance.
- The QL predicate
Expr::getUnderlyingExprhas been added. It can be used to look through casts and not-null expressions and obtain the underlying expression to which they apply.
- The JUnit5 version of
AssertNotNullis now recognized, which removes related false positives in the nullness queries. - Added data flow models for
java.util.Scanner.
- Added an
ErrorTypeclass. An instance of this class will be used if an extractor is unable to extract a type, or if an up/downgrade script is unable to provide a type.
- Added data-flow models for
java.util.Properties. Additional results may be found where relevant data is stored in and then retrieved from aPropertiesinstance. - Added
Modifier.isInline(). - Removed Kotlin-specific database and QL structures for loops and
break/continuestatements. The Kotlin extractor was changed to reuse the Java structures for these constructs. - Added additional flow sources for uses of external storage on Android.
- The
BarrierGuardclass has been deprecated. Such barriers and sanitizers can now instead be created using the newBarrierGuardparameterized module.
Added a flow step for String.valueOf calls on tainted android.text.Editable objects.
- The QL class
FloatingPointLiteralhas been renamed toFloatLiteral.
- Fixed a sanitizer of the query
java/android/intent-redirection. Now, for an intent to be considered safe against intent redirection, both its package name and class name must be checked.
- A number of new classes and methods related to the upcoming Kotlin
support have been added. These are not yet stable, as Kotlin support
is still under development.
File::isSourceFileFile::isJavaSourceFileFile::isKotlinSourceFileMember::getKotlinTypeElement::isCompilerGeneratedExpr::getKotlinTypeLambdaExpr::isKotlinFunctionNCallable::getReturnKotlinTypeCallable::getParameterKotlinTypeMethod::isLocalMethod::getKotlinNameField::getKotlinTypeModifiable::isSealedKotlinModifiable::isInternalVariable::getKotlinTypeLocalVariableDecl::getKotlinTypeParameter::getKotlinTypeParameter::isExtensionParameterCompilationclassDiagnosticclassKtInitializerAssignExprclassValueEQExprclassValueNEExprclassValueOrReferenceEqualsExprclassValueOrReferenceNotEqualsExprclassReferenceEqualityTestclassCastingExprclassSafeCastExprclassImplicitCastExprclassImplicitNotNullExprclassImplicitCoercionToUnitExprclassUnsafeCoerceExprclassPropertyRefExprclassNotInstanceOfExprclassExtensionReceiverAccessclassWhenExprclassWhenBranchclassClassExprclassStmtExprclassStringTemplateExprclassNotNullExprclassTypeNullPointerExceptionclassKtCommentclassKtCommentSectionclassKotlinTypeclassKotlinNullableTypeclassKotlinNotnullTypeclassKotlinTypeAliasclassPropertyclassDelegatedPropertyclassExtensionMethodclassKtInitializerNodeclassKtLoopStmtclassKtBreakContinueStmtclassKtBreakStmtclassKtContinueStmtclassClassObjectclassCompanionObjectclassLiveLiteralclassLiveLiteralMethodclassCastConversionContextrenamed toCastingConversionContext
- The QL class
ValueDiscardingExprhas been added, representing expressions for which the value of the expression as a whole is discarded.
- Added models for the libraries OkHttp and Retrofit.
- Add taint models for the following
Filemethods:File::getAbsoluteFileFile::getCanonicalFileFile::getAbsolutePathFile::getCanonicalPath
- Added a flow step for
toStringcalls on taintedandroid.text.Editableobjects. - Added a data flow step for tainted Android intents that are sent to other activities and accessed there via
getIntent(). - Added modeling of MyBatis (
org.apache.ibatis) Providers, resulting in additional sinks for the queriesjava/ognl-injection,java/sql-injection,java/sql-injection-localandjava/concatenated-sql-query.
- The signature of
allowImplicitReadonDataFlow::ConfigurationandTaintTracking::Configurationhas changed fromallowImplicitRead(DataFlow::Node node, DataFlow::Content c)toallowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c).
- Improved the data flow support for the Android class
SharedPreferences$Editor. Specifically, the fluent logic of some of its methods is now taken into account when calculating data flow.- Added flow sources and steps for JMS versions 1 and 2.
- Added flow sources and steps for RabbitMQ.
- Added flow steps for
java.io.DataInputandjava.io.ObjectInputimplementations.
- Added data-flow models for the Spring Framework component
spring-beans.
- The QL class
JumpStmthas been made the superclass ofBreakStmt,ContinueStmtandYieldStmt. This allows directly using its inherited predicates without having to explicitly cast toJumpStmtfirst.
- The recently added flow-state versions of
isBarrierIn,isBarrierOut,isSanitizerIn, andisSanitizerOutin the data flow and taint tracking libraries have been removed. - The
getUrlpredicate ofDeclaredRepositoryinMavenPom.qllhas been renamed togetRepositoryUrl.
- There are now QL classes ErrorExpr and ErrorStmt. These may be generated by upgrade or downgrade scripts when databases cannot be fully converted.
- Added guard precondition support for assertion methods for popular testing libraries (e.g. Junit 4, Junit 5, TestNG).
- The flow state variants of
isBarrierandisAdditionalFlowStepare no longer exposed in the taint tracking library. TheisSanitizerandisAdditionalTaintSteppredicates should be used instead.
- Many classes/predicates/modules that had upper-case acronyms have been renamed to follow our style-guide. The old name still exists as a deprecated alias.
- The data flow and taint tracking libraries have been extended with versions of
isBarrierIn,isBarrierOut, andisBarrierGuard, respectivelyisSanitizerIn,isSanitizerOut, andisSanitizerGuard, that support flow states.
- Added new guards
IsWindowsGuard,IsSpecificWindowsVariant,IsUnixGuard, andIsSpecificUnixVariantto detect OS specific guards. - Added a new predicate
getSystemPropertythat gets all expressions that retrieve system properties from a variety of sources (eg. alternative JDK API's, Google Guava, Apache Commons, Apache IO, etc.). - Added support for detection of SSRF via JDBC database URLs, including connections made using the standard library (
java.sql), Hikari Connection Pool, JDBI and Spring JDBC. - Re-removed support for
CharacterLiteralfromCompileTimeConstantExpr.getStringValue()to restore the convention that that predicate only applies toString-typed constants. - All deprecated predicates/classes/modules that have been deprecated for over a year have been deleted.
- Added
hasDescendant(RefType anc, Type sub) - Added
RefType.getADescendant() - Added
RefType.getAStrictAncestor()
- Add support for
CharacterLiteralinCompileTimeConstantExpr.getStringValue()
- Added predicates
ClassOrInterface.getAPermittedSubtypeandisSealedexposing information about sealed classes.
- The
codeql/java-upgradesCodeQL pack has been removed. All upgrades scripts have been merged into thecodeql/java-allCodeQL pack.
- Data flow now propagates taint from remote source
Parametertypes to read steps of their fields (e.g.tainted.publicFieldortainted.getField()). This also applies to their subtypes and the types of their fields, recursively.
CharacterLiteral'sgetCodePointValuepredicate now returns the correct value for UTF-16 surrogates.- The
RangeAnalysismodule now properly handles comparisons with Unicode surrogate character literals.
CharacterLiteral'sgetCodePointValuepredicate now returns the correct value for UTF-16 surrogates.- The
RangeAnalysismodule and thejava/constant-comparisonqueries no longer raise false alerts regarding comparisons with Unicode surrogate character literals. - The predicate
Method.overrides(Method)was accidentally transitive. This has been fixed. This fix also affectsMethod.overridesOrInstantiates(Method)andMethod.getASourceOverriddenMethod().