Contrast Security IntelliJ plugin
Use the Contrast IDE (Integrated Development Environment) plugin to integrate security vulnerabilities associated with projects (Scan) and applications (Assess). The Contrast plugin provides thorough information about vulnerabilities visible in projects and applications on a near real-time basis. The plugin offers filters based on severity, status, and discovery date to customize the vulnerability data to view.
The key features include a vulnerability report to view vulnerabilities associated with applications, provide a tree view on the list of the vulnerabilities related to the current file open in the IDE with visual indicators based on criticality, provide in-depth details about each vulnerability, automate the collection of vulnerabilities for applications and projects based on a schedule.
Before you begin
Make sure you have the supported system requirements:
CPU: Quad-core
RAM: 16 GB
Storage: SSD, 128 GB
Monitor: 1080p
Make sure you have the supported software requirements:
Operating systems: Ubuntu 22.04.5 LTS or Windows 11
JRE: 17.0.12
JVM Heap Size: -Xms 2g -Xmx 4g
Use IntelliJ Community Edition 2024.3 and 2024.2
Install Java Development Kit (JDK)
Linux
Install JDK 17.0.13 from the Oracle website.
Download the appropriate tar.gz file for your system (for example, jdk-17.0.13_linux-x64_bin.tar.gz).
Open a terminal and go to the directory where you downloaded the tar.gz file.
Extract the contents using the command (example):
tar -xvzf jdk-17.0.12_linux-x64_bin.tar.gz
Move the extracted JDK to the /usr/lib/jvm/ directory:
sudo mv jdk-17.0.12 /usr/lib/jvm/
Set the JAVA_HOME environment variable and update the PATH.
Edit .bashrc or .profile file (depending on the shell):
nano ~/.bashrc
Add the following lines at the end of the file:
export JAVA_HOME=/usr/lib/jvm/jdk-17.0.12 export PATH=$JAVA_HOME/bin:$PATH
Apply changes by reloading .bashrc.
source ~/.bashrc
Run the following command to verify that Java is correctly installed:
java -version
Continue by configuring the heap size.
Windows
Install JDK 17.0.13 from the Oracle website.
Download the appropriate tar.gz file for your system (for example, jdk-17.0.13_windows-x64_bin.tar.gz)
Go to the directory where you downloaded the tar.gz file.
Set the environment variables:
Add JAVA_HOME
Select Win + S
Type Environment Variables
Select Edit the system environment variables
In the system properties window, click Environment Variables
Under system variables, select New:
Variable name: JAVA_HOME Variable value: Path to your JDK installation (e.g., C:\Program Files\Java\jdk17).
Locate the Path variable under System Variables.
Select New and add:
%JAVA_HOME%\bin
Select OK.
Verify the configuration and open a new command prompt:
java -version
Continue by configuring the heap size.
macOS
Install JDK 17.0.13 from the Oracle website.
Download the appropriate tar.gz file for your system (for example, jdk-17.0.13_macos-x64_bin.tar.gz).
Go to the directory where you downloaded the tar.gz file.
Extract the contents using the command (example):
tar -xvzf jdk-17.0.13_macos-x64_bin.tar.gz
Move the extracted folder to the JDK directory:
sudo mv jdk-17.0.13 /Library/Java/JavaVirtualMachines/
Set the JAVA_HOME environment variable. Determine the JDK Path - the extracted JDK is now located at: /Library/Java/JavaVirtualMachines/jdk-17.0.13/Contents/Home.
Open the shell configuration file:
nano ~/.zshrc
Add the following lines to set the JAVA_HOME and update the PATH:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.13/Contents/Home export PATH=$JAVA_HOME/bin:$PATH
Save the changes.
Select Ctrl+O to save in nano.
Select Ctrl+X to exit.
Apply the changes:
source ~/.zshrc
Verify the configuration and open a new command prompt:
java -version
Continue by configuring the heap size.
Configure the Heap Size
Open IntelliJ IDEA.
Go to Help > Edit Custom VM Options.
Add or update the following lines:
-Xms1024m # Initial heap size (1 GB) -Xmx4096m # Maximum heap size (4 GB)
Save the file and restart IntelliJ IDEA.
Install the Contrast IntelliJ plugin
Select one of these options.
Install the Contrast IntelliJ plugin via JetBrains Marketplace
Open IntelliJ IDE and go to File > Settings > Plugins.
Under marketplace search for Contrast then select the install button.
After installation select Apply and then OK.
Install the Contrast IntelliJ plugin via manual installation
Download the plugin's
.zip
file and download it to your machine.Launch IntelliJ IDEA on your system.
Go to Plugin Settings:
Go to File > Settings
In the Settings/Preferences dialog, select Plugins
Install the plugin from the disk:
Click the gear icon in the top-right corner of the plugins window
Select Install Plugin from Disk from the drop-down menu
In the window, go to the location of the
.zip
file and select it.IntelliJ IDEA will verify and install the plugin. If prompted, confirm the installation.
Restart IntelliJ IDEA:
After the installation, a prompt may appear asking you to restart IntelliJ IDEA
Click Restart IDE to complete the installation process
Verify Installation:
Once IntelliJ IDEA restarts, go back to Plugins under Settings/Preferences
Ensure the plugin is listed under Installed Plugins and is enabled