-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: CWE-555 Query to detect plaintext credentials in Java properties files #5538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java: CWE-555 Query to detect plaintext credentials in Java properties files #5538
Conversation
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.qhelp
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.qhelp
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.qhelp
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.qhelp
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/test/experimental/query-tests/security/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
java/ql/test/experimental/query-tests/security/CWE-555/messages.properties
Show resolved
Hide resolved
77aa8a2
to
5ce3f9d
Compare
dac7b5b
to
1349bf7
Compare
java/ql/src/experimental/semmle/code/java/frameworks/CredentialsInPropertiesFile.qll
Show resolved
Hide resolved
java/ql/src/experimental/semmle/code/java/frameworks/CredentialsInPropertiesFile.qll
Show resolved
Hide resolved
java/ql/src/experimental/semmle/code/java/frameworks/CredentialsInPropertiesFile.qll
Outdated
Show resolved
Hide resolved
java/ql/src/experimental/semmle/code/java/frameworks/CredentialsInPropertiesFile.qll
Outdated
Show resolved
Hide resolved
It's up to you. I'm happy to merge the simple version of this as basically useful, if too simple for the bounty program. |
OK, I will make the changes since it will be merged into main and I still believe it's a useful query. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I believe some of the Spring additions are no longer required?
java/ql/test/experimental/query-tests/security/CWE-555/CredentialsInPropertiesFile.ql
Outdated
Show resolved
Hide resolved
I've removed unused Java programs since the query only checks properties files now. |
It's a very common issue that credentials are stored in plaintext in application’s properties files. Common credentials include but are not limited to LDAP, mail, database, proxy account, and so on. Credentials management issues occur with such a configuration. Storing plaintext credentials in a properties file allows anyone who can read the file access to the protected resource. Good credentials management guidelines require that credentials never be stored in plaintext.
This query detects plaintext credentials stored in Java properties files by checking common patterns of confidential credentials used in Java applications.
Please consider to merge the PR. Thanks.