Skip to content
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

False positive in java.lang.security.system.system-setproperty-hardcoded-secret #3312

Open
Sjord opened this issue Feb 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Sjord
Copy link
Contributor

Sjord commented Feb 23, 2024

class HelloWorld {
    public static void main(String[] args) {
        System.setProperty("javax.net.ssl.trustStorePassword", environment.getProperty("truststorePassword"));
    }
}
    Hello.java
    ...java.lang.security.system.system-setproperty-hardcoded-
       secret.java.lang.security.system.system-setproperty-hardcoded-secret.system-setproperty-hardcoded-secret   
          A secret is hard-coded in the application. Secrets stored in source code, such as credentials,  
          identifiers, and other types of sensitive data, can be leaked and used by internal or external  
          malicious actors. Use environment variables to securely provide credentials and other secrets or
          retrieve them from a secure vault or Hardware Security Module (HSM).                            
          Details: https://sg.run/KAzn                                                                    
                                                                                                          
            3? System.setProperty("javax.net.ssl.trustStorePassword",
               environment.getProperty("truststorePassword"));
@Sjord Sjord added the bug Something isn't working label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant