No user-facing changes.
No user-facing changes.
- The predicate
SummarizedCallable.propagatesFlowhas been extended with the columnsProvenance pandboolean isExact, and as a consequence the predicatesSummarizedCallable.hasProvenanceandSummarizedCallable.hasExactModelhave been removed.
- Upgraded to allow analysis of Swift 6.2.3.
- Upgraded to allow analysis of Swift 6.2.2.
No user-facing changes.
No user-facing changes.
No user-facing changes.
No user-facing changes.
- Upgraded to allow analysis of Swift 6.2.1.
- The
OpenedArchetypeTypeclass has been renamed asExistentialArchetypeType. - The
OtherAvailabilitySpecclass has been removed. UseAvailabilitySpec::isWildcardinstead. - The
PlatformVersionAvailabilitySpechas been removed. UseAvailabilitySpec::getPlatformandAvailabilitySpec::getVersioninstead.
- Added AST nodes
UsingDecl,UnsafeExpr, andInlineArrayTypethat correspond to new nodes in Swift 6.2. - Added new predicates
isDistributedGet,isRead2,isModify2, andisInitto theAccessorclass that correspond to new accessors in Swift 6.2. - Added a new predicate
isApplyto theKeyPathComponentclass that corresponds to method and initializer key path components in Swift 6.2.
- Upgraded to allow analysis of Swift 6.2.
- Support for experimental Embedded Swift has been dropped.
No user-facing changes.
No user-facing changes.
- Updated to allow analysis of Swift 6.1.3.
No user-facing changes.
No user-facing changes.
- The regular expressions in
SensitiveDataHeuristics.qllhave been extended to find more instances of sensitive data such as secrets used in authentication, finance and health information, and device data. The heuristics have also been refined to find fewer false positive matches. This will improve results for queries related to sensitive information.
No user-facing changes.
No user-facing changes.
- Updated to allow analysis of Swift 6.1.2.
- Deleted the deprecated
parseContentpredicate from theExternalFlow.qll. - Deleted the deprecated
hasLocationInfopredicate from theDataFlowPublic.qll. - Deleted the deprecated
SummaryComponentclass from theFlowSummary.qll. - Deleted the deprecated
SummaryComponentStackclass from theFlowSummary.qll. - Deleted the deprecated
SummaryComponentmodule from theFlowSummary.qll. - Deleted the deprecated
SummaryComponentStackmodule from theFlowSummary.qll. - Deleted the deprecated
RequiredSummaryComponentStackclass from theFlowSummary.qll.
- Updated to allow analysis of Swift 6.1.1.
TypeValueExprexperimental AST leaf is now implemented in the control flow library
- Added AST nodes
UnsafeCastExpr,TypeValueExpr,IntegerType, andBuiltinFixedArrayTypethat correspond to new nodes added by Swift 6.1.
- Upgraded to allow analysis of Swift 6.1.
- Added AST nodes
ActorIsolationErasureExpr,CurrentContextIsolationExpr,ExtractFunctionIsolationExprandUnreachableExprthat correspond to new nodes added by Swift 6.0.
No user-facing changes.
No user-facing changes.
No user-facing changes.
No user-facing changes.
- The predicates
immediatelyControlsandcontrolson theConditionBlockclass have been deprecated in favor of the newly addeddominatingEdgepredicate.
- Deleted the deprecated
ArrayContentclass from the dataflow library, useCollectionContentinstead. - Deleted the deprecated
getOptionsInput,getRegexInput, andgetStringInputpredicates from the regexp library, usegetAnOptionsInput,getRegexInputNode, andgetStringInputNodeinstead.
- The sensitive data library has been improved so that
snake_casestyle variable names are recognized more reliably. This may result in more sensitive data being identified, and more results from queries that use the sensitive data library.
- Upgraded to allow analysis of Swift 6.0.2.
- 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.
No user-facing changes.
No user-facing changes.
No user-facing changes.
- All AST classes in
codeql.swift.elementsare nowfinal, which means that it is no longer possible tooverridepredicates defined in those classes (it is, however, still possible toextendthe classes).
- Deleted the deprecated
explorationLimitpredicate fromDataFlow::Configuration, useFlowExploration<explorationLimit>instead. - Deleted the deprecated
getDerivedTypeDeclpredicate from theTypeDeclclass, usegetADerivedTypeDeclorgetABaseTypeDeclinstead.
No user-facing changes.
No user-facing changes.
- The model for
FileManagerno longer considers methods that return paths on the file system as taint sources. This is because these sources have been found to produce results of low value. - An error in the model for
URL.withUnsafeFileSystemRepresentation(_:)has been corrected. This may result in new data flow paths being found during analysis.
- Swift support is now out of beta, and generally available.
- Additional heuristics for sensitive private information have been added to the
SensitiveExprs.qlllibrary, improving coverage for credit card and social security numbers. This may result in additional results for queries that use sensitive data such asswift/cleartext-transmission.
No user-facing changes.
No user-facing changes.
No user-facing changes.
- CodeQL package management is now generally available, and all GitHub-produced CodeQL packages have had their version numbers increased to 1.0.0.
No user-facing changes.
No user-facing changes.
No user-facing changes.
- Upgraded to Swift 5.10
- New AST node is extracted:
ThenStmt
No user-facing changes.
No user-facing changes.
- Fixed an issue where
TypeDecl.getFullNamewould get stuck in an loop and fail when minor database inconsistencies are present.
- The name "certification" is no longer seen as possibly being a certificate, and will therefore no longer be flagged in queries like "clear-text-logging" which look for sensitive data.
No user-facing changes.
- Swift upgraded to 5.9.2
- The control flow graph library (
codeql.swift.controlflow) has been transitioned to use the shared implementation from thecodeql/controlflowqlpack. No result changes are expected due to this change.
- Expanded flow models for
UnsafePointerand similar classes. - Added flow models for non-member
withUnsafePointerand similar functions. - Added flow models for
withMemoryRebound,assumingMemoryBoundandbindMemorymember functions of library pointer classes. - Added a sensitive data model for
SecKeyCopyExternalRepresentation. - Added imprecise flow models for
appendandinsertmethods, and initializer calls with adataargument. - Tyes for patterns are now included in the database and made available through the
Pattern::getType()method.
No user-facing changes.
- Extracts Swift's
DiscardStmtandMaterizliePackExpr - Expanded and improved flow models for
SetandSequence. - Added imprecise flow sources matching initializers such as
init(contentsOfFile:). - Extracts
MacroDecland some related information
- Added Swift 5.9.1 support
- New AST node is extracted:
SingleValueStmtExpr
- AST and types related to parameter packs are now extracted
- Added taint flow models for the
NSString.enumerate*methods. - Generalized the data flow model for subscript writes (
a[index] = b) so that it applies to subscripts on all kinds of objects, not just arrays. - Fixed a bug where some flow sinks at field accesses were not being correctly identified.
- Added indexed
getVariabletoCaptureListExpr, improving its AST printing and data flow. - Added flow models for
Stringmethods involving closures such asString.withUTF8(_:). - AST and types related to move semantics (
copy,consume,_borrow) are now extracted
- Improved support for flow through captured variables that properly adheres to inter-procedural control flow.
- Added children of
UnspecifiedElement, which will be present only in certain downgraded databases. - Collection content is now automatically read at taint flow sinks. This removes the need to define an
allowImplicitReadpredicate on data flow configurations where the sink might be an array, set or similar type with tainted contents. Where that step had not been defined, taint may find additional results now. - Added taint models for
StringProtocol.appendingFormatandString.decodeCString. - Added taint flow models for members of
Substring. - Added taint flow models for
RawRepresentable. - The contents of autoclosure function parameters are now included in the control flow graph and data flow libraries.
- Added models of
StringProtocolandNSStringmethods that evaluate regular expressions. - Flow through 'open existential expressions', implicit expressions created by the compiler when a method is called on a protocol. This may apply, for example, when the method is a modelled taint source.
- Improved taint models for
Numerictypes andRangeReplaceableCollections. - The nil-coalescing operator
??is now supported by the CFG construction and dataflow libraries. - The data flow library now supports flow to the loop variable of for-in loops.
- The methods
getIteratorVarandgetNextCallhave been added to theForEachStmtclass.
- The
ArrayContenttype in the data flow library has been deprecated and made an alias for theCollectionContenttype, to better reflect the hierarchy of the Swift standard library. Uses ofArrayElementin model files will be interpreted as referring toCollectionContent.
- The predicates
getABaseType,getABaseTypeDecl,getADerivedTypeandgetADerivedTypeDeclonTypeandTypeDeclnow behave more usefully and consistently. They now explore through type aliases used in base class declarations, and include protocols added in extensions.
To examine base class declarations at a low level without these enhancements, use TypeDecl.getInheritedType.
Type.getABaseType (only) previously resolved a type alias it was called directly on. This behaviour no longer exists. To find any base type of a type that could be an alias, the construct Type.getUnderlyingType().getABaseType*() is recommended.
- Modelled varargs function in
NSStringmore accurately. - Modelled
CustomStringConvertible.descriptionandCustomDebugStringConvertible.debugDescription, replacing ad-hoc models of these properties on derived classes. - The regular expressions library now accepts a wider range of mode flags in a regular expression mode flag group (such as
(?u)). The(?w) flag has been renamed from "UNICODE" to "UNICODEBOUNDARY", and the(?u)flag is called "UNICODE" in the libraries. - Renamed
TypeDecl.getBaseType/1togetInheritedType. - Flow through writes via keypaths is now supported by the data flow library.
- Added flow through variadic arguments, and the
getVaListfunction. - Added flow steps through
Dictionarykeys and values. - Added taint models for
Numericconversions.
- The regular expressions library no longer incorrectly matches mode flag characters against the input.
No user-facing changes.
- Flow through optional chaining and forced unwrapping in keypaths is now supported by the data flow library.
- Added flow models of collection
.withContiguous[Mutable]StorageIfAvailable,.withUnsafe[Mutable]BufferPointerand.withUnsafe[Mutable]Bytesmethods.
- Added
DataFlow::CollectionContent, which will enable more accurate flow through collections.
- Added local flow sources for
UITextInputand related classes. - Flow through forced optional unwrapping (
!) on the left side of assignment now works in most cases. Type.getNamenow gets the name of the type alone without any enclosing types. UseType.getFullNamefor the old behaviour.
- Added
DataFlow::ArrayContent, which will provide more accurate flow through arrays.
- Flow through forced optional unwrapping (
!) is modelled more accurately. - Added flow models for
Sequence.withContiguousStorageIfAvailable. - Added taint flow for
NSUserActivity.referrerURL.
- 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.
- 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. - The regular expression library now understands mode flags specified by
Regexmethods and theNSRegularExpressioninitializer. - The regular expression library now understands mode flags specified at the beginning of a regular expression (for example
(?is)). - Added detail to the taint model for
URL. - Added new heuristics to
SensitiveExprs.qll, enhancing detection from the library.
- The
BraceStmtAST node'sAstNode getElement(index)member predicate no longer returnsVarDecls after thePatternBindingDeclthat declares them. Instead, a newVarDecl getVariable(index)predicate has been introduced for accessing the variables declared in aBraceStmt.
- Added new libraries
Regex.qllandRegexTreeView.qllfor reasoning about regular expressions in Swift code and places where they are evaluated.
- Added a data flow model for
swap(_:_:).
No user-facing changes.
- Incorporated the cross-language
SensitiveDataHeuristics.qllheuristics library into the SwiftSensitiveExprs.qlllibrary. This adds a number of new heuristics enhancing detection from the library.
- Some models for the
Dataclass have been generalized toDataProtocolso that they apply more widely.
- Fixed a number of inconsistencies in the abstract syntax tree (AST) and in the control-flow graph (CFG). This may lead to more results in queries that use these libraries, or libraries that depend on them (such as dataflow).