Releases: github/codeql-coding-standards
v2.15.0
Release summary
- New queries added for the following rule packages: EssentialTypes, Memory1
- The following changes have been made for this release:
A13-5-2
- address a false positive where lambda expressions with empty captures were being flagged as having a non-compliant conversion operator.A0-1-2
- Addressed false positives where the return values are cast to
void
in C-style or assigned tostd::ignore
.
- Addressed false positives where the return values are cast to
A0-1-4
- Addressed false positives where the parameters are marked with attribute
[[maybe_unused]]
, or either cast tovoid
in C-style or assigned tostd::ignore
in the function body.
- Addressed false positives where the parameters are marked with attribute
RULE-8-4
-CompatibleDeclarationObjectDefined.ql
- Update rule implementation based on changes in the CodeQL libraries.
- Updated the CodeQL version to
2.10.5
. A2-10-4
-IdentifierNameOfStaticFunctionReusedInNamespace.ql
:- Reuse of an identifier name of a static function in a namespace is now detected.
A2-10-4
-IdentifierNameOfStaticNonMemberObjectReusedInNamespace.ql
:- Reuse of an identifier name of a static non-member object in a namespace is now detected.
A2-10-5
-IdentifierNameOfStaticNonMemberObjectWithExternalOrInternalLinkageIsReused.ql
:- Reuse of an identifier name of a static non-member object with internal linkage in a namespace is now detected.
A5-2-2
CStyleCasts.ql
- exclude template parameters to avoid false positives when using the "functional notation" syntax. In addition, provide a greater explanation on limitations of this query.
- Improved alert message to avoid reporting locations in standard header files, which cannot be viewed in Code Scanning, in the following queries:
-Rule 21.4
-Rule 21.5
-Rule 21.6
-Rule 21.7
-Rule 21.8
-Rule 21.9
-Rule 21.10
-Rule 21.11
-Rule 21.12
-Rule 21.21
A13-2-2
-BinaryOperatorAndBitwiseOperatorReturnAPrvalue.ql
- The formatting of the query output message has been changed and operators are now displayed starting with the return type instead of ending with it.
CON41-C
: Refactored to address compiler compatibility issues. More accurate
modeling of cases where macros are modeled against other macros such as
atomic_compare_exchange_weak
andatomic_store
.CON40-C
: Refactored to address compiler compatibility issues. More accurate
modeling of cases where macros are modeled against other macros such as
atomic_compare_exchange_weak
andatomic_store
.
STR37-C
- reduce false negatives by improving detection when the<ctype>
functions are implemented using macros.
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.10.5
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.10.5
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220908.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- RULE-9-2 -
InitializerForAggregateOrUnionNotEnclosedInBraces.ql
- RULE-9-3 -
PartiallyInitializedArrayWithExplicitInitializers.ql
- RULE-9-4 -
RepeatedInitializationOfAggregateObjectElement.ql
- RULE-10-1 -
OperandsOfAnInappropriateEssentialType.ql
,PointerTypeOnLogicalOperator.ql
- RULE-10-2 -
AdditionSubtractionOnEssentiallyCharType.ql
- RULE-10-3 -
AssignmentOfIncompatibleEssentialType.ql
- RULE-10-4 -
OperandsWithMismatchedEssentialTypeCategory.ql
- RULE-10-5 -
InappropriateEssentialTypeCast.ql
- RULE-10-6 -
AssignmentToWiderEssentialType.ql
- RULE-10-7 -
ImplicitConversionOfCompositeExpression.ql
- RULE-10-8 -
InappropriateCastOfCompositeExpression.ql
- RULE-14-1 -
LoopOverEssentiallyFloatType.ql
- RULE-21-14 -
MemcmpUsedToCompareNullTerminatedStrings.ql
- RULE-21-16 -
MemcmpOnInappropriateEssentialTypeArgs.ql
v2.14.0
Release summary
- New queries added for the following rule packages: BitfieldTypes, Contracts6, Declarations7, Declarations8, InvalidMemory1, Pointers3
- The following changes have been made for this release:
RULE-11-7
-CastBetweenPointerToObjectAndNonIntArithmeticType.ql
- Corrected the query output message to describe a cast involving a pointer to an object rather than a void pointer.
A1-1-2
: Refactored this test case to support better cross-compiler testing.A1-1-3
: Added support for alternate spelling of compiler flag.
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.9.4
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.9.4
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220615.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- RULE-6-1 -
BitFieldsShallOnlyBeDeclaredWithAnAppropriateType.ql
- RULE-6-2 -
SingleBitNamedBitFieldsOfASignedType.ql
- RULE-8-12 -
ValueImplicitEnumerationConstantNotUnique.ql
- RULE-9-1 -
ObjectWithAutoStorageDurationReadBeforeInit.ql
- RULE-17-5 -
ArrayFunctionArgumentNumberOfElements.ql
- RULE-17-7 -
ValueReturnedByAFunctionNotUsed.ql
- RULE-18-8 -
VariableLengthArrayTypesUsed.ql
Appendix: CERT-C new queries
New queries added to cover the following rules:
- DCL30-C -
AppropriateStorageDurationsStackAdressEscape.ql
,AppropriateStorageDurationsFunctionReturn.ql
- DCL39-C -
InformationLeakageAcrossTrustBoundariesC.ql
- EXP32-C -
DoNotAccessVolatileObjectWithNonVolatileReference.ql
- EXP33-C -
DoNotReadUninitializedMemory.ql
- EXP34-C -
DoNotDereferenceNullPointers.ql
- EXP36-C -
DoNotCastPointerToMoreStrictlyAlignedPointerType.ql
- EXP39-C -
DoNotAccessVariableViaPointerOfIncompatibleType.ql
- EXP40-C -
DoNotModifyConstantObjects.ql
- EXP43-C -
DoNotPassAliasedPointerToRestrictQualifiedParam.ql
,RestrictPointerReferencesOverlappingObject.ql
- MEM30-C -
DoNotAccessFreedMemory.ql
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.9.4
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.9.4
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220615.
- Using the CodeQL CLI version
v2.13.0
Release summary
- New queries added for the following rule packages: Contracts5, DeadCode, Declarations4, Declarations5, Declarations6
- The following changes have been made for this release:
M0-1-9
: This query previously excluded all results which were affected by a macro expansion. This is because a macro may be expanded multiple times with code that is dead in one expansion but live in another. This query has been modified to exclude results only where the entirety of a statement is generated by a macro. This reduces false negatives where the statements liveness is not affected by the macro expansion.
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.9.4
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.9.4
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220615.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- RULE-2-1 -
UnreachableCode.ql
- RULE-2-2 -
DeadCode.ql
- RULE-2-3 -
UnusedTypeDeclarations.ql
- RULE-2-4 -
UnusedTagDeclaration.ql
- RULE-2-5 -
UnusedMacroDeclaration.ql
- RULE-2-6 -
UnusedLabelDeclaration.ql
- RULE-2-7 -
UnusedParameter.ql
- RULE-5-2 -
IdentifiersDeclaredInTheSameScopeNotDistinct.ql
- RULE-5-8 -
IdentifiersWithExternalLinkageNotUnique.ql
- RULE-5-9 -
IdentifiersWithInternalLinkageNotUnique.ql
- RULE-8-2 -
FunctionTypesNotInPrototypeForm.ql
- RULE-8-3 -
DeclarationsOfAnObjectSameNameAndType.ql
,DeclarationsOfAFunctionSameNameAndType.ql
- RULE-8-4 -
CompatibleDeclarationObjectDefined.ql
,CompatibleDeclarationFunctionDefined.ql
- RULE-8-5 -
ExternalObjectOrFunctionNotDeclaredInOneFile.ql
- RULE-8-6 -
IdentifierWithExternalLinkageOneDefinition.ql
- RULE-8-7 -
ShouldNotBeDefinedWithExternalLinkage.ql
- RULE-8-8 -
MissingStaticSpecifierFunctionRedeclarationC.ql
,MissingStaticSpecifierObjectRedeclarationC.ql
- RULE-8-9 -
UnnecessaryExposedIdentifierDeclarationC.ql
- RULE-8-10 -
InlineFunctionNotDeclaredStaticStorage.ql
- RULE-8-11 -
ArrayExternalLinkageSizeExplicitlySpecified.ql
- RULE-17-3 -
FunctionDeclaredImplicitly.ql
- RULE-18-7 -
FlexibleArrayMembersDeclared.ql
Appendix: CERT-C new queries
New queries added to cover the following rules:
- ERR32-C -
DoNotRelyOnIndeterminateValuesOfErrno.ql
- ERR33-C -
DetectAndHandleStandardLibraryErrors.ql
v2.12.0
Release summary
- New queries added for the following rule packages: Language2, Preprocessor6
- The following changes have been made for this release:
- Add the Python scripts under
scripts/guideline_recategorization
and the JSON schemas underschemas
. - Add the Python scripts under
scripts/shared
relied upon by the analysis report generation. EXP30-C
-DependenceOnOrderOfFunctionArgumentsForSideEffects.ql
:- Prefer the
GlobalValueNumbering
CodeQL library over theGlobalValueNumberingImpl
library, as the former yields higher quality results and the latter is going to be deprecated. This also improves performance when multiple queries are evaluated, due to more sharing of intermediate computations.
- Prefer the
EXP50-CPP
-DoNotDependOnTheOrderOfEvaluationForSideEffectsInFunctionCallsAsFunctionArguments.ql
:- Prefer the
GlobalValueNumbering
CodeQL library over theGlobalValueNumberingImpl
library, as the former yields higher quality results and the latter is going to be deprecated. This also improves performance when multiple queries are evaluated, due to more sharing of intermediate computations.
- Prefer the
M27-0-1
CstdioTypesUsed.ql
- Excludesize_t
from this rule, as it can be provided by headers other than<cstdio>
.CstdioMacrosUsed.ql
- ExcludeNULL
from this rule, as it can be provided by headers other than<cstdio>
.
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.9.4
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.9.4
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220615.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- DIR-4-2 -
UsageOfAssemblyLanguageShouldBeDocumented.ql
- DIR-4-9 -
FunctionOverFunctionLikeMacro.ql
- RULE-1-4 -
EmergentLanguageFeaturesUsed.ql
v2.11.0
Release summary
- New queries added for the following rule packages: Contracts2, Contracts4, Banned, Pointers1, Preprocessor2, Syntax
- The following changes have been made for this release:
A5-2-2
-TraditionalCStyleCastsUsed.ql
- Reduced false positives by excluding casts generated by library macros (i.e. macros defined outside the source location)
- Improved the message to cite the macro which generated the c-style cast, if any.
- Improved the message to cite the type being casted to, to aid with identification and remediation.
M0-1-4
-SingleUseMemberPODVariable.ql
- Reduce false positives by excluding any constexpr variable whose constant value is used as an argument to a template.
- The following rules have been renamed:
- RULE-4-4 has been renamed to DIR-4-4 to reflect correct naming as per
MISRA C:2012 standard. - RULE-4-8 has been renamed to DIR-4-8 to reflect correct naming as per
MISRA C:2012 standard. - RULE-4-10 has been renamed to DIR-4-10 to reflect correct naming as per
MISRA C:2012 standard. - RULE-4-12 has been renamed to DIR-4-12 to reflect correct naming as per
MISRA C:2012 standard.
- RULE-4-4 has been renamed to DIR-4-4 to reflect correct naming as per
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.9.4
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.9.4
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220615.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- DIR-4-4 -
SectionsOfCodeShallNotBeCommentedOut.ql
- DIR-4-8 -
ObjectWithNoPointerDereferenceShouldBeOpaque.ql
- DIR-4-10 -
PrecautionIncludeGuardsNotProvided.ql
- DIR-4-12 -
StdLibDynamicMemoryAllocationUsed.ql
- RULE-21-19 -
ValuesReturnedByLocaleSettingUsedAsPtrToConst.ql
- RULE-21-20 -
CallToSetlocaleInvalidatesOldPointers.ql
,CallToSetlocaleInvalidatesOldPointersWarn.ql
Appendix: CERT-C new queries
New queries added to cover the following rules:
- ENV32-C -
ExitHandlersMustReturnNormally.ql
- ENV34-C -
DoNotStorePointersReturnedByEnvFunctions.ql
,DoNotStorePointersReturnedByEnvironmentFunWarn.ql
- ERR30-C -
SetlocaleMightSetErrno.ql
,ErrnoReadBeforeReturn.ql
,FunctionCallBeforeErrnoCheck.ql
,ErrnoNotSetToZero.ql
v2.10.0
Release summary
- New queries added for the following rule packages: Concurrency5, Contracts3, Declarations3, Language1
- The following changes have been made for this release:
M0-1-9
-DeadCode.ql
:- More compiler generated statements are now excluded from being reported as dead code, including compiler generated statements for
static_assert
calls.
- More compiler generated statements are now excluded from being reported as dead code, including compiler generated statements for
A2-10-5
-IdentifierNameOfANonMemberObjectWithExternalOrInternalLinkageIsReused.ql
- Reduce false positives by excluding variable template instantiations.
M3-2-1
-DeclarationsOfAnObjectShallHaveCompatibleTypes.ql
- Reduced false positives by excluding non-object variables (for example, member variables).
- Reduced false positives by excluding variable templates and template instantiations.
- Improved the reported error message by including the conflicting type names.
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.9.4
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.9.4
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220615.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- DIR-4-3 -
LanguageNotEncapsulatedAndIsolated.ql
- RULE-5-3 -
IdentifierHidingC.ql
- RULE-5-5 -
IdentifiersNotDistinctFromMacroNames.ql
- RULE-5-6 -
TypedefNameNotUnique.ql
- RULE-5-7 -
TagNameNotUnique.ql
- RULE-8-1 -
ExplicitlyDeclareTypes.ql
- RULE-22-8 -
ErrnoSetToZeroPriorToCall.ql
- RULE-22-9 -
ErrnoSetToZeroAfterCall.ql
- RULE-22-10 -
OnlyTestErrnoRightAfterErrnoSettingFunction.ql
Appendix: CERT-C new queries
New queries added to cover the following rules:
- CON39-C -
ThreadWasPreviouslyJoinedOrDetached.ql
- CON40-C -
AtomicVariableTwiceInExpression.ql
v2.9.0
Release summary
- New queries added for the following rule packages: Concurrency4, Declarations2
- The following changes have been made for this release:
M0-1-4
-SingleUsePODVariable.ql
- This rule no longer considers compiler-generated access to a variable when determining if the variable has a single use.
A8-5-3
-AvoidAutoWithBracedInitialization.ql
:- Fix regression where
auto x{0}
was no longer detected as a braced initialization with typeauto
with the latest CodeQL versions. - No longer falsely detect cases where braced initialization was not used, but where the inferred type would be
std::initializer_list
.
- Fix regression where
A7-3-1
-DefinitionNotConsideredForUnqualifiedLookup.ql
- The locations reported for names occurring in using-declarations has improved in the latest CodeQL versions.
- Updated the CodeQL version to
2.9.4
.
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.9.4
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tagcodeql-cli/v2.9.4
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220615.
- Using the CodeQL CLI version
Appendix: CERT-C new queries
New queries added to cover the following rules:
- CON30-C -
CleanUpThreadSpecificStorage.ql
- CON34-C -
AppropriateThreadObjectStorageDurations.ql
,ThreadObjectStorageDurationsNotInitialized.ql
- DCL38-C -
DeclaringAFlexibleArrayMember.ql
- DCL40-C -
ExcessLengthNamesIdentifiersNotDistinct.ql
,IncompatibleObjectDeclarations.ql
,IncompatibleFunctionDeclarations.ql
- DCL41-C -
VariablesInsideSwitchStatement.ql
v2.8.0
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
andcert-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 tagcodeql-cli/v2.7.6
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220120.
- Using the CodeQL CLI version
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
v2.7.0
Release summary
- New queries added for the following rule packages: Preprocessor5
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 tagcodeql-cli/v2.7.6
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220120.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- RULE-20-7 -
MacroParameterNotEnclosedInParenthesesCQuery.ql
Appendix: CERT-C new queries
New queries added to cover the following rules:
- MSC38-C -
DoNotTreatAPredefinedIdentifierAsObject.ql
- PRE32-C -
MacroOrFunctionArgsContainHashToken.ql
v2.6.0
Release summary
- New queries added for the following rule packages: Banned, Concurrency2, Preprocessor4
- The following changes have been made for this release:
A3-8-1
,A5-3-2
,EXP54-CPP
,STR51-CPP
- All queries for these rules are now enabled by default. They previously disabled due to performance concerns.
- Address a false positive flagged by
cpp/autosar/using-directives-used
for anonymous namespaces. A10-2-1
-NonVirtualPublicOrProtectedFunctionsRedefinedQuery
:- Fixed a typo that caused the derived class not to be displayed in the alert message
A10-3-3
-VirtualFunctionsIntroducedInFinalClassQuery
- Fixed a typo that caused the introducing class not to be displayed in the alert message
- Address a false positive flagged by
cpp/autosar/external-linkage-not-declared-in-header-file
for declarations that actually were in header files - Update the
create_release.sh
script to include query artifacts with Markdown help files M3-2-1
-DeclarationsOfAnObjectShallHaveCompatibleTypes.ql
- Use the type of the variable declaration entries instead of the variables, as variables may exist that have multiple entries with different types.
CON53-CPP
-DeadlockByLockingInPredefinedOrder.ql
- Optimized performance and expanded coverage to include cases where locking
order is not serialized
- Optimized performance and expanded coverage to include cases where locking
CON52-CPP
-PreventBitFieldAccessFromMultipleThreads.ql
- Fixed an issue with RAII-style locks and scope causing locks to not be
correctly identified.
- Fixed an issue with RAII-style locks and scope causing locks to not be
- Remove support for the anonymized pack because it is no longer necessary. The code scanning pack is superseding this pack.
- Remove support for the LGTM pack because LGTM is EOL.
M5-18-1
: Update the alert message to conform with our query style-guide.CON53-CPP
-DeadlockByLockingInPredefinedOrder.ql
- Optimized performance by removing unneeded conditionals.
CON35-C
-DeadlockByLockingInPredefinedOrder.ql
- Optimized performance by removing unneeded conditionals.
Supported versions
- 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 tagcodeql-cli/v2.7.6
. - Using the CodeQL Action or CodeQL runner with the codeql-bundle-20220120.
- Using the CodeQL CLI version
Appendix: MISRA-C-2012 new queries
New queries added to cover the following rules:
- RULE-4-12 -
StdLibDynamicMemoryAllocationUsed.ql
- RULE-7-1 -
OctalConstantsUsed.ql
- RULE-8-14 -
RestrictTypeQualifierUsed.ql
- RULE-12-3 -
CommaOperatorShouldNotBeUsed.ql
- RULE-17-1 -
FeaturesOfStdarghUsed.ql
- RULE-19-2 -
UnionKeywordShouldNotBeUsed.ql
- RULE-20-4 -
MacroDefinedWithTheSameNameAsKeyword.ql
- RULE-20-6 -
FunctionLikeMacroArgsContainHashTokenCQuery.ql
- RULE-21-1 -
DefineAndUndefUsedOnReservedIdentifierOrMacroName.ql
- RULE-21-3 -
MemoryAllocDeallocFunctionsOfStdlibhUsed.ql
- RULE-21-4 -
StandardHeaderFileUsedSetjmph.ql
- RULE-21-5 -
StandardHeaderFileUsedSignalh.ql
- RULE-21-6 -
StandardLibraryInputoutputFunctionsUsed.ql
- RULE-21-7 -
AtofAtoiAtolAndAtollOfStdlibhUsed.ql
- RULE-21-8 -
TerminationFunctionsOfStdlibhUsed.ql
,TerminationMacrosOfStdlibhUsed.ql
- RULE-21-9 -
BsearchAndQsortOfStdlibhUsed.ql
- RULE-21-10 -
StandardLibraryTimeAndDateFunctionsUsed.ql
- RULE-21-11 -
StandardHeaderFileTgmathhUsed.ql
- RULE-21-12 -
ExceptionHandlingFeaturesOfFenvhUsed.ql
- RULE-21-21 -
SystemOfStdlibhUsed.ql
Appendix: CERT-C new queries
New queries added to cover the following rules:
- CON35-C -
DeadlockByLockingInPredefinedOrder.ql
- CON36-C -
WrapFunctionsThatCanSpuriouslyWakeUpInLoop.ql
- ENV33-C -
DoNotCallSystem.ql