36 KiB
0.6.4
No user-facing changes.
0.6.3
New Features
- Kotlin versions up to 1.9.0 are now supported.
Minor Analysis Improvements
-
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
0.6.2
Minor Analysis Improvements
-
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.
0.6.1
Deprecated APIs
- The
sensitiveResultReceiverpredicate inSensitiveResultReceiverQuery.qllhas been deprecated and replaced withisSensitiveResultReceiverin order to use the new dataflow API.
Minor Analysis Improvements
- 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.
0.6.0
Deprecated APIs
- 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.
New Features
- Predicates
Compilation.getExpandedArgumentandCompilation.getAnExpandedArgumenthas been added.
Minor Analysis Improvements
- 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.
Bug Fixes
- 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.
0.5.6
No user-facing changes.
0.5.5
New Features
- Added support for merging two
PathGraphs via disjoint union to allow results from multiple data flow computations in a singlepath-problemquery.
Major Analysis Improvements
- 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.
Minor Analysis Improvements
- Deleted the deprecated
getPathandgetFolderpredicates from theXmlFileclass. - Deleted the deprecated
getRepresentedStringpredicate from theStringLiteralclass. - Deleted the deprecated
ServletWriterSourceclass. - Deleted the deprecated
getGroupID,getArtefactID, andartefactMatchespredicates from theMavenRepoJarclass.
0.5.4
Minor Analysis Improvements
- 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.
0.5.3
New Features
- Kotlin versions up to 1.8.20 are now supported.
Minor Analysis Improvements
- 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).
0.5.2
Minor Analysis Improvements
- Added sink models for the
createQuery,createNativeQuery, andcreateSQLQuerymethods of theorg.hibernate.query.QueryProducerinterface.
0.5.1
Minor Analysis Improvements
- 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.
0.5.0
Minor Analysis Improvements
- 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.
Bug Fixes
- 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.
0.4.6
No user-facing changes.
0.4.5
No user-facing changes.
0.4.4
New Features
- 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.
Minor Analysis Improvements
- 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.
0.4.3
No user-facing changes.
0.4.2
Deprecated APIs
- Deprecated
ContextStartActivityMethod. UseStartActivityMethodinstead.
New Features
- Added a new predicate,
hasIncompletePermissions, in theAndroidProviderXmlElementclass. This predicate detects if a provider element does not provide both read and write permissions.
Minor Analysis Improvements
- 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.
0.4.1
Minor Analysis Improvements
- Added external flow sources for the intents received in exported Android services.
0.4.0
Breaking Changes
- The
Member.getQualifiedName()predicate result now includes the qualified name of the declaring type.
Deprecated APIs
- 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.
New Features
- 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.
Major Analysis Improvements
- 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.
Minor Analysis Improvements
- 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.
Bug Fixes
- 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.
0.3.5
0.3.4
Deprecated APIs
- 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.
New Features
- 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.
Minor Analysis Improvements
- 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.
0.3.3
Minor Analysis Improvements
- 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.
0.3.2
New Features
- 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.
Minor Analysis Improvements
- The JUnit5 version of
AssertNotNullis now recognized, which removes related false positives in the nullness queries. - Added data flow models for
java.util.Scanner.
0.3.1
New Features
- 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.
Minor Analysis Improvements
- 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.
0.3.0
Deprecated APIs
- The
BarrierGuardclass has been deprecated. Such barriers and sanitizers can now instead be created using the newBarrierGuardparameterized module.
Minor Analysis Improvements
Added a flow step for String.valueOf calls on tainted android.text.Editable objects.
0.2.3
0.2.2
Deprecated APIs
- The QL class
FloatingPointLiteralhas been renamed toFloatLiteral.
Minor Analysis Improvements
- 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.
0.2.1
New Features
- 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.
Minor Analysis Improvements
- 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.
0.2.0
Breaking Changes
- The signature of
allowImplicitReadonDataFlow::ConfigurationandTaintTracking::Configurationhas changed fromallowImplicitRead(DataFlow::Node node, DataFlow::Content c)toallowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c).
Minor Analysis Improvements
- 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.
Bug Fixes
- The QL class
JumpStmthas been made the superclass ofBreakStmt,ContinueStmtandYieldStmt. This allows directly using its inherited predicates without having to explicitly cast toJumpStmtfirst.
0.1.0
Breaking Changes
- 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.
New Features
- There are now QL classes ErrorExpr and ErrorStmt. These may be generated by upgrade or downgrade scripts when databases cannot be fully converted.
Minor Analysis Improvements
- Added guard precondition support for assertion methods for popular testing libraries (e.g. Junit 4, Junit 5, TestNG).
0.0.13
0.0.12
Breaking Changes
- The flow state variants of
isBarrierandisAdditionalFlowStepare no longer exposed in the taint tracking library. TheisSanitizerandisAdditionalTaintSteppredicates should be used instead.
Deprecated APIs
- 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.
New Features
- The data flow and taint tracking libraries have been extended with versions of
isBarrierIn,isBarrierOut, andisBarrierGuard, respectivelyisSanitizerIn,isSanitizerOut, andisSanitizerGuard, that support flow states.
Minor Analysis Improvements
- 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.
0.0.11
New Features
- Added
hasDescendant(RefType anc, Type sub) - Added
RefType.getADescendant() - Added
RefType.getAStrictAncestor()
Minor Analysis Improvements
- Add support for
CharacterLiteralinCompileTimeConstantExpr.getStringValue()
0.0.10
New Features
- Added predicates
ClassOrInterface.getAPermittedSubtypeandisSealedexposing information about sealed classes.
0.0.9
0.0.8
Deprecated APIs
- The
codeql/java-upgradesCodeQL pack has been removed. All upgrades scripts have been merged into thecodeql/java-allCodeQL pack.
0.0.7
0.0.6
Major Analysis Improvements
- 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.
0.0.5
Bug Fixes
CharacterLiteral'sgetCodePointValuepredicate now returns the correct value for UTF-16 surrogates.- The
RangeAnalysismodule now properly handles comparisons with Unicode surrogate character literals.
0.0.4
Bug Fixes
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().