Skip to content

v2.8.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 01 Sep 21:15
4c75033

Release summary

  • New queries added for the following rule packages: Concurrency3, Contracts1, Declarations1, Expressions, IO4, Pointers2, Concurrency
  • The following changes have been made for this release:
  • A0-1-6: alias templates are now appropriately handled, with alias templates considered used if there exists an instantiation that is used.
  • CON50-CPP - DoNotAllowAMutexToGoOutOfScopeWhileLocked.ql
    • Improvements to detection of mutexes shared across threads and expanded test coverage.
  • CON50-CPP - DoNotDestroyAMutexWhileItIsLocked.ql
    • Improvements to detection of mutexes shared across threads and expanded test coverage.
  • RULE-11-1 - ConversionBetweenFunctionPointerAndOtherType.ql:
    • A result is now reported for an implicit conversion of a pointer to a function into a pointer to a function with an incompatible type.
    • Modified the test to reflect the fixed coverage.
  • Added the autosar-single-translation-unit.qls and cert-single-translation-unit.qls query suites for C++.
    • These include a subset of queries which are suitable for running over databases including only a single translation unit.
    • The initial version includes rules from the "Banned*" C++ packages. Future updates will add additional queries into this suite as they are identified as suitable.
  • A13-2-2 - BinaryOperatorAndBitwiseOperatorReturnAPrvalue.ql:
    • Remove findings related to stream operators.
  • A7-1-1 - DeclarationUnmodifiedObjectMissingConstSpecifier.ql:
    • Remove findings in uninstantiated Templates.

Supported versions

  • The LGTM pack is not supported on any released version of LGTM without support from GitHub Professional Services.
  • The Code Scanning pack is supported when:
    • Using the CodeQL CLI version 2.7.6 in conjunction with a copy of the CodeQL standard library for C++ (github/codeql) set to the tag codeql-cli/v2.7.6.
    • Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220120.

Appendix: CERT-C++ new queries

New queries added to cover the following rules:

  • CON55-CPP - PreserveSafetyWhenUsingConditionVariables.ql

Appendix: MISRA-C-2012 new queries

New queries added to cover the following rules:

  • RULE-5-1 - ExternalIdentifiersNotDistinct.ql
  • RULE-5-4 - MacroIdentifiersNotDistinct.ql, MacroIdentifierNotDistinctFromParameter.ql
  • RULE-21-2 - DoNotDeclareAReservedIdentifier.ql

Appendix: CERT-C new queries

New queries added to cover the following rules:

  • ARR39-C - DoNotAddOrSubtractAScaledIntegerToAPointer.ql
  • CON31-C - DoNotAllowAMutexToGoOutOfScopeWhileLocked.ql, DoNotDestroyAMutexWhileItIsLocked.ql
  • CON38-C - PreserveSafetyWhenUsingConditionVariables.ql
  • CON41-C - WrapFunctionsThatCanFailSpuriouslyInLoop.ql
  • DCL31-C - DeclareIdentifiersBeforeUsingThem.ql
  • DCL37-C - DoNotDeclareOrDefineAReservedIdentifier.ql
  • ENV30-C - DoNotModifyTheReturnValueOfCertainFunctions.ql
  • ENV31-C - EnvPointerIsInvalidAfterCertainOperations.ql
  • EXP37-C - DoNotCallFunctionPointerWithIncompatibleType.ql, DoNotCallFunctionsWithIncompatibleArguments.ql, CallPOSIXOpenWithCorrectArgumentCount.ql
  • EXP46-C - DoNotUseABitwiseOperatorWithABooleanLikeOperand.ql
  • FIO45-C - ToctouRaceConditionsWhileAccessingFiles.ql
  • FIO47-C - UseValidSpecifiers.ql, WrongNumberOfFormatArguments.ql, WrongTypeFormatArguments.ql