CodeQL documentation
CodeQL resources
CodeQL overview
CodeQL guides
Writing CodeQL queries
CodeQL language guides
Reference docs
QL language reference
CodeQL standard-libraries
CodeQL query help
Source files
CodeQL repository
Academic
QL publications
CodeQL query help for C and C++
‘new’ object freed with ‘delete[]’
‘new[]’ array freed with ‘delete’
Accidental rethrow
Ambiguously signed bit-field member
Arithmetic operation assumes 365 days per year
Array argument size mismatch
Array offset used before range check
Assignment where comparison was intended
Authentication bypass by spoofing
Avoid floats in for loops
Bad check for oddness
Bad check for overflow of integer addition
Badly bounded write
Block with too many statements
CGI script vulnerable to cross-site scripting
Call to
memset
may be deleted
Call to a function with one or more incompatible arguments
Call to alloca in a loop
Call to function with extraneous arguments
Call to function with fewer arguments than declared parameters
Call to memory access function may overflow buffer
Cast between HRESULT and a Boolean type
Cast from char* to wchar_t*
Catching by value
Certificate not checked
Certificate result conflation
Cleartext storage of sensitive information in an SQLite database
Cleartext storage of sensitive information in buffer
Cleartext storage of sensitive information in file
Cleartext transmission of sensitive information
Comma before misleading indentation
Commented-out code
Comparison of narrow type with wide type in loop condition
Comparison result is always the same
Comparison where assignment was intended
Complex condition
Constant return type
Constant return type on member
Continue statement that does not continue
Dangerous use of ‘cin’
Dead code due to goto or break statement
Declaration hides parameter
Declaration hides variable
Dubious NULL check
Duplicate include guard
Empty branch of conditional
Equality test on floating-point values
Exception thrown in destructor
Exposure of system data to an unauthorized control sphere
Expression has no effect
FIXME comment
Failure to use HTTPS URLs
File created without restricting permissions
File opened with O_CREAT flag but without mode argument
For loop variable changed in body
Function declared in block
Futile conditional
Guarded Free
Implicit downcast from bitfield
Implicit function declaration
Include header files only
Inconsistent definition of copy constructor and assignment (’Rule of Two’)
Inconsistent direction of for loop
Inconsistent nullness check
Inconsistent operation on return value
Inconsistent virtual inheritance
Incorrect ‘not’ operator usage
Incorrect allocation-error handling
Incorrect constructor delegation
Incorrect return-value check for a ‘scanf’-like function
Invalid pointer dereference
Irregular enum initialization
Iterator to expired container
Large object passed by value
Leaky catch