Skip to main content

Setting Up the Eclipse Plugin (v9.2.0 and up)

The instructions below refer to the local installation of the CxSAST Eclipse Plugin. It is also possible to make the Eclipse plugin centrally available to organizational IDE users so they can link to it. Upon plugin updates, the organizational IDE users are automatically prompted to update. For further information and instructions, refer to Eclipse Project Update Sites.

Prerequisites

The following components must be installed and available before installing the Checkmarx Eclipse plugin:

  • The latest version of Eclipse installed

  • CxSAST 9.4 or higher installed

Connecting to Proxy

  • You can now use the built-in proxy settings to set up the CxSAST Eclipse plugin using a proxy.

  • After configuring the proxy, restart the Eclipse environment.

To edit the eclipse.ini file to point to the JDK setup:

  1. Download the CxSAST Eclipse plugin zip archive.

  2. Locate the eclipse.ini file and edit the vm arguments accordingly:

    Note

    The eclipse version running on Java 8 by default must be updated to use Java 11 in the eclipse.ini file.

-vm C:/Program Files/Java/jdk-11.0.13/bin.

To edit the location for generating the Checkmarx plugin logs:

  1. Navigate to and open log4j2.xml with your text editor.

  2. Enter the desired location for the Checkmarx plugin log file, for example, to C:\Users\admin\.p2\pool\plugins\com.checkmarx.cxviewer_<version>\config.

  3. The plugin’s log file path can be configured in the log configuration file <eclipse_home_directory>\plugins\com.checkmarx.cxviewer_<version>\config\log4j2.xml. By default, logs will be generated by the name cx_plugin.log under <eclipse_home_directory>\logs directory.

To set up and configure the CxSAST Eclipse plugin:

Notice

For instructions on local installation of the CxSAST Eclipse Plugin on Linux, refer to Setting Up the CxSAST Eclipse Plugin on Linux.

  1. Download the CxSAST Eclipse plugin zip archive.

  2. Open Eclipse, go to the Help menu, and select Install New Software.

    Eclipse_1.jpg
  3. Click <Add...>.

    Eclipse_2.jpg
  4. Enter a name into the Name field, for example, CxViewerPlugin.

    Notice

    To make the plugin centrally available to all organizational Eclipse users and enable automatic prompts for plugin updates:

    • Place the downloaded plugin zip archive on the CxSAST Server (in a distributed deployment: on CxManager).

    • On that Server, create a folder named Eclipse in the web server's home directory, for example C:\inetpub\wwwroot\Eclipse.

    • Extract the plugin archive to the Eclipse folder.

    • In Eclipse, go to Location and type: http://<CxSAST>/Eclipse/, where <CxSAST> is the IP address or resolvable hostname of the CxSAST server.

  5. Click <Archive...>, browse the CxEclipsePlugin zip file, and click <Open>.

    Eclipse_3.jpg
  6. Select the CxViewer plugin and complete the wizard.

  7. Restart the Eclipse environment.

  8. In Eclipse, go to the Window menu and select Preferences.

  9. From CxViewer Preferences, select Authentication.

    Eclipse_4.png
  10. Type the path to the CxSAST server in the Server URL field (e.g., http://<server_name>). It is recommended that you use the hostname.

    Notice

    • Ensure that no "/" is added at the end of http://<server_name>, which could happen when copying and pasting the URL/hostname.

    • In case of server connection issues, enter the hostname instead of the IP address in the server URL field. The IP address and hostname are listed in the etc/hosts file (10.32.5.117 sdlc-sast-89.cxquality.com).

  11. Click <Test> to validate the connection.

    Notice

    The Logout button can be used if you want to log in using a different user or server.

    The ‘Trust All SSL Certificates' checkbox can be used to add certified security to the connection in the following:

    • When enabled, all certificates are trusted.

    • When disabled (by default), only certificates signed by a trusted certificate authority can be accepted.

    Notice

    The checkbox is only enabled when the URL starts with ‘https’ (SSL).

  12. Click Apply and Close.

Notice

If you want to improve your viewing experience, avoiding using a laptop or small screen is recommended.

To remove the plugin:

  • Unbind all projects and then use the Windows uninstallation option to uninstall the Checkmarx plugin.