CERT coding standards consist of rules and recommendations. Rules are meant to provide normative requirements for code; recommendations are meant to provide guidance that, when followed, should improve the safety, reliability, and security of software systems. However, a violation of a recommendation does not necessarily indicate the presence of a defect in the code. Rules and recommendations are collectively referred to as guidelines.

NOTE: The CERT C++ Coding Standard does not currently expose any recommendations; all C++ recommendations have been removed pending further review and development.

Rules

Rules must meet the following criteria:

  1. Violation of the guideline is likely to result in a defect that may adversely affect the safety, reliability, or security of a system, for example, by introducing a security flaw that may result in an exploitable vulnerability.
  2. The guideline does not rely on source code annotations or assumptions.
  3. Conformance to the guideline can be determined through automated analysis (either static or dynamic), formal methods, or manual inspection techniques.

Recommendations

Recommendations are suggestions for improving code quality. Guidelines are defined to be recommendations when all of the following conditions are met:

  1. Application of a guideline is likely to improve the safety, reliability, or security of software systems.
  2. One or more of the requirements necessary for a guideline to be considered a rule cannot be met.

The set of recommendations that a particular development effort adopts depends on the requirements of the final software product. Projects with stricter requirements may decide to dedicate more resources to ensuring the safety, reliability, and security of a system and consequently are likely to adopt a broader set of recommendations.


 

  • No labels

6 Comments

  1. Rules are identified by the label rule.

    While true, the labels will not be carried over into the book.

    1. Good point; perhaps we can have Sandy and Barbara remove that from the Book copy, but leave it in the wiki?

  2. Is this page still useful given that the recs are so well hidden now?

    1. I would say yes, because:
      * Rules vs. Recommendations are still valid in the other standards, including CERT C, which this standard references heavily.
      * We *do* hope to add recommendations back one day... :)

      1. I would argue no, because:

        • This is the C++ space and there are no public C++ recommendations.
        • Talking about something that used to be public but no longer is can cause user confusion (I was fielding questions on Twitter about where the C++ recs went to and this page was mentioned).
        • We can resurrect this page on the day we get the C++ recommendations back.

        1. Aaron,

          Thanks for your input.

          I think we should keep the page for the reasons that Dave says.  The compromise we decided on some time ago was the disclaimer at the bottom that informs readers that there are no current C++ recommendations.  We put it there so that the general explanation of rules and recommendations came before the specific application in this standard.

          If there is still confusion, we can move the statement to the top of the page as a note.  But, I think the information is still valuable given that we still have the notion of rules and recommendations in our standards on the wiki.