Skip to content

JIRA Integration - allow user to link issue in Jira with Vulnerability

Why are we doing this work

We need to provide a way to link Jira issue related to given Vulnerability. We need to make sure this we allow to link only if user has GitLab Ultimate license.

#8942[b3-details-page-jira-enabled_issue-created.png]

Relevant links

Non-functional requirements

  • [-] Documentation: not needed
  • Feature flag: jira_create_issues_for_vulnerabilities - allow to link only when feature flag is enabled,
  • [-] Performance:
  • [-] Testing:

Implementation plan

  • database Add new table and model to store external links:
    CREATE TABLE vulnerability_external_issue_links (
        id bigint NOT NULL,
        vulnerability_id bigint NOT NULL,
        author_id integer NOT NULL,
        external_type smallint NOT NULL, //enum, currently only { jira: 1 }
        external_project_id character varying NOT NULL, //store key/ID of project in external system: ie. JIRA
        external_issue_id character varying NOT NULL, // store ID of the issue in external syste,
        link_type smallint DEFAULT 1 NOT NULL,  // link_type similar to link type in vulnerability_issue_links: { created: 1 }
        created_at timestamp with time zone NOT NULL,
        updated_at timestamp with time zone NOT NULL
    );
  • backend add new GraphQL API to create link between Vulnerability and Issue from External System (Jira), make sure to verify if issue exist and can be linked,
  • backend add new API (or extend current API to fetch issues from Jira in GitLab) to fetch issues related to Vulnerability
Edited by Alan (Maciej) Paruszewski