bridgecrewio / prisma-cloud-jetbrains-ide

The Prisma cloud Plugin for Intellij enables developers to get real-time scan results, as well as inline fix suggestions as they develop cloud infrastructure.
Apache License 2.0
1 stars 0 forks source link

Problem with proxy #138

Open amusarra opened 20 hours ago

amusarra commented 20 hours ago

Environment: macOS 24.0.0 Darwin Kernel Version 24.0.0 Python: 3.12 IDE: IntelliJ IDEA 2024.2.3 (Ultimate Edition) IDE Config:

IntelliJ IDEA 2024.2.3 (Ultimate Edition)
Build #IU-242.23339.11, built on September 25, 2024
Licensed to Liferay Portal Security Audit / Antonio Musarra
Subscription is active until November 22, 2024.
For non-commercial open source development only.
Runtime version: 21.0.4+13-b509.17 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.0.1
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 10
Registry:
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
  i18n.locale=
Non-Bundled Plugins:
  com.jetbrains.plugins.ini4idea (242.23339.18)
  com.github.bridgecrewio.prismacloud (1.0.22)
  com.mnr.java.intellij.idea.plugin.base64helper (2.0.3)
  com.jetbrains.darkPurpleTheme (1.3)
  com.jetbrains.space (242.23339.11)
  com.jetbrains.edu (2024.9-2024.2-1051)
  google-java-format (1.24.0.0)
  com.wrq.rearranger (6.0.18)
  com.intellij.properties.bundle.editor (242.22855.32)
  CheckStyle-IDEA (5.95.0)
  com.github.camork.fileExpander (2.5)
  com.intellij.mermaid (0.0.22+IJ.232)
  com.intellij.ml.llm (242.23339.40)
  org.asciidoctor.intellij.asciidoc (0.43.1)
  org.exbin.deltahex.intellij (0.2.10.1)
  io.snyk.snyk-intellij-plugin (2.9.1)
  com.github.copilot (1.5.25.10)
  org.sonarlint.idea (10.11.1.79663)
  zielu.gittoolbox (600.0.1+242)
Kotlin: 242.23339.11-IJ

Config 1 - Configuration of the IDE

When using the IntellijIDEA plugin, and it is configured to use a proxy, the plugin fails to connect to the endpoint. It seems that the plugin does not use the proxy set in the IDE or the system-wide proxy.

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

Log 1 - Connection timeout when setting the proxy

ChananM commented 5 hours ago

You are correct, we do not pass IntelliJ proxy settings to Checkov, and this is indeed an issue. Can you please share how your proxy configuration looks under Appearance & Behavior | System Settings | HTTP Proxy? If you can't share the data any mock values will suffice, I just want to make sure I reproduce the same issue. By the way, if it can provide a temporary workaround, proxy configuration works in the VS Code extension

amusarra commented 2 hours ago

Hi @ChananM I am using "Manual Proxy configuration" of HTTP type under Appearance & Behavior. I'm not using a publicly accessible proxy, so it wouldn't help you to have my proxy settings.

For Java projects I don't use VSCode and I don't want to use it.

I await your response. Many thanks.