Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Each guideline in the CERT C Secure Coding Standard contains a Risk Assessment section that risk assessment section that attempts to provide software developers with an indication of the potential consequences of not addressing a particular vulnerability rule or recommendation in their code (along with some indication of expected remediation costs). This information may be used to prioritize the repair of vulnerability classes rule violations by a development team. The metric is designed primarily for remediation projects. It is generally assumed that new code will be developed to be compliant with all applicable guidelinesthe entire coding standard and applicable recommendations.

Priority and Levels

Each rule and recommendation has an assigned Priority priority. Priorities are assigned using a metric based on Failure Mode, Effects, and Criticality Analysis (FMECA) [IEC 60812]. Three values are assigned for each rule on a scale of 1 to 3 for severity, likelihood, and remediation cost.

...

The three values are then multiplied together for each rule. This product provides a measure that can be used in prioritizing the application of the rules. The products range from 1 to 27, although only the following 10 distinct values are possible: 1, 2, 3, 4, 6, 8, 9, 12, 18, and 27. Rules and recommendations with a priority in the range of 1 to 4 are Level 3 rules, 6 to 9 are Level 2, and 12 to 27 are Level 1. The following are possible interpretations of the priorities and levels.

  • Priorities and Levels

    Level

    Priorities

    Possible Interpretation

    L1

    12, 18, 27

    High severity, likely, inexpensive to repair

    L2

    6, 8, 9

    Medium severity, probable, medium cost to repair

    L3

    1, 2, 3, 4

    Low severity, unlikely, expensive to repair

As a result, it is possible to claim Level 1, Level 2, or complete compliance (Level 3) with a standard Specific projects may begin remediation by implementing all rules in at a particular level before proceeding to the lower priority rules, as shown in the following illustration:

...

Recommendations are not compulsory and are provided for information purposes only.

The metric is designed primarily for remediation projects. It is assumed that new development efforts will conform with the entire standard.

Automated Detection

Automated Detection

Both rules and recommendations frequently have sections that describe automated detection. These sections provide additional information on analyzers Where applicable, guidelines provide information on analyzer tools that can automatically diagnose violations of secure coding guidelines. Most automated analyses for the C programming language are neither sound nor complete, so the inclusion of a tool in this section typically means that the tool can diagnose some violations of this particular rule. Currently, there is no conformance test suite available that Although the Secure Coding Validation Suite can be used to access the false-positive and false-negative rates of analyzers when checking conformance for a particular guideline against source code (although CERT has announced it will coordinate the development of a freely available, open source–licensed conformance test).Because of the lack of an existing conformance test, the information in these test the ability of analyzers to diagnose violations of rules from ISO/IEC TS 19761, no currently available conformance test suite can assess the ability of analyzers to diagnose violations of the rules in this wiki. Consequently, the information in automated detection sections may be

  • Provided by the vendors
  • Determined by CERT by informally evaluating the analyzer
  • Determined by CERT by reviewing the vendor documentation

Additionally, because tools and the CERT C Secure Coding Standard wiki both evolve continuously, this information can become dated and obsolete. Where possible, we try to reference the exact version of the tool for which the results were obtained. Because these tools evolve continuously, this information can rapidly become dated and obsolete.

Related Vulnerabilities

The risk analysis section sections also contains contain a link to search for related vulnerabilities on the CERT website. Whenever possible, CERT Vulnerability Notes are tagged with a keyword corresponding to the unique ID of the coding guideline. This search provides you with an up-to-date list of real-world vulnerabilities that have been determined to be at least partially caused by a violation of this specific guideline. These vulnerabilities are labeled as such only when the vulnerability analysis team at the CERT/CC is able to evaluate the source code and precisely determine the cause of the vulnerability. Because many vulnerability notes refer to vulnerabilities in closed-source software systems, it is not always possible to provide this additional analysis. Consequently, the related vulnerabilities field tends to be somewhat sparsely populated.

...