Proxy-Konfiguration im Prisma Cloud IDE-Plugin
755
Created On 10/31/24 14:27 PM - Last Modified 03/02/26 19:31 PM
Symptom
- Der Kunde hat Probleme mit den Plugins IntelliJ IDEA und VS Code 1. Wenn die Plugins für die Verwendung eines Proxys konfiguriert sind, können sie keine Verbindung zum Endpunkt herstellen. Es scheint, dass die Plugins die Proxy-Einstellungen der IDE oder des systemweiten Proxys nicht verwenden.
- Wenn Sie das IntellijIDEA-Plugin verwenden und es für die Verwendung eines Proxys konfiguriert ist, kann das Plugin keine Verbindung zum Endpunkt herstellen. Es scheint, dass das Plugin weder den in der IDE festgelegten Proxy noch den systemweiten Proxy verwendet.
2024-10-08 12:14:40,284 [MainThread ] [WARNI] An unexpected error occurred getting the run configuration from <https://<FQDN>>/bridgecrew/api/v2/checkov/runConfiguration after multiple retries. Please verify your API key and Prisma API URL, and retry. If the problem persists, please enable debug logs and contact support. The error is: HTTPSConnectionPool(host='api.eu.prismacloud.io', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x148affc80>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)')) Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) TimeoutError: timed out
Proxy settings:
Visual Studio Code, dasselbe Problem, wenn ich den Proxy (http) verwende.
-
export proxy setting via command
export HTTPS_PROXY="http://:@:" -
start Visual Studio Code via command
code -
konfigurieren das Prisma Cloud-Plugin und testen Sie die Verbindung. Es ist OK.
-
Vollständigen Scan starten
Protokolle des „Vollständigen Scans ausführen“:
2024-10-11 09:55:35 [info]: Initiating Prisma Cloud VS Code extension version 1.0.21 2024-10-11 09:55:35 [info]: Plugin path: /Users/amusarra/.vscode/extensions/prismacloud.prisma-cloud-1.0.21 2024-10-11 09:55:35 [info]: customer is not supporting SAST 2024-10-11 09:55:35 [error]: Failed fetching a new JWT token, authorization on prisma failed: Request failed with status code 500 2024-10-11 09:55:35 [error]: CustomersModulesService is not enabled Or token not exists {"isEnabled":true} 2024-10-11 09:55:35 [info]: customer is not supporting SAST 2024-10-11 09:55:35 [info]: Installing Checkov with Docker 2024-10-11 09:55:35 [error]: The Checkov installation with Docker was failed {"error":{"name":"Error","message":"Command failed: docker pull bridgecrew/checkov:latest\nCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\n","stack":"Error: Command failed: docker pull bridgecrew/checkov:latest\nCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\n\n at genericNodeError (node:internal/errors:984:15)\n at wrappedFn (node:internal/errors:538:14)\n at ChildProcess.exithandler (node:child_process:423:12)\n at ChildProcess.emit (node:events:519:28)\n at ChildProcess.emit (node:domain:488:12)\n at maybeClose (node:internal/child_process:1105:16)\n at Socket.<anonymous> (node:internal/child_process:457:11)\n at Socket.emit (node:events:519:28)\n at Socket.emit (node:domain:488:12)\n at Pipe.<anonymous> (node:net:339:12)"}} 2024-10-11 09:55:35 [info]: Installing Checkov with Pip3 2024-10-11 09:55:35 [info]: Checking the Python version 2024-10-11 09:55:37 [error]: No executor found for undefined, aborting scan operation 2024-10-11 09:55:37 [info]: There are no installationId or jwtToken for sending analytics data 2024-10-11 09:55:49 [info]: Successfully installed Checkov using pip3 {"type":"pip3","entrypoint":"checkov"} 2024-10-11 09:55:54 [info]: proxy settings: "" 2024-10-11 09:55:54 [warn]: There are files opened from outside the workspace that won't be scanned in these directories: "/Users/amusarra/Library/Application Support/Code/logs/20241011T095522/window1/exthost/PrismaCloud.prisma-cloud" 2024-10-11 09:55:54 [info]: checkov --repo-id vscode/extension --quiet --soft-fail --output json --bc-api-key --directory "/Users/amusarra/dev/github/amusarra/tls-mutual-auth" 2024-10-11 09:56:20 [info]: Full error checkov process output: 2024-10-11 09:56:20,092 [MainThread ] [WARNI] An unexpected error occurred getting the run configuration from https://api.eu.prismacloud.io/bridgecrew/api/v2/checkov/runConfiguration after multiple retries. Please verify your API key and Prisma API URL, and retry. If the problem persists, please enable debug logs and contact support. The error is: HTTPSConnectionPool(host='api.eu.prismacloud.io', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1493f79e0>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)')) Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) TimeoutError: timed out The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 492, in _make_request raise new_e File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 468, in _make_request self._validate_conn(conn) File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 1097, in _validate_conn conn.connect() File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 611, in connect self.sock = sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 212, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x1493f79e0>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/checkov/common/bridgecrew/platform_integration.py", line 1021, in get_customer_run_config token = self.get_auth_token() ^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/cachetools/init.py", line 752, in wrapper v = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/checkov/common/bridgecrew/platform_integration.py", line 300, in get_auth_token request = self.http.request("POST", f"{self.prisma_api_url}/login", # type:ignore[no-untyped-call] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/_request_methods.py", line 118, in request return self.request_encode_body( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/_request_methods.py", line 217, in request_encode_body return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/poolmanager.py", line 443, in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 875, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 875, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 875, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 845, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.eu.prismacloud.io', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1493f79e0>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)')) An error occurred getting data from the platform, including policy metadata. Because --include-all-checkov-policies was not used, Checkov cannot differentiate Checkov-only policies from platform policies, and no policies will get evaluated. Please resolve the error above or re-run with the --include-all-checkov-policies argument (but note that this will not include any custom platform configurations or policy metadata).
Das direkte Einrichten des Proxys in VS Code funktioniert im Gegensatz zur Konfiguration über die Systemumgebung.
Environment
- Umgebung : macOS 24.0.0 Darwin Kernel Version 24.0.0
- Python : 3.12
- IDE : IntelliJ IDEA 2024.2.3 (Ultimate Edition)
- Prisma-Plugin:1.0.21
Cause
- Proxy-Einstellungen entfernt.
Resolution
- Unterstützung für die Benutzer -Proxy- Konfiguration unter Einstellungen | Darstellung und Verhalten | Systemeinstellungen | HTTP Proxy wurde in den folgenden Versionen eingeführt:
Version 1.0.23 für JetBrains-Produkte ab Version 2024.2.*
Version 1.0.23-203.241 für JetBrains-Produktversionen 2020.3.* bis 2024.1.*
Für VS Code war Proxy-Unterstützung bereits verfügbar, wie in diesem GitHub-Problem erwähnt.