# Issue trackers

Turn a finding into a ticket in the team's tracker without copying it by
hand: Phantom drafts the ticket, you review and edit it, and only then is
it created. Supported: **GitHub**, **GitLab**, **Jira** (Cloud and Data
Center), **Linear** and **DefectDojo**, and any other service through a
plugin's service adapter ([Handler contracts](../plugins/contracts.md)).

## Adding a tracker

**Settings › Integrations › Issue trackers › Add tracker**:

| Service | Project | Address | Token |
|---|---|---|---|
| GitHub | `owner/repository` | blank (github.com), or your GitHub Enterprise API | a token that can create issues in the repository |
| GitLab | project path or id | blank (gitlab.com), or your instance | a token with the `api` scope |
| Jira | project key, e.g. `SEC` | your site, e.g. `https://acme.atlassian.net`, and the account email | an API token of that account |
| Linear | team id | blank | an API key |
| DefectDojo | the test ID, plus the test type ID recorded as *found by* | your instance, e.g. `https://defectdojo.example.com` | an API v2 key |

A DefectDojo ticket becomes a finding in that test with the finding's
severity and CWE number, active and not yet verified.

Tokens are encrypted with the configuration key and never shown again.
Addresses follow the same rules as webhooks: https to other machines; a
tracker on this machine or your network needs your confirmation.

## From a finding to a ticket

In the finding's **Fix** tab, under **Tickets**, choose a tracker and
**Create ticket…**. Phantom drafts:

- the title, `[SEVERITY] title`;
- a Markdown body: severity and CVSS, where, the weakness with its OWASP
  and PCI DSS references, description, how to reproduce, remediation and
  the due date;
- labels: the tracker's own, `security` and `severity:<level>`.

Credentials are masked in the draft. Edit anything, then **Create
ticket**; the text is masked again as it is sent, so a credential never
reaches a tracker. The ticket appears under the finding with its key and
link.

## Keeping track

For GitHub, GitLab and DefectDojo, **Sync** reads whether the issue is
closed now (in DefectDojo: mitigated or no longer active).
Jira and Linear tickets link to the issue; open it there to see its
state. A tracker never changes the finding: you decide when it is
resolved, for example after a retest.

## Who can do this

Only you, in the interface. Agents cannot add trackers or create tickets,
since a ticket leaves the machine. Removing a tracker keeps the links of
the tickets made with it.
