Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: editorial change

Children Display

This standard provides rules for secure coding in the C++ programming language. The goal of these rules is to develop safe, reliable, and secure systems, for example by eliminating undefined behaviors that can lead to undefined program behaviors and exploitable vulnerabilities. Conformance to the coding rules defined in this standard are necessary (but not sufficient) to ensure the safety, reliability, and security of software systems developed in the C++ programming language. It is also necessary, for example, to have a safe and secure design. Safety-critical systems typically have stricter requirements than are imposed by this coding standard, for example requiring that all memory be statically allocated. However, the application of this coding standard will result in high-quality systems that are reliable, robust, and resistant to attack.

Each rule consists of a title, a description, noncompliant code examples, and compliant solutions, as well as other information as described in How this Coding Standard Is Organized. The title is a concise, but sometimes imprecise, description of the rule. The description specifies the normative requirements of the rule. The noncompliant code examples are examples of code that would constitute a violation of the rule. The accompanying compliant solutions demonstrate equivalent code that does not violate the rule or any other rules in this coding standard.

A well-documented and enforceable coding standard is an essential element of coding in the C++ programming languageAn essential element of secure coding in the C++ programming language is well-documented and enforceable coding standards. Coding standards encourage programmers to follow a uniform set of rules and guidelines determined by the requirements of the project and organization , rather than by the programmer's familiarity or preferenceprogrammers’ individual preferences. Once established, these standards can be used as a metric to evaluate source code (using manual or automated processes).

The CERT C++ Secure Coding Standard provides rules and recommendations for secure coding in the C++ programming language. The goal of these rules and recommendations is to eliminate insecure coding practices and undefined behaviors that can lead to exploitable vulnerabilities. The application of the secure coding standard will lead to higher-quality systems that are robust and more resistant to attack.

Scope

Rules Versus Recommendations

Development Process

Usage

System Qualities

Vulnerability Metric

Priority and Levels

Automatically Generated Code

Compliance

This wiki contains ongoing updates of the standard between official published releases. If you are interested in contributing to these rules, create an account on the wiki and then request contributor privileges by sending a request to info@sei.cmu.edu.

The Secure Coding eNewsletter contains news from the CERT Secure Coding Initiative as well as summaries of recent updates to the standard rules. If you are interested in receiving updates directly, subscribe to the eNewsletter through our website or send a request to info@sei.cmu.edu

 CERT C++ Secure Coding Standard      CERT C++ Secure Coding Standard      Image Removed