Difference between revisions of "Poor Logging Practice"

From OWASP
Jump to: navigation, search
(Abstract)
Line 1: Line 1:
{{Template:Vulnerability}}
 
 
{{Template:Fortify}}
 
{{Template:Fortify}}
 +
{{Template:Vulnerability}}
  
==Abstract==
+
[[Category:FIXME|This is the text from the old template. This needs to be rewritten using the new template.]]
 +
 
 +
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
 +
 
 +
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 +
 
 +
[[ASDR Table of Contents]]
 +
__TOC__
  
Loggers should be declared to be static and final.
 
  
 
==Description==
 
==Description==
 +
 +
Loggers should be declared to be static and final.
  
 
It is good programming practice to share a single logger object between all of the instances of a particular class and to use the same logger for the duration of the program.
 
It is good programming practice to share a single logger object between all of the instances of a particular class and to use the same logger for the duration of the program.
  
==Examples ==
+
 
 +
==Risk Factors==
 +
 
 +
TBD
 +
 
 +
==Examples==
  
 
The following statement errantly declares a non-static logger.
 
The following statement errantly declares a non-static logger.
Line 19: Line 32:
 
</pre>
 
</pre>
  
==Related Threats==
 
  
==Related Attacks==
+
==Related [[Attacks]]==
  
==Related Vulnerabilities==
+
* [[Attack 1]]
 +
* [[Attack 2]]
  
==Related Countermeasures==
 
  
==Categories==
+
==Related [[Vulnerabilities]]==
  
[[Category:Code Quality Vulnerability]]
+
* [[Vulnerability 1]]
 +
* [[Vulnerabiltiy 2]]
  
[[Category:Java]]
+
==Related [[Controls]]==
  
[[Category:Implementation]]
+
* [[Control 1]]
 +
* [[Control 2]]
  
[[Category:Code Snippet]]
 
  
 +
==Related [[Technical Impacts]]==
 +
 +
* [[Technical Impact 1]]
 +
* [[Technical Impact 2]]
 +
 +
 +
==References==
 +
Note: A reference to related [http://cwe.mitre.org/ CWE] or [http://capec.mitre.org/ CAPEC] article should be added when exists. Eg:
 +
 +
* [http://cwe.mitre.org/data/definitions/79.html CWE 79].
 +
* http://www.link1.com
 +
* [http://www.link2.com Title for the link2]
 +
 +
[[Category:FIXME|add links
 +
 +
In addition, one should classify vulnerability based on the following subcategories: Ex:<nowiki>[[Category:Error Handling Vulnerability]]</nowiki>
 +
 +
Availability Vulnerability
 +
 +
Authorization Vulnerability
 +
 +
Authentication Vulnerability
 +
 +
Concurrency Vulnerability
 +
 +
Configuration Vulnerability
 +
 +
Cryptographic Vulnerability
 +
 +
Encoding Vulnerability
 +
 +
Error Handling Vulnerability
 +
 +
Input Validation Vulnerability
 +
 +
Logging and Auditing Vulnerability
 +
 +
Session Management Vulnerability]]
 +
 +
__NOTOC__
 +
 +
 +
[[Category:OWASP ASDR Project]]
 +
[[Category:Code Quality Vulnerability]]
 +
[[Category:Java]]
 +
[[Category:Implementation]]
 +
[[Category:Code Snippet]]
 
[[Category:Logging and Auditting Vulnerability]]
 
[[Category:Logging and Auditting Vulnerability]]

Revision as of 07:34, 30 September 2008

This article includes content generously donated to OWASP by Fortify.JPG.

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.

Last revision (mm/dd/yy): 09/30/2008

Vulnerabilities Table of Contents

ASDR Table of Contents

Contents


Description

Loggers should be declared to be static and final.

It is good programming practice to share a single logger object between all of the instances of a particular class and to use the same logger for the duration of the program.


Risk Factors

TBD

Examples

The following statement errantly declares a non-static logger.

	private final Logger logger =     
				Logger.getLogger(MyClass.class);


Related Attacks


Related Vulnerabilities

Related Controls


Related Technical Impacts


References

Note: A reference to related CWE or CAPEC article should be added when exists. Eg: