TARAflow
Developers / 08

Integrations

One ticket adapter per tracker — Jira Cloud and Server / DC, Azure DevOps, GitHub, GitLab, OpenProject — behind a host-bound channel that keeps the token in the main process.

01

TicketAdapter

  • features/integration/adapters/ticket-adapter.ts: testConnection(), fetchTickets(projectKey, issueType), createTicket(input), fetchTicketStates(keys) (one batch request), ticketUrl(key)
  • Adapters run in the renderer and map the tracker's fields to the shared ticket types in shared/models/ticket-types; what a ticket change does to a mitigation is tracker-independent and lives outside the adapters
  • Implementations: jira-adapter, azure-devops-adapter, github-adapter, gitlab-adapter, openproject-adapter; Polarion planned via the same interface
02

Host-bound Channel

  • Every HTTP call goes through integration:request with tool, host, account, method and path (adapters/tracker-channel.ts → electron/ipc/integration-handlers.ts)
  • The main process looks up the token in the OS keychain under tool, host and account, sets the authorization itself and refuses any other host — the renderer never sees a token, a foreign base URL in a project file gets none
  • The mitigation status mirrors the ticket in both directions; only a change of the ticket is applied, so what the analyst set stays while the ticket does not change
03

RichText Ticket Cards

  • features/risks/services/ticket-text.ts builds title and description as tracker-independent text: threat, attack, cause, risk score before / after, the mitigation as an EARS requirement (WHEN … the system SHALL …), notes, verification criteria and the risk label
  • The body format is the adapter's job — Jira uses Atlassian Document Format (ADF), Azure DevOps HTML (JSON Patch), GitHub, GitLab and OpenProject Markdown
  • Ticket id, URL and the last seen ticket status are stored on the selected mitigation (ticketId, ticketUrl, ticketStatus, ticketSyncedAt) for status sync