Variable Assignment Syntax Medium

Adding spaces around the equals sign in variable assignments can cause the shell to misinterpret the assignment as a command execution, leading to unexpected behavior or errors. To avoid this issue, always write variable assignments without spaces around the equals sign, such as 'variable=value' instead of 'variable = value'.

Detector ID
shell/variable-assignment-syntax@v1.0
Category
Common Weakness Enumeration (CWE) external icon
-
Tags
-