This repository contains CodeQL queries and libraries which support various Coding Standards.
MIT License
Bot releases are hidden (Show)
Published by jsinglet over 2 years ago
A3-8-1
, A5-3-2
, EXP54-CPP
, STR51-CPP
cpp/autosar/using-directives-used
for anonymous namespaces.A10-2-1
- NonVirtualPublicOrProtectedFunctionsRedefinedQuery
:
A10-3-3
- VirtualFunctionsIntroducedInFinalClassQuery
cpp/autosar/external-linkage-not-declared-in-header-file
for declarations that actually were in header filescreate_release.sh
script to include query artifacts with Markdown help filesM3-2-1
- DeclarationsOfAnObjectShallHaveCompatibleTypes.ql
CON53-CPP
- DeadlockByLockingInPredefinedOrder.ql
CON52-CPP
- PreventBitFieldAccessFromMultipleThreads.ql
M5-18-1
: Update the alert message to conform with our query style-guide.CON53-CPP
- DeadlockByLockingInPredefinedOrder.ql
CON35-C
- DeadlockByLockingInPredefinedOrder.ql
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
.New queries added to cover the following rules:
StdLibDynamicMemoryAllocationUsed.ql
OctalConstantsUsed.ql
RestrictTypeQualifierUsed.ql
CommaOperatorShouldNotBeUsed.ql
FeaturesOfStdarghUsed.ql
UnionKeywordShouldNotBeUsed.ql
MacroDefinedWithTheSameNameAsKeyword.ql
FunctionLikeMacroArgsContainHashTokenCQuery.ql
DefineAndUndefUsedOnReservedIdentifierOrMacroName.ql
MemoryAllocDeallocFunctionsOfStdlibhUsed.ql
StandardHeaderFileUsedSetjmph.ql
StandardHeaderFileUsedSignalh.ql
StandardLibraryInputoutputFunctionsUsed.ql
AtofAtoiAtolAndAtollOfStdlibhUsed.ql
TerminationFunctionsOfStdlibhUsed.ql
, TerminationMacrosOfStdlibhUsed.ql
BsearchAndQsortOfStdlibhUsed.ql
StandardLibraryTimeAndDateFunctionsUsed.ql
StandardHeaderFileTgmathhUsed.ql
ExceptionHandlingFeaturesOfFenvhUsed.ql
SystemOfStdlibhUsed.ql
New queries added to cover the following rules:
DeadlockByLockingInPredefinedOrder.ql
WrapFunctionsThatCanSpuriouslyWakeUpInLoop.ql
DoNotCallSystem.ql
Published by rvermeulen over 2 years ago
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
.New queries added to cover the following rules:
PreventBitFieldAccessFromMultipleThreads.ql
New queries added to cover the following rules:
ObjectWithNoPointerDereferenceShouldBeOpaque.ql
PointerShouldPointToConstTypeWhenPossible.ql
ConversionBetweenFunctionPointerAndOtherType.ql
ConversionBetweenIncompleteTypePointerAndOtherType.ql
CastBetweenObjectPointerAndDifferentObjectType.ql
ConversionBetweenPointerToObjectAndIntegerType.ql
ConversionFromPointerToVoidIntoPointerToObject.ql
CastBetweenPointerToVoidAndArithmeticType.ql
CastBetweenPointerToObjectAndNonIntArithmeticType.ql
CastRemovesConstOrVolatileQualification.ql
MacroNullNotUsedAsIntegerNullPointerConstant.ql
PointerAndDerivedPointerMustAddressSameArray.ql
SubtractionBetweenPointersMustAddressSameArray.ql
RelationalOperatorComparesPointerToDifferentArray.ql
DoNotUseAdditionOrSubtractionOperatorsOnPointers.ql
NoMoreThanTwoLevelsOfPointerNestingInDeclarations.ql
AutomaticStorageObjectAddressCopiedToOtherObject.ql
ControllingExpressionIfDirective.ql
New queries added to cover the following rules:
PreventDataRacesWithMultipleThreads.ql
RaceConditionsWhenUsingLibraryFunctions.ql
DoNotCallSignalInMultithreadedProgram.ql
CastCharBeforeConvertingToLargerSizes.ql
DoNotConfuseNarrowAndWideFunctions.ql
Published by rvermeulen over 2 years ago
M16-3-1
- MoreThanOneOccurrenceHashOperatorInMacroDefinition.ql
:
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
.New queries added to cover the following rules:
PrecautionIncludeGuardsNotProvided.ql
UndefShouldNotBeUsed.ql
MoreThanOneHashOperatorInMacroDefinition.ql
MacroParameterUsedAsHashOperand.ql
FileOpenForReadAndWriteOnDifferentStreams.ql
AttemptToWriteToAReadOnlyStream.ql
PointerToAFileObjectDereferenced.ql
EofShallBeComparedWithUnmodifiedReturnValues.ql
New queries added to cover the following rules:
DoNotPerformFileOperationsOnDevices.ql
SuccessfulFgetsOrFgetwsMayReturnAnEmptyString.ql
ToCharacterHandlingFunctionsRepresentableAsUChar.ql
Published by rvermeulen over 2 years ago
A26-5-1
and MSC50-CPP
to share the same query with MSC30-C
.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
.New queries added to cover the following rules:
SideEffectAndCrementInFullExpression.ql
ModificationOfFunctionParameter.ql
New queries added to cover the following rules:
RandUsedForGeneratingPseudorandomNumbers.ql
ProperlySeedPseudorandomNumberGenerators.ql
ControlFlowReachesTheEndOfANonVoidFunction.ql
DoNotAttemptToModifyStringLiterals.ql
StringsHasSufficientSpaceForTheNullTerminator.ql
NonNullTerminatedToFunctionThatExpectsAString.ql
Published by rvermeulen over 2 years ago
A26-5-1
and MSC50-CPP
to share the same query with MSC30-C
.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
.New queries added to cover the following rules:
SideEffectAndCrementInFullExpression.ql
ModificationOfFunctionParameter.ql
New queries added to cover the following rules:
RandUsedForGeneratingPseudorandomNumbers.ql
ProperlySeedPseudorandomNumberGenerators.ql
ControlFlowReachesTheEndOfANonVoidFunction.ql
Published by rvermeulen over 2 years ago
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
.New queries added to cover the following rules:
IdentifiersInTheSameNameSpaceUnambiguous.ql
CharacterSequencesAndUsedWithinAComment.ql
LineSplicingUsedInComments.ql
OctalAndHexadecimalEscapeSequencesNotTerminated.ql
SectionsOfCodeShallNotBeCommentedOut.ql
UOrUSuffixRepresentedInUnsignedType.ql
LowercaseCharacterLUsedInLiteralSuffix.ql
UnenclosedSizeofOperand.ql
, ImplicitPrecedenceOfOperatorsInExpression.ql
InitializerListsContainPersistentSideEffects.ql
ResultOfAnAssignmentOperatorShouldNotBeUsed.ql
PossibleSuppressedSideEffectInLogicOperatorOperand.ql
SizeofOperandWithSideEffect.ql
New queries added to cover the following rules:
DependenceOnOrderOfScalarEvaluationForSideEffects.ql
, DependenceOnOrderOfFunctionArgumentsForSideEffects.ql
UnevaluatedOperandWithSideEffect.ql
AssignmentsInSelectionStatements.ql
DoNotCopyAFileObject.ql
ResetStringsOnFgetsOrFgetwsFailure.ql
DoNotCallGetcAndPutcWithSideEffects.ql
OnlyUseValuesForFsetposThatAreReturnedFromFgetpos.ql
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
.Published by rvermeulen over 2 years ago
2.6.3
in conjunction with a copy of the CodeQL standard library for C++ (github/codeql
) set to the tag codeql-cli/v2.6.3
.New queries added to cover the following rules:
IncludeDirectivesPrecededByDirectivesOrComments.ql
ForbiddenCharactersInHeaderFileName.ql
IdentifiersUsedInPreprocessorExpression.ql
PreprocessorHashOperatorsShouldNotBeUsed.ql
FileUsedAfterClosed.ql
New queries added to cover the following rules:
ExcludeUserInputFromFormatStrings.ql
DistinguishBetweenCharReadFromAFileAndEofOrWeof.ql
, EndOfFileCheckPortability.ql
DoNotAlternatelyIOFromAStreamWithoutPositioning.ql
CloseFilesWhenTheyAreNoLongerNeeded.ql
UndefinedBehaviorAccessingAClosedFile.ql
Published by rvermeulen over 2 years ago
This release of CodeQL Coding Standards is certified as a software tool suitable for use in safety-related development projects according to ISO26262:2018 for any ASIL.
A3-8-1
, A5-3-2
, EXP54-CPP
, STR51-CPP
cpp/autosar/using-directives-used
for anonymous namespaces.A10-2-1
- NonVirtualPublicOrProtectedFunctionsRedefinedQuery
:
A10-3-3
- VirtualFunctionsIntroducedInFinalClassQuery
cpp/autosar/external-linkage-not-declared-in-header-file
for declarations that actually were in header files2.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
.