Setting Up the Eclipse Plugin on Linux (v8.4.2 and up)

The instructions below refer to local installation of the CxSAST Eclipse Plugin on Linux. 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 will be automatically prompted to update. For details, see Eclipse Project Update Sites.

The user performing the installation must have administrative permissions.

The CxSAST Eclipse plugin within the plugins repository is only compatible with the latest CxSAST version. Please download plugins for older CxSAST versions from https://www.checkmarx.com/plugins/.

Prerequisites

The following prerequisites are required before the CxSAST Eclipse plugin is installed.

  • Ubuntu 64 bit (16.0.4 LTS) installed
  • Mozilla Browser installed (as default browser)
  • Eclipse installed (Oxygen is the only supported version)
  • Install Java & Maven:
       sudo apt-get install openjdk-8-jdk
sudo apt-get install maven
  • Download Xulrunner_10.0.1 (64 bit for Linux):
       sudo wget 
http://ftp.mozilla.org/pub/xulrunner/releases/10.0.1/runtimes/xulrunner-10.0.1.en-US.linux-x86_64.tar.bz2
tar –xvf xulrunner-10.0.1.en-US.linux-x86_64.tar.bz2

Set up and configure the CxSAST Eclipse plugin according to Setting Up the CxSAST Eclipse Plugin.

Once the CxSAST Eclipse plugin is installed and configured, configure the eclipse.ini file (<ECLIPSE_INSTALL_DIR>/eclipse.ini) according to the following:

  • Add the following two code lines above the parameter “--launcher.appendVmargs”:

--launcher.GTK_version
2

  • Add the following two parameters at the end of the eclipse.ini file (the place of extracted xulrunner location):

-Dorg.eclipse.swt.browser.DefaultType=mozilla
-Dorg.eclipse.swt.browser.XULRunnerPath={PATH_TO_xulrunner_INSTALL_DIR}


Example eclipse.ini file with additions:

-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
/home/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.551.v20171108-1834
-product
org.eclipse.epp.package.java.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.GTK_version
2
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-Dorg.eclipse.swt.browser.DefaultType=mozilla
-Dorg.eclipse.swt.browser.XULRunnerPath=/home/xulrunner


In order to allow Eclipse to save the CxSAST password you need to add the following settings:

Before setting CxSAST authentication set the following preferences in the Eclipse environment:

Go to Window > Preferences > General > Security > Secure storage and uncheck 'Linux Integration (64 bit)', leaving 'UI Prompt' as the only checked option.

When setting the CxSAST credentials, you will receive the following prompt:

This is the password for Eclipse Linux storage. Enter your desired password (e.g. linux”, <your name> or 1111) 

Restart Eclipse and you will be asked to supply the same 'secure storage password' again when trying to perform bind/scan, but the preferences password will be saved.