Skip to main content

Contrast Visual Studio Code plugin (Preview)

Note

Integration is to be used with Contrast Scan.

Use the Contrast Visual Studio Code IDE (Integrated Development Environment) plugin to integrate security vulnerabilities with projects (Scan). The Contrast plugin lets developers view the vulnerabilities identified during the most recent security scans and take remedial actions. The Contrast plugin provides thorough information about vulnerabilities associated with projects 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 for projects in Scan, 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, see which line of code has a vulnerability through visual indicators, 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

    • Node: 20.17.0

    • VSCode: 1.93.0 and above

Download Visual Studio Code

  1. Go to Visual Studio Code.

  2. Click the Download button. The website will automatically detect your operating system and provide the appropriate installer.

    • Windows: .exe file

    • Mac: .dmg file

    • Linux: .deb, .rpm, or .tar.gz file

  3. Continue by installing the Visual Studio Code.

Install Visual Studio Code

Linux

  1. Open a terminal and go to the directory where you downloaded the file.

  2. Run the command:

    bash: sudo apt install ./code_*.deb
  3. Continue by launching Visual Studio code.

Windows

  1. Go to the directory where you downloaded the file and open the .exe file.

  2. Follow the installation wizard:

    • Accept the license agreement

    • Choose the installation folder

    • Select optional tasks like adding VS Code to the PATH

  3. Click Install and then Finish.

  4. Continue by launching Visual Studio code.

macOS

  1. Go to the directory where you downloaded the file and open the .dmg file.

  2. Drag the Visual Studio Code icon into the Applications folder.

  3. Continue by launching Visual Studio code.

Launch Visual Studio Code

  1. Locate and open Visual Studio Code.

    • Linux: Use your desktop menu or run code from the terminal.

    • Windows: Search for Visual Studio Code under the Start menu.

    • Mac: Open it from the Applications folder.

  2. Continue by installing the Contrast plugin.

Install the Contrast Visual Studio Code plugin

Select one of these options.

Install the plugin via Visual Studio Marketplace

Follow the steps from the marketplace.

  1. Search for and then open VS Code.

  2. Go to the Extensions view.

  3. Search for Contrast IDE and select it to view more details.

  4. Click the Install button on the extension’s page.

  5. If required, restart the VSCode after installing the Contrast extension.

Install the plugin via manual installation

  1. Launch Visual Studio Code on your system.

  2. Go to the Extensions view.

  3. Click the more options icon () in the top-right corner and select Install from VSIX.

  4. Go to the location of the .vsix file and select it to install the plugin.