Skip to main content

Setting Up the Eclipse Plugin on Linux

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 further information, refer to Eclipse Project Update Sites.

Notice

  • 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.

  • Download plugin versions for older CxSAST versions from https://www.checkmarx.com/plugins/.

Prerequisites

The following is required before installing the CxSAST Eclipse plugin:

  • 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

To set up the Eclipse plugin:

  1. Set up and configure the CxSAST Eclipse plugin.

  2. Once the CxSAST Eclipse plugin is installed and configured, edit the eclipse.ini file (<ECLIPSE_INSTALL_DIR>/eclipse.ini) according as follows:

    • 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

To allow Eclipse to save the CxSAST password, you need to add the following settings:

  1. Before setting CxSAST authentication, set the preferences in the Eclipse environment as illustrated below.

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

    Eclipse_4.jpg
  3. When setting the CxSAST credentials, you receive the following prompt: This is the password for Eclipse Linux storage. Enter the desired password, for example linux, <your name> or 1111.

    Eclipse_5.jpg
  4. Restart Eclipse. You are asked to supply the same 'secure storage password' again when trying to perform bind/scan, but the preferences password is saved.

    Eclipse_6.jpg