![github-actions[bot]](/assets/img/avatar_default.png)
* 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>
14 lines
329 B
Plaintext
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}"))
|
|
----
|