Skip to content

v2.59.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 May 18:25
51a8c0b

Release summary

  • New queries added for the following rule packages: Banned7, Classes3, Declarations5, Declarations8, Memory1, Preconditions2, Preconditions5, Undefined
  • The following changes have been made for this release:
    • DIR-5-1 - PossibleDataRaceBetweenThreads.ql:
      • Refactored implementation into a shared library (PossibleDataRaceBetweenThreadsShared.qll) to allow reuse by MISRA C++ 2023 RULE-4-1-3. No change in results is expected for DIR-5-1.
    • A2-13-4 - StringLiteralsAssignedToNonConstantPointers.ql:
      • Refactored query logic into a shared module (StringLiteralsAssignedToNonConstantPointersShared) to enable reuse by MISRA C++ RULE-4-1-3. The query logic is unchanged. No visible changes to results or performance are expected.
    • EXP51-CPP - DoNotDeleteAnArrayThroughAPointerOfTheIncorrectType.ql:
      • Updated alert text to add single quotes according to project guidelines.
      • Refactored query logic into a shared library (DoNotDeleteAnArrayThroughAPointerOfTheIncorrectTypeShared.qll) to enable reuse by MISRA C++ RULE-4-1-3. The query logic is unchanged and no visible changes to results or performance are expected.
      • The query now uses a query predicate problems instead of a from/where/select. In path-problem BQRS output, the results section header changes from #select to problems. Alert results and their content are otherwise identical.
    • MEM51-CPP - ProperlyDeallocateDynamicallyAllocatedResources.ql:
      • Refactored query logic into a shared library (ProperlyDeallocateDynamicallyAllocatedResourcesShared.qll) to enable reuse by MISRA C++ RULE-4-1-3. The query logic is unchanged and no visible changes to results or performance are expected.
    • INT32-C - SignedIntegerOverflow.ql:
      • Refactored query logic into a shared library (SignedIntegerOverflowShared.qll) to enable reuse by MISRA C++ RULE-4-1-3. The query logic is unchanged and no visible changes to results or performance are expected.
    • A5-6-1 - DivisorEqualToZero.ql:
      • Refactored query logic into a shared library (DivisorEqualToZeroShared.qll) to enable reuse by MISRA C++ RULE-4-1-3. The query logic is unchanged and no visible changes to results or performance are expected.
    • INT50-CPP - DoNotCastToAnOutOfRangeEnumerationValue.ql:
      • Refactored query logic into a shared library (DoNotCastToAnOutOfRangeEnumerationValueShared.qll) to enable reuse by MISRA C++ RULE-4-1-3. The query logic is unchanged and no visible changes to results or performance are expected.
    • All queries using Linkage.qll:
      • The logic for determining whether a namespace is within an anonymous namespace, directly or indirectly, has been refactored.
      • No visible change in behavior or performance is expected.
  • RULE-6-4-2 - InheritedOverridableMemberFunction.ql:
    • Improved evaluation performance.
  • RULE-6-9-2 - AvoidStandardIntegerTypeNames.ql:
    • Fixed query name.
  • RULE-7-0-4 - InappropriateBitwiseOrShiftOperands.ql:
    • Improved evaluation performance.
  • A7-3-1 - HiddenInheritedOverridableMemberFunctionQuery.ql:
    • Improved evaluation performance.
  • All MISRA C++ rules:
    • MISRA C++ 2023 support is now fully implemented, and available in the pack codeql/misra-cpp-coding-standards

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.21.4 in conjunction with a copy of the CodeQL standard library for C++ (github/codeql) set to the tag codeql-cli/v2.21.4.
    • Using the CodeQL Action or CodeQL runner with the codeql-bundle-v2.21.4.

Appendix: MISRA-C++-2023 new queries

New queries added to cover the following rules:

  • RULE-4-1-3 - PossibleDataRaceBetweenThreads.ql, ArrayDeletedThroughPointerOfIncorrectType.ql, SignedIntegerOverflow.ql, DivisionByZeroUndefinedBehavior.ql, DeallocationTypeMismatch.ql, StringLiteralPossiblyModifiedAudit.ql, OutOfRangeEnumCastCriticalUnspecifiedBehavior.ql, NullPointerToMemberAccessUndefinedBehavior.ql, UninitializedStaticPointerToMemberUndefinedBehavior.ql, NonExistentMemberAccessUndefinedBehavior.ql
  • RULE-6-2-3 - DuplicateInlineFunctionDefinitions.ql, TemplateSpecializationWrongLocation.ql, DuplicateTypeDefinitions.ql
  • RULE-6-8-4 - MemberFunctionsRefqualified.ql
  • RULE-6-9-1 - TypeAliasesDeclaration.ql
  • RULE-8-2-11 - InappropriateArgumentTypePassedViaEllipsis.ql
  • RULE-8-7-1 - PointerArithmeticFormsAnInvalidPointer.ql, PointerArgumentToCstringFunctionIsInvalid.ql
  • RULE-15-0-1 - ImproperlyProvidedSpecialMemberFunctions.ql, ImproperlyProvidedSpecialMemberFunctionsAudit.ql
  • RULE-21-6-1 - DynamicMemoryShouldNotBeUsed.ql
  • RULE-28-6-1 - StdMoveWithNonConstLvalue.ql