1259
The following excerpt demonstrates the use of a suspicious comment in an incomplete code block
that may have security repercussions.
Example Language: Java (Bad)
if (user == null) {
// TODO: Handle null user condition.
}
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 884 CWE Cross-section 884 2567
MemberOf 963 SFP Secondary Cluster: Exposed Data 888 2400
MemberOf 1412 Comprehensive Categorization: Poor Coding Practices 1400 2538
CWE-547: Use of Hard-coded, Security-relevant Constants
Weakness ID : 547
Structure : Simple
Abstraction : Base
Description
The product uses hard-coded constants instead of symbolic names for security-critical values,
which increases the likelihood of mistakes during code maintenance or security policy change.
Extended Description
If the developer does not find all occurrences of the hard-coded constants, an incorrect policy
decision may be made if one of the constants is not changed. Making changes to these values will
require code changes that may be difficult or impossible once the system is released to the field. In
addition, these hard-coded values may become available to attackers if the code is ever disclosed.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 1078 Inappropriate Source Code Style or Formatting 1918
Relevant to the view "Software Development" (CWE-699)
Nature Type ID Name Page
MemberOf 1006 Bad Coding Practices 2422
Weakness Ordinalities
Indirect :
Common Consequences
Scope Impact Likelihood
Other Varies by Context
Quality Degradation
CWE Version 4.14
CWE-547: Use of Hard-coded, Security-relevant Constants
CWE-547: Use of Hard-coded, Security-relevant Constants