Callable with Insufficient Behavioral Summary

Incomplete Base
Structure: Simple
Description

This weakness occurs when a function, method, or API lacks clear documentation about its behavior. The signature or comments fail to properly explain what inputs it expects, what outputs it returns, what side effects it causes, or what assumptions it makes.

Extended Description

When a callable's behavior isn't clearly summarized, developers using it must spend extra time reading source code, making educated guesses, or running tests to understand it. This slows down development, increases the chance of misuse, and makes code reviews less effective because the intended contract is ambiguous. Over time, this ambiguity directly undermines security. It becomes harder to spot vulnerabilities during maintenance or audits because the code's purpose is unclear. Furthermore, when making changes, developers might inadvertently violate hidden assumptions, introducing bugs or security flaws that could have been prevented with proper documentation.

Common Consequences 1
Scope: Other

Impact: Reduce Maintainability

References 1
Providing a Framework for Effective Software Quality Assessment
Robert A. Martin and Lawrence H. Shafer
07-1996
ID: REF-963