github-actions[bot] 65ec930f11
Create rule S6910 (#3610)
* Create rule S6910

* Added description and metadata

---------

Co-authored-by: daniel-teuchert-sonarsource <daniel-teuchert-sonarsource@users.noreply.github.com>
Co-authored-by: Daniel Teuchert <daniel.teuchert@sonarsource.com>
Co-authored-by: daniel-teuchert-sonarsource <141642369+daniel-teuchert-sonarsource@users.noreply.github.com>
2024-02-08 11:31:38 +01:00

14 lines
329 B
Plaintext

==== Noncompliant code example
[source,java,diff-id=1,diff-type=noncompliant,subs="attributes"]
----
props.set("{example_name}", "{example_secret}") // Noncompliant
----
==== Compliant solution
[source,java,diff-id=1,diff-type=compliant,subs="attributes"]
----
props.set("{example_name}", System.getenv("{example_env}"))
----