mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
4.0 KiB
4.0 KiB
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.