CWE-546 可疑注释

admin 2021年12月4日16:21:28评论73 views字数 1104阅读3分40秒阅读模式

CWE-546 可疑注释

Suspicious Comment

结构: Simple

Abstraction: Variant

状态: Draft

被利用可能性: unkown

基本描述

The code contains comments that suggest the presence of bugs, incomplete functionality, or weaknesses.

扩展描述

Many suspicious comments, such as BUG, HACK, FIXME, LATER, LATER2, TODO, in the code indicate missing security functionality and checking. Others indicate code problems that programmers should fix, such as hard-coded variables, error handling, not using stored procedures, and performance issues.

相关缺陷

  • cwe_Nature: ChildOf cwe_CWE_ID: 1078 cwe_View_ID: 1000 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 1078 cwe_View_ID: 699 cwe_Ordinal: Primary

常见的影响

范围 影响 注释
Other Quality Degradation Suspicious comments could be an indication that there are problems in the source code that may need to be fixed and is an indication of poor quality. This could lead to further bugs and the introduction of weaknesses.

可能的缓解方案

Documentation

策略:

Remove comments that suggest the presence of bugs, incomplete functionality, or weaknesses, before deploying the application.

示例代码

The following excerpt demonstrates the use of a suspicious comment in an incomplete code block that may have security repercussions.

bad Java

if (user == null) {


// TODO: Handle null user condition.

}

文章来源于互联网:scap中文网

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年12月4日16:21:28
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-546 可疑注释https://cn-sec.com/archives/613398.html

发表评论

匿名网友 填写信息