Prerequisites
- A Jira account for TRUSTIVAN to act as, ideally a dedicated one, with permission in the project to browse, create issues and transition issues.
- An API token for that account, created in the Atlassian account settings under Security → API tokens. It is sent with the account’s email address as HTTP Basic authentication.
- The project key (such as
SEC) and, optionally, an issue type name. Without one, issues are created asTask. - An administrator of the TRUSTIVAN organization, signed in with
curlsocookies.txtholds the session (see the quickstart). Changing notifications needswebhooks:manage, which an API key cannot hold. - A plan that includes webhooks.
Create the destination
url is the site’s base URL, https:// with no path. The token goes in
secret and is stored encrypted. config takes exactly email,
project_key and issue_type; any other key is a 400.
What opens and closes an issue
Every issue carries a label of the form
trustivan-<event>-<id>. That label is
how TRUSTIVAN avoids a second issue for the same fact, and how it finds the
issue again to close it. Do not remove it.
To close an issue, TRUSTIVAN searches for the label, reads the issue’s available
transitions and applies the one that leads to a status in Jira’s Done
category, whatever the workflow calls it. If the workflow has no such transition
from where the issue sits, nothing is guessed: the destination’s last_error
names the issue, and you close it yourself.
A finding that is resolved and then reopened within 30 days does not get a new
issue, and its closed issue is not reopened: TRUSTIVAN still holds the earlier
delivery for that fact. Reopen the issue in Jira if it should be tracked.
Test it
Troubleshooting
See also
- Send notifications to Slack, Jira and other tools: every channel, field and limit, and ServiceNow, which closes what it opens the same way
- PagerDuty
- Bulk triage: resolving findings closes their issues