COMMON WEAKNESS ENUMERATIONIncomplete

CWE-1116

Inaccurate Source Code Comments

The source code contains comments that do not accurately describe or explain aspects of the portion of the code with which the comment is associated.

Soyutlama

Base

Yapı

Simple

Sömürü İhtimali

Medium

Problemi anla

Problem nedir?

The source code contains comments that do not accurately describe or explain aspects of the portion of the code with which the comment is associated.

Kök neden

Problem nasıl ve ne zaman oluşur?

Yaşam döngüsü evresi

Implementation

Risk

Başarılı sömürü neye yol açar?

Reduce Maintainability

Etkilenen güvenlik alanları: Other

This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
Increase Analytical Complexity

Etkilenen güvenlik alanları: Other

When a comment does not accurately reflect the associated code elements, this can introduce confusion to a reviewer (due to inconsistencies) or make it more difficult and less efficient to validate that the code is implementing the intended behavior correctly.

Savunma

Nasıl önlenir ve çözülür?

Implementation

Uygulama aşaması savunması

Detay
Verify that each comment accurately reflects what is intended to happen during execution of the code.

Doğrulama

Nasıl tespit edilir?

Manual Static Analysis

Moderate
Compare the comments to the actual code itself to ensure the comment is consistent with the code. If an inconsistency exists, consult available documentation for developers of the product (design, libraries, APIs, etc.) Note that documentation might be stored in different places than the code repository.