Contrast Security IntelliJ plugin
The Contrast IDE (Integrated Development Environment) brings real-time security intelligence directly into IntelliJ. By integrating vulnerabilities from both projects (Scan) and applications (Assess) developers can filter by severity or status to prioritize and remediate vulnerabilities without leaving their workspace.
Key features
The plugin offers Assess and Scan, designed to provide a seamless experience for identifying and managing security vulnerabilities in commonly supported programming languages within the IntelliJ Community Edition.
Vulnerability report:
View vulnerabilities associated with applications for Assess and Projects in Scan
Provide filters such as severity, status, and discovery dates to refine the search on the vulnerability list
Current file:
Provide a Tree view on the list of vulnerabilities associated with the current file open in the IDE, with visual indicators based on criticality
Provide the ability to navigate to the Line of Code with contextual annotations
Detailed Vulnerability Information:
Assess provides in-depth details about each vulnerability, such as remediation steps, event logs, and options to mark or categorize the issue
The user interface provides a seamless navigation of the associated details related to each vulnerability in a dedicated tab view to enhance the user experience
Schedulers:
Automate the fetching of vulnerabilities for applications (for Assess) and projects (for Scan) based on a configurable schedule without manual intervention
These features enable developers to proactively identify, analyze, and address vulnerabilities, thereby improving overall code security and efficiency.
Before you begin
Make sure you have the supported recommendations and requirements.
System Requirements
Component | Recommendation |
|---|---|
CPU | Quad-core |
RAM | 16 GB |
Storage | SSD, 128 GB |
Monitor | 1080p |
Software Requirements
Software | Requirements |
|---|---|
Operating System | Ubuntu 22.04.5 LTS or Windows 11 or macOS Sequoia 14.x |
JRE | 21.0.8 |
JVM Heap Size | -Xms 2g -Xmx 4g |
Supported IDE and Versions
IDE | Version |
|---|---|
IntelliJ Community Edition | Version 2025.3.1.1 and 2025.2 Rider version 2025.3.1 and 2025.2.1 |
Install Java Development Kit (JDK)
Linux
Install JDK 21.0.8 from the Oracle website.
Download the appropriate tar.gz file for your system (for example,
jdk-21.0.8_linux-x64_bin.tar.gz).Open a terminal and go to the directory where you downloaded the jdk-21.0.8_linux-x64_bin.tar.gz file.
Extract the contents using the command (example):
tar -xvzf jdk-21.0.8_linux-x64_bin.tar.gz
Move the extracted JDK to the /usr/lib/jvm/ directory:
sudo mv jdk-21.0.8 /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-21.0.8 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 21.0.8 from the Oracle website.
Download the appropriate tar.gz file for your system (for example, jdk-21.0.8_windows-x64_bin.zip)
Go to the directory where you downloaded the jdk-21.0.8_windows-x64_bin.zip file and extract the contents.
Set the environment variables:
Add JAVA_HOME
Select Win + S
Type Environment Variables
Select Edit the system environment variables
In the system properties window, select Environment Variables
Under system variables, select New:
Variable name: JAVA_HOME Variable value: Path to your JDK installation (e.g., C:\Program Files\Java\jdk21).
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 21.0.8 from the Oracle website.
Download the appropriate tar.gz file for your system (for example, jdk-21.0.8_macos-x64_bin.tar.gz).
Go to the directory where you downloaded the jdk-21.0.8_macos-x64_bin.tar.gz file.
Extract the contents using the command (example):
tar -xvzf jdk-21.0.8_macos-x64_bin.tar.gz
Move the extracted folder to the JDK directory:
sudo mv jdk-21.0.8 /Library/Java/JavaVirtualMachines/
Set the JAVA_HOME environment variable. Determine the JDK path, the extracted JDK, is now located at: /Library/Java/JavaVirtualMachines/jdk-21.0.8/Contents/Home.
Edit the shell configuration file. 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-21.0.8/Contents/Home export PATH=$JAVA_HOME/bin:$PATH
Save the changes.
Press Ctrl+O to save in nano.
Press 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
.zipfile 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
.zipfile 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
Configure the Contrast IntelliJ plugin
In IntelliJ IDEA, find the Contrast plugin and select the Settings icon (
).
Enter:
Contrast URL: The URL of your Contrast instance. For example,
https://app.contrastsecurity.com.Username: the username or e-mail address that you use for logging into Contrast.
API Key, Service Key, and Organization ID: Copy these values from your user profile in the Contrast web interface.
To find these values:
In the Contrast web interface, select your name in the upper right of the page.
Select User settings.
Copy the values for the API Key, Service Key, and Organization ID.
Important
Do not use the Agent keys (found under user menu > Organization settings > Agent keys). The access rights for the Agent keys are more limited than the API keys found under User Settings. The Agent keys will not work with the Contrast Intellij plugin.
Select OK.