Scanner: semgrep Severity: high Rule: gitlab-python_ssl_rule-req-no-certvalid CWE: CWE-295
Description
The application was found using the requests module without configuring a timeout value for
connections. The verify=False argument has been set, which effectively disables the
validation
of server certificates.
This allows for an adversary who is in between the application and the target host to intercept
potentially sensitive information or transmit malicious data.
To remediate this issue either remove the verify=False argument, or set verify=Trueto each requests call.
Example verifying server certificates for an HTTP GET request:
# Issue a GET request to https://example.com with a timeout of 10 seconds and verify the
# server certificate explicitly.
response = requests.get('https://example.com', timeout=10, verify=True)
# Work with the response object
# ...
For more information on using the requests module see:
## high Finding
**Scanner:** semgrep
**Severity:** high
**Rule:** gitlab-python_ssl_rule-req-no-certvalid
**CWE:** CWE-295
### Description
The application was found using the `requests` module without configuring a timeout value for
connections. The `verify=False` argument has been set, which effectively disables the
validation
of server certificates.
This allows for an adversary who is in between the application and the target host to intercept
potentially sensitive information or transmit malicious data.
To remediate this issue either remove the `verify=False` argument, or set `verify=True`to each
`requests` call.
Example verifying server certificates for an HTTP GET request:
```
# Issue a GET request to https://example.com with a timeout of 10 seconds and verify the
# server certificate explicitly.
response = requests.get('https://example.com', timeout=10, verify=True)
# Work with the response object
# ...
```
For more information on using the requests module see:
- https://requests.readthedocs.io/en/latest/api/
### Location
**File:** `fixtures/nightly/eco/py-bare-pyproject/auth.py` (line 12)
### Code
```
response = requests.post(
TOKEN_URL,
data={
"grant_type": "client_credentials",
"client_id": CLIENT_ID,
"client_secret": CLIENT_SECRET,
},
verify=False, # certificate verification disabled
)
```
---
*Fingerprint:* `b9c123e11c84b9e397b509cc49d39395b2bb626a7872eabe254065183bb8d8af`
*Generated by compliance-scanner*
[Open in Prüfwerk / In Prüfwerk öffnen](https://pruefwerk.breakpilot.com/findings?target=6ae9aa2160f5d8045fc570a7)
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
**Prüfwerk:** Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
high Finding
Scanner: semgrep
Severity: high
Rule: gitlab-python_ssl_rule-req-no-certvalid
CWE: CWE-295
Description
The application was found using the
requestsmodule without configuring a timeout value forconnections. The
verify=Falseargument has been set, which effectively disables thevalidation
of server certificates.
This allows for an adversary who is in between the application and the target host to intercept
potentially sensitive information or transmit malicious data.
To remediate this issue either remove the
verify=Falseargument, or setverify=Trueto eachrequestscall.Example verifying server certificates for an HTTP GET request:
For more information on using the requests module see:
Location
File:
fixtures/nightly/eco/py-bare-pyproject/auth.py(line 12)Code
Fingerprint:
b9c123e11c84b9e397b509cc49d39395b2bb626a7872eabe254065183bb8d8afGenerated by compliance-scanner
Open in Prüfwerk / In Prüfwerk öffnen
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.