Software systems can be validated as conforming to the CERT Oracle Secure Coding Standard for Java. Source code analysis tools, including compilers and static analysis tools, can be certified as able to validate source code as conforming to this coding standard.
Normative
...
versus Nonnormative Text
Portions of this coding standard are intended to be normative and ; other portions are intended as good advice. The normative statements in these guideline rules are the requirements for conformance with the standard. Normative statements use imperative language , for example, "such as must, " " shall, " and "require." etc. Normative portions of each guideline rule must be analyzable, although automated analysis is infeasible for some guidelinesrules and is not required.
The non-normative nonnormative portions of a guideline are those where we rule describe good practice practices or useful advice. Non-normative Nonnormative statements do not establish conformance requirements. Non-normative Nonnormative statements use verbs such as "should," or and phrases such as "we recommend" or "Good practice is to...". Non-normative portions of guidelines is recommended or is good practice. Nonnormative portions of rules may be inappropriate for automated checking , because they such checking would likely report excessive false positives when applied to existing code. Automated checkers for these non-normative nonnormative portions might be useful when analyzing " new " code which has specifically code (that is, code that has been developed to this coding standard).
The vast majority of guidelines All of the rules in this standard have a normative component. Non-normative portions exist Nonnormative recommendations are provided only when:
- there is well-known good practice to follow.
...
- the rule describes an approach that, if universally followed, would
...
- avoid violations where the normative part of the
...
- rule applies
...
- and would also be harmless when applied to code
...
- in which the normative part of the
...
- rule is inapplicable.
Although uncommon, some guidelines that are entirely non-normative. The following guidelines, for example, are entirely non-normative:
...
Entirely nonnormative guidelines are excluded from this coding standard, but the authors of this book plan a follow-on effort to publish these guidelines.
Source Code Conformance
Conformance to The CERT Oracle Secure Coding Standard for Java can be used as as a security indicator or metric. While Although conformance does not guarantee the absence of vulnerabilities (for example, vulnerabilities resulting from design flaws), it does guarantee the absence of coding errors that are commonly found to be the root causes of vulnerabilities.
The easiest way to validate code as conforming to The CERT Oracle Secure Coding standard Standard for Java is to use a validated source code analysis tool.
Levels
Guidelines in this standard are classified into three levels (see Rule: Priority and Levels). Emphasis should be placed on conformance Level 1 (L1) guidelines. Software systems that have been are validated as complying with all Level 1 guidelines are considered to be L1 Conformingconforming. Software systems can be assessed as L1, L2, or fully conforming depending on the set of guideline guidelines to which the system has been is validated.
Deviation Procedure
Strict adherence to all guidelines is unlikely. Consequently, deviations associated with individual situations are permissible.
...
To claim compliance with this standard, software developers must be able to produce on request documentation as to which systematic and specific deviations have been permitted during development.
Third-Party Libraries
Static analysis tools such as FindBugs! that analyze Java bytecode can frequently discover violations of this secure coding standard in third-party libraries as well as in custom code. Violations of secure coding rules in third-party libraries are treated in the same manner is if they appeared in custom code.
Unfortunately, programmers are not always in a position to modify third-party library code or perhaps even to convince the vendor to modify the code. Consequently, the system cannot pass conformance testing unless the problem is eliminated (possibly by replacing the library with another library or custom-developed code) or by documenting a deviation. The deviation procedure for third-party library code is also the same as for the custom code; that is, the developer must show that the violation does not cause a vulnerability. However, the economics may be different. For custom code, it may be more economic to repair the problem, whereas for third-party libraries, it might be easier to document a deviation.