Difference between revisions of "Poor Logging Practice"
From OWASP
Weilin Zhong (talk | contribs) (→Abstract) |
|||
| Line 1: | Line 1: | ||
| + | {{Template:Fortify}} | ||
{{Template:Vulnerability}} | {{Template:Vulnerability}} | ||
| − | |||
| − | + | [[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__ | ||
| − | |||
==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 Attacks== | + | ==Related [[Attacks]]== |
| + | |||
| + | * [[Attack 1]] | ||
| + | * [[Attack 2]] | ||
| + | |||
| + | |||
| + | ==Related [[Vulnerabilities]]== | ||
| + | |||
| + | * [[Vulnerability 1]] | ||
| + | * [[Vulnerabiltiy 2]] | ||
| + | |||
| + | ==Related [[Controls]]== | ||
| − | + | * [[Control 1]] | |
| + | * [[Control 2]] | ||
| − | |||
| − | == | + | ==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:Code Quality Vulnerability]] | ||
| − | |||
[[Category:Java]] | [[Category:Java]] | ||
| − | |||
[[Category:Implementation]] | [[Category:Implementation]] | ||
| − | |||
[[Category:Code Snippet]] | [[Category:Code Snippet]] | ||
| − | |||
[[Category:Logging and Auditting Vulnerability]] | [[Category:Logging and Auditting Vulnerability]] | ||
Revision as of 12:34, 30 September 2008
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
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: