Jira policy - Use case

You can use the Jira actions to create tickets about specific assets.

Create A Jira Policy

This use case demonstrates how to set up and create a ticket every time a new class A asset does not have Snyk security coverage.

To follow this example, you need to create four filters that find:

Filter 1

Filter by assets that are of type Repository.

Filter 2

Filter by assets that are Class A.

Filter 3

Filter by tags that include relevant programming languages. You can use the following language tags: Apex, ASP, C, C#, C++, CMake, Go, HTML, Java, JavaScript, Kotlin, PHP, Python, Ruby, Scala, Swift, TypeScript, VisualBasic, Handlebars, Makefile, Objective-C.

Filter 4

You have to exclude Snyk Code or Snyk Open Source from the scan coverage.

After setting up the filter conditions, you need to select the Jira action.

  • Information for the Project Key and Issue Type fields will be pulled in as a list using the Snyk AppRisk Jira Integration. (link to Jira integration in AppRisk)

  • Add a description in the Summary field.

  • Click the Next button.

  • Select the reporter of the ticket from the Reported field.

  • Assign the ticket by using the options from the Assigned filed.

  • Select a date from the Due Date field.

  • The rest of the fields are optional. After you add all the information, click the Apply button.

This is how your policy should look after all filters and actions are set.

When a ticket is created, a label of the Policy ID will be added to it.

Modify a Jira Policy

You can modify a Jira Policy that you previously created.

  • Navigate to the Policies view and select the Assets tab.

  • Click your Jira Policy, and then click Edit.

  • After you finish all the changes, click the Save button.

Modify the Jira Action

  • For Jira, Issues already opened will be modified according to the changes made.

    • For example, if they edit the description, the existing tickets’ description will also be modified.

  • For New matches, the Jira policy should create new Jira Issues

  • If the user does not want to modify previous Jira Issues, they should create a new policy

Modify the Filters

  • Jira Issues that were already opened will stay the same

  • For New matches, the Jira policy should create new Jira Issues

  • Tickets that their Asset no longer match will remain the same opened without changes

If the label of the Policy ID is removed from the Jira Ticket, the ticket will not be modified.

Delete a Jira Policy

You can delete a Jira Policy that you previously created.

  • Navigate to the Policies view and select the Assets tab.

  • Hover over your Jira Policy, and then click Delete.

If a policy is deleted, any previously linked tickets will remain open and no longer be linked to the policy.

To delete the remaining open tickets, filter the tickets in Jira by the policy label and use the bulk actions.

Troubleshoot

Editing required fields error

If you add required fields from an Issue Type in Jira will cause an error in the Policy. You can prevent this from happening by following the next steps:

  • Disable the policy by using the toggle option from the Policies view, Assets tab, and setting it as Disabled.

  • Add a field by editing the Jira policy.

  • Modify the Policy by following the steps from the Modify a Jira Policy section.

  • Re-enable the policy by using the toggle option from the Policies view, Assets tab, and setting it as Enabled.

Removing fields error

If you remove fields from an Issue Type in Jira, it will cause an error in the Policy. You can prevent this from happening by following one of the next steps:

  • Delete the existing Policy by following the steps from the Delete a Jira Policy section.

  • Add back the removed field from the Issue Type in Jira.

  • Create a new policy by following the steps from the Create a Jira Policy section.

Last updated

More information

Snyk privacy policy

© 2023 Snyk Limited | All product and company names and logos are trademarks of their respective owners.