---
url: /howto/connecting-software-composition-tools/jfrog_xray.md
---

# How to Connect to JFrog Xray

Teamscale integrates with JFrog Xray (a Software Composition Analysis tool) using the API provided by JFrog.

![Sample Build Details in Teamscale](./jfrog-build-sample.png)

::: info JFrog Cloud only
As of now, only the cloud version of JFrog Xray (`https://<company>.jfrog.io`) is supported
:::

::: tip Uploading Vulnerability Reports Directly
If you cannot or do not want to connect an SCA tool, you can populate the [Software Composition perspective](../../../reference/ui/software-composition/) by [uploading vulnerability reports](../../uploading-vulnerability-reports/) that your builds produce instead.
:::

## Setting up a JFrog Xray Connector

To set up the JFrog Xray integration, create a new Teamscale project (or edit an existing one) in the `Projects` perspective.
Add a new connector of type **Software Composition Analysis (SCA) Tool** and choose JFrog Xray:

![Connectors](./connectors.png)

The following required connector options need to be filled:

* `Account`: Use an account for JFrog Xray with the following data:
  * `Account Name`: choose freely (e.g. "Xray")
  * `URI`: the URL of your JFrog Xray cloud instance, e.g. `https://<your-company>.jfrog.io`
  * `API Key`: Either an **Identity Token** or an **Access Token**, as configured in JFrog.
    Note that only one access token can be configured, so it needs to allow access to all Xray projects specified in the `JFrog Project Keys` option (below).

    ::: info Token Permissions
    Some Teamscale features (e.g. working with ignored violations) need the "Manage Policies", "Security Manager" or equivalent role to work.
    Choosing a token with fewer permissions can lead to only partial data being visible in Teamscale.
    :::

* `JFrog Project Keys`: The project keys of all JFrog projects to fetch data for.
  The format is typically `<...>-project-key`.

  ::: tip Including JFrog's Default Project
  To include JFrog's **default** project, add the entry `artifactory`
  :::

The following optional connector options are available in addition:

* `Polling interval`: Delay used for polling the JFrog Xray server in seconds.
* `Enable Deletion of Imported Exclusion Rules`: When enabled, users can delete exclusion rules that were imported from JFrog Xray. The deletion is synchronized back to Xray. When disabled, imported exclusion rules cannot be deleted in Teamscale.

## Xray-related Features in Teamscale

Once set up, Teamscale can perform the following tasks regarding Xray:

* fetch scanned **builds** and their **versions** from Xray
* load **vulnerabilities** and **policy violations** for these build versions
* see the **commit(s)** associated with a build version, and see the **links from builds to code commits** (and vice versa) in Teamscale
* fetch **ignored violations** (Exclusion Rules) from Teamscale \[\*]
* create new Exclusion Rules and sync them to Xray \[\*]
* delete imported Exclusion Rules in Teamscale (when enabled via the *Enable Deletion of Imported Exclusion Rules* connector option, the deletion is synchronized back to Xray) \[\*]

\[\*] = requires a JFrog access token with the "Policy Manager" permissions

::: info Storage of Artifacts in Teamscale
Xray artifacts (e.g. builds or scan results) will still be present in Teamscale after the *retention period* in Xray has ended.
:::

The imported data is displayed in the [Software Composition perspective](../../../reference/ui/software-composition/).
It provides views for [builds](../../../reference/ui/software-composition/builds/), [violations](../../../reference/ui/software-composition/violations/), and [exclusion rules](../../../reference/ui/software-composition/exclusion-rules/).
