rspec/rules/S5332/apex/rule.adoc

50 lines
811 B
Plaintext
Raw Normal View History

2020-06-30 12:50:28 +02:00
include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
[source,apex]
2020-06-30 12:50:28 +02:00
----
public class MyClient {
public void SendRequest(){
HttpRequest req = new HttpRequest();
req.setEndpoint('http://example.com'); // Sensitive
// ...
}
}
----
== Compliant Solution
2022-02-04 17:28:24 +01:00
[source,apex]
2020-06-30 12:50:28 +02:00
----
public class MyClient {
public void SendRequest(){
HttpRequest req = new HttpRequest();
req.setEndpoint('https://example.com');
2020-06-30 12:50:28 +02:00
// ...
}
}
----
include::../exceptions.adoc[]
include::../see.adoc[]
2020-06-30 12:50:28 +02:00
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace this http request with an https equivalent.
endif::env-github,rspecator-view[]