rspec/rules/S1313/java/rule.adoc

24 lines
395 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
----
String ip = "192.168.12.42"; // Sensitive
Socket socket = new Socket(ip, 6667);
----
== Compliant Solution
----
String ip = System.getenv("IP_ADDRESS"); // Compliant
Socket socket = new Socket(ip, 6667);
----
include::../exceptions.adoc[]
include::../see.adoc[]