Modify Rule S4830: Revert aiohttp support (APPSEC-1361) (#3418)

## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
This commit is contained in:
daniel-teuchert-sonarsource 2023-11-07 11:23:37 +01:00 committed by GitHub
parent 245f048f31
commit c79e30a528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 40 deletions

View File

@ -1,39 +0,0 @@
== How to fix it in aiohttp
=== Code examples
include::../../common/fix/code-rationale.adoc[]
:cert_variable_name: verify_ssl
:cert_variable_unsafe_value: False
:cert_variable_safe_value: True
include::../../common/fix/code-rationale-setting.adoc[]
==== Noncompliant code example
[source,python,diff-id=41,diff-type=noncompliant]
----
import aiohttp
async def example():
async with aiohttp.ClientSession() as session:
session.get("https://example.com", verify_ssl=False) # Noncompliant
----
==== Compliant solution
[source,python,diff-id=41,diff-type=compliant]
----
import aiohttp
# By default, certificate validation is enabled
async def example():
async with aiohttp.ClientSession() as session:
session.get("https://example.com")
----
=== How does this work?
include::../../common/fix/validation.adoc[]

View File

@ -14,7 +14,6 @@ include::how-to-fix-it/openssl.adoc[]
include::how-to-fix-it/requests.adoc[]
include::how-to-fix-it/aiohttp.adoc[]
== Resources