Constant variable names cc4m_logo_inline

TitleAvoid constant variable names as: username, loginname, password etc.
Severity level3
DescriptionAvoid the use of contant variable names as: username, loginname, password, credentials etc, instead obtain these via a user input action or read them from a (secured) file.
RationaleFor security reasons, it is discouraged to use hard-coded username and or password since this way they can be easily shared with others accidentally.


username = 'myName';
password = 'myPassword';

Instead use:

% Ask the user to provide a username and password, for example using a dialog:
[username, password] = showLoginDialog();

Note: This is just one example of how to obtain credentials without hardcoding them. Ask your IT department for the available options.