I do not have visibility to the internals, but it appears that as part of the 'Structural Analyzer', the Fortify tool searches for text that may indicate that there is a password stored. It cannot tell if there is a password hard coded, but, based on a conversation with an HP Fortify consultant, Fortify leans toward flagging an issue if at all in doubt, allowing the person(s) remediating the audit information to determine if it is a vulnerability or not.
The following text example trigger a line of of code to be flagged my code base.
- Password
- password
- Passwd
- passwd
There are a couple of ways to remediate the issue and the correct one for your organization may depend on the work effort:
- Mark the flagged issue as 'Not an Issue', indicating that this is a variable/control name and that a password is not hard coded in the code.
- Rename the variable/control name to something that would not be flagged - txtPwd may be an option in this case.