rspec/rules/S1313/scala/rule.adoc
2020-06-30 17:16:12 +02:00

24 lines
408 B
Plaintext

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
----
val ip = "192.168.12.42" // Sensitive
val socket = new Socket(ip, 6667)
----
== Compliant Solution
----
val ips = Source.fromFile(configuration_file).getLines.toList // Compliant
val socket = new Socket(ips(0), 6667)
----
include::../exceptions.adoc[]
include::../see.adoc[]