tsaekao / verademo-java

The Veracode demo application. A simple Java Web App built using Spring MVC.
0 stars 0 forks source link

Use of Hard-coded Password [VID:259:com/veracode/verademo/utils/Constants.java:13] #45

Open github-actions[bot] opened 4 months ago

github-actions[bot] commented 4 months ago

https://github.com/tsaekao/verademo-java/blob/fbaf0f988376f5784b81e8e34bba1cf663edb179/com/veracode/verademo/utils/Constants.java#L8-L18

Filename: com/veracode/verademo/utils/Constants.java

Line: 13

CWE: 259 (Use of Hard-coded Password)

This variable assignment uses a hard-coded password that may compromise system security in a way that cannot be easily remedied. The use of a hard-coded password significantly increases the possibility that the account being protected will be compromised. Moreover, the password cannot be changed without patching the software. If a hard-coded password is compromised in a commercial product, all deployed instances may be vulnerable to attack. In some cases, this finding may indicate a reference to a password (e.g. the name of a key in a properties file) rather than an actual password. JDBC_PASSWORD Store passwords out-of-band from the application code. Follow best practices for protecting credentials stored in locations such as configuration or properties files. An HSM may be appropriate for particularly sensitive credentials. References: CWE