Connect Code Sight to Polaris

Connect Code Sight to Polaris to view issues in Team View, or run tests on Polaris from your IDE.

Install and configure Code Sight

To install Code Sight and connect it to Polaris, follow these steps:

  1. Follow the instructions in the Code Sight documentation to install Code Sight.
  2. Sign into Polaris and make an access token.
    Note: See Make an access token for more information.
  3. Follow the instructions in the Code Sight documentation (Code Sight QuickStart for Polaris issues) to add your Polaris URL and access token to Code Sight's settings. Then, configure one or more sources (branches in SAST & SCA projects in Polaris) to retrieve issues from.
    Note: Retrieving DAST issues from Polaris is not supported.

View Polaris issues in your IDE (in Team View)

After you connect Code Sight to Polaris, SAST and SCA issues captured in Polaris appear in Code Sight, in Team View.

  1. If you haven't done so already, Install and configure Code Sight.
  2. After you configure a source, find SAST and SCA issues from Polaris in Team View.
    Note: See Viewing Polaris issues on the server in the Code Sight documentation for more information.

Run tests on Polaris from your IDE

After you connect Code Sight to Polaris, you can run tests from VS Code. Doing so allows you to incrementally validate changes you make, without affecting your project's primary branch.

Before you proceed

Before you run tests with Code Sight, please note:

  • At this time, running tests with Code Sight is only supported in VS Code.
  • When you run a test from your IDE (using Code Sight), Code Sight creates a branch in Polaris. The names of branches created by Code Sight include CodeSight_ and the email address of the user the branch was created for (for example, CodeSight_user@domain.com).
    Important: The branches Code Sight creates are not compatible with SCM integrations.
  • Your permissions in Polaris must allow you to run tests. You cannot test projects in applications that you only have observer-level access to.
    Note: See Roles and permissions for more information.

Run tests on Polaris from your IDE

Follow these steps to run a test on Polaris with Code Sight:
  1. If you haven't done so already, Install and configure Code Sight.
  2. Follow the instructions in the Code Sight documentation (Local View and scan configurations (VS Code)) to create and run a scan configuration.
    Important: build and clean commands in a scan configuration's advanced settings will override build and clean commands in your project's coverity.yaml file.
  3. View issues from local tests in Local View.
    Tip: Compare the list of issues under Local View with the list under Team View to validate changes as you remediate issues — even before you commit your changes.

Monitor tests in Polaris

Monitor tests you run with Code Sight on the Tests page.

Note: By default, tests run with Code Sight are hidden on the Tests page. Select IDE with the Test Mode filter to show tests run with Code Sight.