Broad Mapping: CERT

This table contains broad mappings between SEI CERT coding standard rule and recommendation identifiers and CodeSonar warning classes.

The close mappings from SEI CERT coding standards to CodeSonar warning classes are shown in CERT Checks.

CSV versions of these tables are provided in CERT-C-mapping-broad.csv, CERT-CPP-mapping-broad.csv, and CERT-Java-mapping-broad.csv.



CERT-C: SEI CERT C Coding Standard

This table is also available in CSV format: CERT-C-mapping-broad.csv.

CERT-C CategoryC Warning Classes
CERT-C:API00-C Functions should validate their parameters Recommendation
closely mapped
also related
CERT-C:API07-C Enforce type safety Recommendation
closely mapped
CERT-C:ARR00-C Understand how arrays work Recommendation
closely mapped
CERT-C:ARR01-C Do not apply the sizeof operator to a pointer when taking the size of an array Recommendation
closely mapped
CERT-C:ARR30-C Do not form or use out-of-bounds pointers or array subscripts Rule
closely mapped
CERT-C:ARR32-C Ensure size arguments for variable length arrays are in a valid range Rule
closely mapped
also related
CERT-C:ARR36-C Do not subtract or compare two pointers that do not refer to the same array Rule
closely mapped
CERT-C:ARR37-C Do not add or subtract an integer to a pointer to a non-array object Rule
closely mapped
CERT-C:ARR38-C Guarantee that library functions do not form invalid pointers Rule
closely mapped
CERT-C:ARR39-C Do not add or subtract a scaled integer to a pointer Rule
closely mapped
CERT-C:CON01-C Acquire and release synchronization primitives in the same module, at the same level of abstraction Recommendation
closely mapped
CERT-C:CON02-C Do not use volatile as a synchronization primitive Recommendation
closely mapped
CERT-C:CON05-C Do not perform operations that can block while holding a lock Recommendation
closely mapped
CERT-C:CON06-C Ensure that every mutex outlives the data it protects Recommendation
also related
CERT-C:CON07-C Ensure that compound operations on shared variables are atomic Recommendation
closely mapped
also related
CERT-C:CON08-C Do not assume that a group of calls to independently atomic methods is atomic Recommendation
also related
CERT-C:CON30-C Clean up thread-specific storage Rule
closely mapped
CERT-C:CON31-C Do not destroy a mutex while it is locked Rule
closely mapped
CERT-C:CON32-C Prevent data races when accessing bit-fields from multiple threads Rule
closely mapped
CERT-C:CON33-C Avoid race conditions when using library functions Rule
closely mapped
also related
CERT-C:CON34-C Declare objects shared between threads with appropriate storage durations Rule
closely mapped
CERT-C:CON35-C Avoid deadlock by locking in a predefined order Rule
closely mapped
CERT-C:CON36-C Wrap functions that can spuriously wake up in a loop Rule
closely mapped
CERT-C:CON37-C Do not call signal() in a multithreaded program Rule
closely mapped
CERT-C:CON38-C Preserve thread safety and liveness when using condition variables Rule
closely mapped
CERT-C:CON39-C Do not join or detach a thread that was previously joined or detached Rule
closely mapped
CERT-C:CON40-C Do not refer to an atomic variable twice in an expression Rule
closely mapped
CERT-C:CON41-C Wrap functions that can fail spuriously in a loop Rule
closely mapped
CERT-C:CON43-C Do not allow data races in multithreaded code Rule
closely mapped
CERT-C:DCL00-C Const-qualify immutable objects Recommendation
closely mapped
CERT-C:DCL01-C Do not reuse variable names in subscopes Recommendation
closely mapped
CERT-C:DCL02-C Use visually distinct identifiers Recommendation
closely mapped
CERT-C:DCL04-C Do not declare more than one variable per declaration Recommendation
closely mapped
CERT-C:DCL05-C Use typedefs of non-pointer types only Recommendation
closely mapped
CERT-C:DCL06-C Use meaningful symbolic constants to represent literal values Recommendation
closely mapped
CERT-C:DCL07-C Include the appropriate type information in function declarators Recommendation
closely mapped
CERT-C:DCL11-C Understand the type issues associated with variadic functions Recommendation
closely mapped
CERT-C:DCL13-C Declare function parameters that are pointers to values not changed by the function as const Recommendation
closely mapped
CERT-C:DCL15-C Declare file-scope objects or functions that do not need external linkage as static Recommendation
closely mapped
CERT-C:DCL16-C Use "L," not "l," to indicate a long value Recommendation
closely mapped
CERT-C:DCL17-C Beware of miscompiled volatile-qualified variables Recommendation
also related
CERT-C:DCL18-C Do not begin integer constants with 0 when specifying a decimal value Recommendation
closely mapped
CERT-C:DCL19-C Minimize the scope of variables and functions Recommendation
closely mapped
CERT-C:DCL20-C Explicitly specify void when a function accepts no arguments Recommendation
closely mapped
CERT-C:DCL23-C Guarantee that mutually visible identifiers are unique Recommendation
closely mapped
CERT-C:DCL30-C Declare objects with appropriate storage durations Rule
closely mapped
CERT-C:DCL36-C Do not declare an identifier with conflicting linkage classifications Rule
closely mapped
CERT-C:DCL37-C Do not declare or define a reserved identifier Rule
closely mapped
CERT-C:DCL38-C Use the correct syntax when declaring a flexible array member Rule
also related
CERT-C:DCL39-C Avoid information leakage when passing a structure across a trust boundary Rule
closely mapped
CERT-C:DCL40-C Do not create incompatible declarations of the same function or object Rule
closely mapped
also related
CERT-C:DCL41-C Do not declare variables inside a switch statement before the first case label Rule
closely mapped
CERT-C:ENV01-C Do not make assumptions about the size of an environment variable Recommendation
closely mapped
CERT-C:ENV30-C Do not modify the object referenced by the return value of certain functions Rule
closely mapped
also related
CERT-C:ENV31-C Do not rely on an environment pointer following an operation that may invalidate it Rule
also related
CERT-C:ENV32-C All exit handlers must return normally Rule
closely mapped
CERT-C:ENV33-C Do not call system() Rule
closely mapped
CERT-C:ENV34-C Do not store pointers returned by certain functions Rule
also related
CERT-C:ERR30-C Take care when reading errno Rule
closely mapped
also related
CERT-C:ERR33-C Detect and handle standard library errors Rule
closely mapped
CERT-C:ERR34-C Detect errors when converting a string to a number Rule
closely mapped
CERT-C:EXP00-C Use parentheses for precedence of operation Recommendation
closely mapped
CERT-C:EXP05-C Do not cast away a const qualification Recommendation
closely mapped
CERT-C:EXP08-C Ensure pointer arithmetic is used correctly Recommendation
closely mapped
CERT-C:EXP10-C Do not depend on the order of evaluation of subexpressions or the order in which side effects take place Recommendation
closely mapped
CERT-C:EXP11-C Do not make assumptions regarding the layout of structures with bit-fields Recommendation
also related
CERT-C:EXP12-C Do not ignore values returned by functions Recommendation
closely mapped
CERT-C:EXP14-C Beware of integer promotion when performing bitwise operations on integer types smaller than int Recommendation
closely mapped
CERT-C:EXP15-C Do not place a semicolon on the same line as an if, for, or while statement Recommendation
closely mapped
CERT-C:EXP30-C Do not depend on the order of evaluation for side effects Rule
closely mapped
also related
CERT-C:EXP33-C Do not read uninitialized memory Rule
closely mapped
also related
CERT-C:EXP34-C Do not dereference null pointers Rule
closely mapped
CERT-C:EXP35-C Do not modify objects with temporary lifetime Rule
closely mapped
CERT-C:EXP36-C Do not cast pointers into more strictly aligned pointer types Rule
closely mapped
CERT-C:EXP37-C Call functions with the correct number and type of arguments Rule
closely mapped
CERT-C:EXP39-C Do not access a variable through a pointer of an incompatible type Rule
also related
CERT-C:EXP40-C Do not modify constant objects Rule
also related
CERT-C:EXP42-C Do not compare padding data Rule
closely mapped
also related
CERT-C:EXP43-C Avoid undefined behavior when using restrict-qualified pointers Rule
closely mapped
CERT-C:EXP44-C Do not rely on side effects in operands to sizeof, _Alignof, or _Generic Rule
closely mapped
CERT-C:EXP45-C Do not perform assignments in selection statements Rule
closely mapped
CERT-C:EXP46-C Do not use a bitwise operator with a Boolean-like operand Rule
closely mapped
CERT-C:EXP47-C Do not call va_arg with an argument of the incorrect type Rule
closely mapped
CERT-C:FIO01-C Be careful using functions that use file names for identification Recommendation
closely mapped
CERT-C:FIO02-C Canonicalize path names originating from tainted sources Recommendation
closely mapped
CERT-C:FIO03-C Do not make assumptions about fopen() and file creation Recommendation
also related
CERT-C:FIO06-C Create files with appropriate access permissions Recommendation
closely mapped
CERT-C:FIO11-C Take care when specifying the mode parameter of fopen() Recommendation
also related
CERT-C:FIO21-C Do not create temporary files in shared directories Recommendation
closely mapped
CERT-C:FIO24-C Do not open a file that is already open Recommendation
closely mapped
CERT-C:FIO30-C Exclude user input from format strings Rule
closely mapped
CERT-C:FIO34-C Distinguish between characters read from a file and EOF or WEOF Rule
closely mapped
CERT-C:FIO37-C Do not assume that fgets() or fgetws() returns a nonempty string when successful Rule
closely mapped
CERT-C:FIO39-C Do not alternately input and output from a stream without an intervening flush or positioning call Rule
closely mapped
CERT-C:FIO40-C Reset strings on fgets() or fgetws() failure Rule
closely mapped
CERT-C:FIO41-C Do not call getc(), putc(), getwc(), or putwc() with a stream argument that has side effects Rule
also related
CERT-C:FIO42-C Close files when they are no longer needed Rule
closely mapped
CERT-C:FIO45-C Avoid TOCTOU race conditions while accessing files Rule
closely mapped
CERT-C:FIO46-C Do not access a closed file Rule
closely mapped
CERT-C:FIO47-C Use valid format strings Rule
closely mapped
CERT-C:FLP00-C Understand the limitations of floating-point numbers Recommendation
closely mapped
CERT-C:FLP02-C Avoid using floating-point numbers when precise computation is needed Recommendation
closely mapped
CERT-C:FLP06-C Convert integers to floating point for floating-point operations Recommendation
closely mapped
CERT-C:FLP30-C Do not use floating-point variables as loop counters Rule
closely mapped
CERT-C:FLP32-C Prevent or detect domain and range errors in math functions Rule
closely mapped
CERT-C:FLP34-C Ensure that floating-point conversions are within range of the new type Rule
closely mapped
CERT-C:FLP36-C Preserve precision when converting integral values to floating-point type Rule
closely mapped
CERT-C:FLP37-C Do not use object representations to compare floating-point values Rule
also related
CERT-C:INT01-C Use rsize_t or size_t for all integer values representing the size of an object Recommendation
closely mapped
CERT-C:INT02-C Understand integer conversion rules Recommendation
closely mapped
also related
CERT-C:INT04-C Enforce limits on integer values originating from tainted sources Recommendation
closely mapped
CERT-C:INT05-C Do not use input functions to convert character data if they cannot handle all possible inputs Recommendation
closely mapped
CERT-C:INT07-C Use only explicitly signed or unsigned char type for numeric values Recommendation
closely mapped
CERT-C:INT08-C Verify that all integer values are in range Recommendation
closely mapped
CERT-C:INT09-C Ensure enumeration constants map to unique values Recommendation
closely mapped
CERT-C:INT12-C Do not make assumptions about the type of a plain int bit-field when used in an expression Recommendation
closely mapped
CERT-C:INT13-C Use bitwise operators only on unsigned operands Recommendation
closely mapped
CERT-C:INT18-C Evaluate integer expressions in a larger size before comparing or assigning to that size Recommendation
closely mapped
CERT-C:INT30-C Ensure that unsigned integer operations do not wrap Rule
closely mapped
CERT-C:INT31-C Ensure that integer conversions do not result in lost or misinterpreted data Rule
closely mapped
CERT-C:INT32-C Ensure that operations on signed integers do not result in overflow Rule
closely mapped
CERT-C:INT33-C Ensure that division and remainder operations do not result in divide-by-zero errors Rule
closely mapped
CERT-C:INT34-C Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand Rule
closely mapped
CERT-C:INT35-C Use correct integer precisions Rule
closely mapped
CERT-C:INT36-C Converting a pointer to integer or integer to pointer Rule
closely mapped
CERT-C:MEM00-C Allocate and free memory in the same module, at the same level of abstraction Recommendation
closely mapped
CERT-C:MEM01-C Store a new value in pointers immediately after free() Recommendation
closely mapped
CERT-C:MEM05-C Avoid large stack allocations Recommendation
closely mapped
CERT-C:MEM07-C Ensure that the arguments to calloc(), when multiplied, do not wrap Recommendation
closely mapped
CERT-C:MEM11-C Do not assume infinite heap space Recommendation
closely mapped
CERT-C:MEM30-C Do not access freed memory Rule
closely mapped
CERT-C:MEM31-C Free dynamically allocated memory when no longer needed Rule
closely mapped
CERT-C:MEM33-C Allocate and copy structures containing a flexible array member dynamically Rule
closely mapped
also related
CERT-C:MEM34-C Only free memory allocated dynamically Rule
closely mapped
CERT-C:MEM35-C Allocate sufficient memory for an object Rule
closely mapped
CERT-C:MEM36-C Do not modify the alignment of objects by calling realloc() Rule
closely mapped
CERT-C:MSC00-C Compile cleanly at high warning levels Recommendation
closely mapped
CERT-C:MSC06-C Beware of compiler optimizations Recommendation
closely mapped
CERT-C:MSC07-C Detect and remove dead code Recommendation
closely mapped
CERT-C:MSC11-C Incorporate diagnostic tests using assertions Recommendation
closely mapped
CERT-C:MSC12-C Detect and remove code that has no effect or is never executed Recommendation
closely mapped
CERT-C:MSC13-C Detect and remove unused values Recommendation
closely mapped
CERT-C:MSC15-C Do not depend on undefined behavior Recommendation
also related
CERT-C:MSC17-C Finish every set of statements associated with a case label with a break statement Recommendation
closely mapped
CERT-C:MSC18-C Be careful while handling sensitive data, such as passwords, in program code Recommendation
closely mapped
CERT-C:MSC20-C Do not use a switch statement to transfer control into a complex block Recommendation
closely mapped
CERT-C:MSC21-C Use robust loop termination conditions Recommendation
closely mapped
CERT-C:MSC22-C Use the setjmp(), longjmp() facility securely Recommendation
closely mapped
CERT-C:MSC23-C Beware of vendor-specific library and language differences Recommendation
closely mapped
CERT-C:MSC24-C Do not use deprecated or obsolescent functions Recommendation
closely mapped
CERT-C:MSC25-C Do not use insecure or weak cryptographic algorithms Recommendation
closely mapped
CERT-C:MSC30-C Do not use the rand() function for generating pseudorandom numbers Rule
closely mapped
CERT-C:MSC32-C Properly seed pseudorandom number generators Rule
closely mapped
CERT-C:MSC33-C Do not pass invalid data to the asctime() function Rule
closely mapped
CERT-C:MSC37-C Ensure that control never reaches the end of a non-void function Rule
closely mapped
CERT-C:MSC38-C Do not treat a predefined identifier as an object if it might only be implemented as a macro Rule
closely mapped
CERT-C:MSC39-C Do not call va_arg() on a va_list that has an indeterminate value Rule
closely mapped
CERT-C:MSC41-C Never hard code sensitive information Rule
closely mapped
CERT-C:POS05-C Limit access to files by creating a jail Recommendation
closely mapped
CERT-C:POS30-C Use the readlink() function properly Rule
closely mapped
CERT-C:POS34-C Do not call putenv() with a pointer to an automatic variable as the argument Rule
closely mapped
CERT-C:POS38-C Beware of race conditions when using fork and file descriptors Rule
closely mapped
CERT-C:POS44-C Do not use signals to terminate threads Rule
closely mapped
CERT-C:POS48-C Do not unlock or destroy another POSIX thread's mutex Rule
closely mapped
CERT-C:POS49-C When data must be accessed by multiple threads, provide a mutex and guarantee no adjacent data is also accessed Rule
closely mapped
CERT-C:POS51-C Avoid deadlock with POSIX threads by locking in predefined order Rule
closely mapped
CERT-C:POS52-C Do not perform operations that can block while holding a POSIX lock Rule
closely mapped
CERT-C:POS54-C Detect and handle POSIX library errors Rule
closely mapped
CERT-C:PRE00-C Prefer inline or static functions to function-like macros Recommendation
closely mapped
CERT-C:PRE02-C Macro replacement lists should be parenthesized Recommendation
closely mapped
CERT-C:PRE05-C Understand macro replacement when concatenating tokens or performing stringification Recommendation
closely mapped
CERT-C:PRE11-C Do not conclude macro definitions with a semicolon Recommendation
closely mapped
CERT-C:PRE30-C Do not create a universal character name through concatenation Rule
closely mapped
CERT-C:PRE31-C Avoid side effects in arguments to unsafe macros Rule
closely mapped
also related
CERT-C:PRE32-C Do not use preprocessor directives in invocations of function-like macros Rule
closely mapped
CERT-C:SIG00-C Mask signals handled by noninterruptible signal handlers Recommendation
closely mapped
CERT-C:SIG01-C Understand implementation-specific details regarding signal handler persistence Recommendation
closely mapped
CERT-C:SIG02-C Avoid using signals to implement normal functionality Recommendation
closely mapped
CERT-C:SIG30-C Call only asynchronous-safe functions within signal handlers Rule
closely mapped
CERT-C:SIG31-C Do not access shared objects in signal handlers Rule
closely mapped
CERT-C:SIG34-C Do not call signal() from within interruptible signal handlers Rule
closely mapped
CERT-C:SIG35-C Do not return from a computational exception signal handler Rule
closely mapped
CERT-C:STR00-C Represent characters using an appropriate type Recommendation
closely mapped
CERT-C:STR02-C Sanitize data passed to complex subsystems Recommendation
closely mapped
CERT-C:STR03-C Do not inadvertently truncate a string Recommendation
closely mapped
CERT-C:STR04-C Use plain char for characters in the basic character set Recommendation
closely mapped
CERT-C:STR05-C Use pointers to const when referring to string literals Recommendation
closely mapped
CERT-C:STR07-C Use the bounds-checking interfaces for string manipulation Recommendation
closely mapped
CERT-C:STR30-C Do not attempt to modify string literals Rule
also related
CERT-C:STR31-C Guarantee that storage for strings has sufficient space for character data and the null terminator Rule
closely mapped
CERT-C:STR32-C Do not pass a non-null-terminated character sequence to a library function that expects a string Rule
closely mapped
CERT-C:STR34-C Cast characters to unsigned char before converting to larger integer sizes Rule
closely mapped
CERT-C:STR37-C Arguments to character-handling functions must be representable as an unsigned char Rule
closely mapped
CERT-C:STR38-C Do not confuse narrow and wide character strings and functions Rule
closely mapped
CERT-C:WIN00-C Be specific when dynamically loading libraries Recommendation
closely mapped
CERT-C:WIN02-C Restrict privileges when spawning child processes Recommendation
closely mapped
CERT-C:WIN30-C Properly pair allocation and deallocation functions Rule
closely mapped

CERT-CPP: SEI CERT C++ Coding Standard

This table is also available in CSV format: CERT-CPP-mapping-broad.csv.

CERT-CPP CategoryC++ Warning Classes
CERT-CPP:CON50-CPP Do not destroy a mutex while it is locked Rule
closely mapped
CERT-CPP:CON51-CPP Ensure actively held locks are released on exceptional conditions Rule
closely mapped
also related
CERT-CPP:CON52-CPP Prevent data races when accessing bit-fields from multiple threads Rule
closely mapped
CERT-CPP:CON53-CPP Avoid deadlock by locking in a predefined order Rule
closely mapped
CERT-CPP:CON54-CPP Wrap functions that can spuriously wake up in a loop Rule
closely mapped
CERT-CPP:CON55-CPP Preserve thread safety and liveness when using condition variables Rule
closely mapped
CERT-CPP:CON56-CPP Do not speculatively lock a non-recursive mutex that is already owned by the calling thread Rule
closely mapped
CERT-CPP:CTR50-CPP Guarantee that container indices and iterators are within the valid range Rule
closely mapped
CERT-CPP:CTR51-CPP Use valid references, pointers, and iterators to reference elements of a container Rule
closely mapped
CERT-CPP:CTR52-CPP Guarantee that library functions do not overflow Rule
closely mapped
CERT-CPP:CTR53-CPP Use valid iterator ranges Rule
closely mapped
CERT-CPP:CTR54-CPP Do not subtract iterators that do not refer to the same container Rule
closely mapped
CERT-CPP:CTR55-CPP Do not use an additive operator on an iterator if the result would overflow Rule
also related
CERT-CPP:CTR56-CPP Do not use pointer arithmetic on polymorphic objects Rule
closely mapped
CERT-CPP:DCL50-CPP Do not define a C-style variadic function Rule
closely mapped
CERT-CPP:DCL51-CPP Do not declare or define a reserved identifier Rule
closely mapped
CERT-CPP:DCL52-CPP Never qualify a reference type with const or volatile Rule
also related
CERT-CPP:DCL53-CPP Do not write syntactically ambiguous declarations Rule
closely mapped
CERT-CPP:DCL54-CPP Overload allocation and deallocation functions as a pair in the same scope Rule
also related
CERT-CPP:DCL55-CPP Avoid information leakage when passing a class object across a trust boundary Rule
closely mapped
CERT-CPP:DCL56-CPP Avoid cycles during initialization of static objects Rule
closely mapped
CERT-CPP:DCL57-CPP Do not let exceptions escape from destructors or deallocation functions Rule
closely mapped
CERT-CPP:DCL58-CPP Do not modify the standard namespaces Rule
closely mapped
CERT-CPP:DCL59-CPP Do not define an unnamed namespace in a header file Rule
closely mapped
CERT-CPP:DCL60-CPP Obey the one-definition rule Rule
closely mapped
CERT-CPP:ERR50-CPP Do not abruptly terminate the program Rule
closely mapped
CERT-CPP:ERR51-CPP Handle all exceptions Rule
closely mapped
CERT-CPP:ERR52-CPP Do not use setjmp() or longjmp() Rule
closely mapped
CERT-CPP:ERR54-CPP Catch handlers should order their parameter types from most derived to least derived Rule
closely mapped
CERT-CPP:ERR55-CPP Honor exception specifications Rule
closely mapped
CERT-CPP:ERR56-CPP Guarantee exception safety Rule
also related
CERT-CPP:ERR57-CPP Do not leak resources when handling exceptions Rule
closely mapped
CERT-CPP:ERR58-CPP Handle all exceptions thrown before main() begins executing Rule
closely mapped
CERT-CPP:ERR61-CPP Catch exceptions by lvalue reference Rule
closely mapped
CERT-CPP:ERR62-CPP Detect errors when converting a string to a number Rule
closely mapped
CERT-CPP:EXP50-CPP Do not depend on the order of evaluation for side effects Rule
closely mapped
also related
CERT-CPP:EXP51-CPP Do not delete an array through a pointer of the incorrect type Rule
closely mapped
CERT-CPP:EXP52-CPP Do not rely on side effects in unevaluated operands Rule
closely mapped
CERT-CPP:EXP53-CPP Do not read uninitialized memory Rule
closely mapped
also related
CERT-CPP:EXP54-CPP Do not access an object outside of its lifetime Rule
closely mapped
CERT-CPP:EXP55-CPP Do not access a cv-qualified object through a cv-unqualified type Rule
also related
CERT-CPP:EXP57-CPP Do not cast or delete pointers to incomplete classes Rule
closely mapped
CERT-CPP:EXP58-CPP Pass an object of the correct type to va_start Rule
closely mapped
CERT-CPP:EXP59-CPP Use offsetof() on valid types and members Rule
closely mapped
CERT-CPP:EXP62-CPP Do not access the bits of an object representation that are not part of the object's value representation Rule
closely mapped
also related
CERT-CPP:EXP63-CPP Do not rely on the value of a moved-from object Rule
closely mapped
also related
CERT-CPP:FIO50-CPP Do not alternately input and output from a file stream without an intervening positioning call Rule
closely mapped
CERT-CPP:FIO51-CPP Close files when they are no longer needed Rule
closely mapped
CERT-CPP:INT50-CPP Do not cast to an out-of-range enumeration value Rule
closely mapped
CERT-CPP:MEM50-CPP Do not access freed memory Rule
closely mapped
CERT-CPP:MEM51-CPP Properly deallocate dynamically allocated resources Rule
closely mapped
CERT-CPP:MEM52-CPP Detect and handle memory allocation errors Rule
also related
CERT-CPP:MEM53-CPP Explicitly construct and destruct objects when manually managing object lifetime Rule
also related
CERT-CPP:MEM54-CPP Provide placement new with properly aligned pointers to sufficient storage capacity Rule
closely mapped
CERT-CPP:MEM56-CPP Do not store an already-owned pointer value in an unrelated smart pointer Rule
also related
CERT-CPP:MSC50-CPP Do not use std::rand() for generating pseudorandom numbers Rule
closely mapped
CERT-CPP:MSC51-CPP Ensure your random number generator is properly seeded Rule
closely mapped
CERT-CPP:MSC52-CPP Value-returning functions must return a value from all exit paths Rule
closely mapped
also related
CERT-CPP:MSC53-CPP Do not return from a function declared [[noreturn]] Rule
closely mapped
CERT-CPP:OOP50-CPP Do not invoke virtual functions from constructors or destructors Rule
closely mapped
CERT-CPP:OOP51-CPP Do not slice derived objects Rule
closely mapped
CERT-CPP:OOP52-CPP Do not delete a polymorphic object without a virtual destructor Rule
closely mapped
CERT-CPP:OOP53-CPP Write constructor member initializers in the canonical order Rule
closely mapped
CERT-CPP:OOP54-CPP Gracefully handle self-copy assignment Rule
closely mapped
CERT-CPP:OOP55-CPP Do not use pointer-to-member operators to access nonexistent members Rule
closely mapped
CERT-CPP:OOP57-CPP Prefer special member functions and overloaded operators to C Standard Library functions Rule
closely mapped
CERT-CPP:OOP58-CPP Copy operations must not mutate the source object Rule
closely mapped
CERT-CPP:STR50-CPP Guarantee that storage for strings has sufficient space for character data and the null terminator Rule
closely mapped
CERT-CPP:STR51-CPP Do not attempt to create a std::string from a null pointer Rule
closely mapped
CERT-CPP:STR52-CPP Use valid references, pointers, and iterators to reference elements of a basic_string Rule
closely mapped
CERT-CPP:STR53-CPP Range check element access Rule
also related

SEI CERT Oracle Coding Standard for Java

This table is also available in CSV format: CERT-Java-mapping-broad.csv.

CERT-Java CategoryJava Warning Classes
CERT-Java:DCL00-J Prevent class initialization cycles Rule
closely mapped
also related
CERT-Java:DRD00 Do not store sensitive information on external storage (SD card) unless encrypted first Rule
closely mapped
CERT-Java:DRD13 Do not provide addJavascriptInterface method access in a WebView which could contain untrusted content. (API level JELLY_BEAN or below) Rule
closely mapped
CERT-Java:DRD17-J Do not use the Android cryptographic security provider encryption default for AES Rule
closely mapped
CERT-Java:DRD18 Do not use the default behavior in a cryptographic library if it does not use recommended practices Rule
closely mapped
CERT-Java:DRD22 Do not cache sensitive information Rule
closely mapped
CERT-Java:ENV01-J Place all security-sensitive code in a single JAR and sign and seal it Rule
closely mapped
CERT-Java:ENV03-J Do not grant dangerous combinations of permissions Rule
closely mapped
CERT-Java:ENV06-J Production code must not contain debugging entry points Rule
closely mapped
CERT-Java:ERR00-J Do not suppress or ignore checked exceptions Rule
closely mapped
CERT-Java:ERR02-J Prevent exceptions while logging data Rule
closely mapped
CERT-Java:ERR07-J Do not throw RuntimeException, Exception, or Throwable Rule
closely mapped
CERT-Java:ERR08-J Do not catch NullPointerException or any of its ancestors Rule
closely mapped
CERT-Java:ERR09-J Do not allow untrusted code to terminate the JVM Rule
closely mapped
CERT-Java:EXP00-J Do not ignore values returned by methods Rule
closely mapped
CERT-Java:EXP01-J Do not use a null in a case where an object is required Rule
closely mapped
CERT-Java:EXP02-J Do not use the Object.equals() method to compare two arrays Rule
closely mapped
CERT-Java:EXP03-J Do not use the equality operators when comparing values of boxed primitives Rule
closely mapped
CERT-Java:EXP06-J Expressions used in assertions must not produce side effects Rule
closely mapped
CERT-Java:FIO01-J Create files with appropriate access permissions Rule
closely mapped
CERT-Java:FIO02-J Detect and handle file-related errors Rule
closely mapped
CERT-Java:FIO04-J Release resources when they are no longer needed Rule
closely mapped
CERT-Java:IDS00-J Prevent SQL injection Rule
closely mapped
CERT-Java:IDS03-J Do not log unsanitized user input Rule
closely mapped
CERT-Java:IDS07-J Sanitize untrusted data passed to the Runtime.exec() method Rule
closely mapped
CERT-Java:IDS08-J Sanitize untrusted data included in a regular expression Rule
closely mapped
CERT-Java:IDS14-J Do not trust the contents of hidden form fields Rule
closely mapped
CERT-Java:LCK00-J Use private final lock objects to synchronize classes that may interact with untrusted code Rule
closely mapped
CERT-Java:LCK05-J Synchronize access to static fields that can be modified by untrusted code Rule
closely mapped
CERT-Java:LCK09-J Do not perform operations that can block while holding a lock Rule
closely mapped
CERT-Java:LCK10-J Use a correct form of the double-checked locking idiom Rule
closely mapped
CERT-Java:MET08-J Preserve the equality contract when overriding the equals() method Rule
closely mapped
CERT-Java:MET09-J Classes that define an equals() method must also define a hashCode() method Rule
closely mapped
CERT-Java:MET53-J Ensure that the clone() method calls super.clone() Recommendation
closely mapped
CERT-Java:MSC02-J Generate strong random numbers Rule
closely mapped
CERT-Java:MSC03-J Never hard code sensitive information Rule
closely mapped
CERT-Java:MSC05-J Do not exhaust heap space Rule
closely mapped
CERT-Java:NUM00-J Detect or prevent integer overflow Rule
closely mapped
CERT-Java:NUM12-J Ensure conversions of numeric types to narrower types do not result in lost or misinterpreted data Rule
closely mapped
CERT-Java:NUM13-J Avoid loss of precision when converting primitive integers to floating-point Rule
closely mapped
CERT-Java:OBJ07-J Sensitive classes must not let themselves be copied Rule
closely mapped
CERT-Java:OBJ08-J Do not expose private members of an outer class from within a nested class Rule
closely mapped
CERT-Java:SEC01-J Do not allow tainted variables in privileged blocks Rule
closely mapped
CERT-Java:SEC05-J Do not use reflection to increase accessibility of classes, methods, or fields Rule
closely mapped
CERT-Java:SEC06-J Do not rely on the default automatic signature verification provided by URLClassLoader and java.util.jar Rule
closely mapped
CERT-Java:SER00-J Enable serialization compatibility during class evolution Rule
closely mapped
CERT-Java:SER01-J Do not deviate from the proper signatures of serialization methods Rule
closely mapped
CERT-Java:SER02-J Sign then seal objects before sending them outside a trust boundary Rule
closely mapped
CERT-Java:SER03-J Do not serialize unencrypted sensitive data Rule
closely mapped
CERT-Java:SER06-J Make defensive copies of private mutable components during deserialization Rule
closely mapped
CERT-Java:SER07-J Do not use the default serialized form for classes with implementation-defined invariants Rule
closely mapped
CERT-Java:SER10-J Avoid memory and resource leaks during serialization Rule
closely mapped
CERT-Java:SER12-J Prevent deserialization of untrusted data Rule
closely mapped
CERT-Java:THI00-J Do not invoke Thread.run() Rule
closely mapped
CERT-Java:VNA00-J Ensure visibility when accessing shared primitive variables Rule
closely mapped
CERT-Java:VNA03-J Do not assume that a group of calls to independently atomic methods is atomic Rule
closely mapped