Java Coding Guidelines provides 75 guidelines that help Java programmers develop systems that are reliable and secure. It is written by the authors of The CERT® Oracle® Secure Coding Standard for Java [Long 2011]. That coding standard provides a set of rules for secure coding in the Java programming language. The goal of those rules is to eliminate insecure coding practices that can lead to exploitable vulnerabilities. The Secure Coding Standard is Standard establishes normative requirements for software systems. These software systems can then be evaluated for conformance to the coding standard, for example, by using the Source Code Analysis Laboratory (SCALEe) [Seacord 2013]. However, there are poor Java coding practices that, although they do not warrant inclusion in a secure coding standard for Java, can lead to unreliable or insecure programs. This book serves to document and warn against such coding practices.
Although not included in the The CERT® Oracle® Secure Coding Standard for Java, these guidelines should not be considered less important. Guidelines must be excluded from a coding standard when it is not possible to form a normative requirement. There are many reasons why a normative requirement cannot be formed. Perhaps the most common is that the rule depends on programmer intent. These Such rules cannot be automatically enforced, unless it is possible for the programmer's intent can to be specified, in which case, a rule could require consistency between the code and the specified intent. Forming a normative requirement also requires that a violation of that requirement represent a defect in the code. Guidelines have been excluded from the coding standard (but included in this book) in cases where compliance with the guideline is always a good idea, but violating the guideline does not always result in an error. This is because you cannot reject a system for nonconformance cannot be cited for non-conformance without a specific defect. This requires that coding rules be every very narrowly defined. Frequently, coding guidelines can have a more far more -reaching impact on security and reliability just because they can be more broadly defined.
...