Skip to Content
Ticketing

Set up Ticketing and GitHub Issues

Connect Mondoo to GitHub Issues to create security remediation issues directly from the Mondoo App.

Connect a space to GitHub Issues so team members can create GitHub issues for findings without leaving the Mondoo App. Mondoo files each issue with a GitHub personal access token you provide.

For an overview of ticketing, read Track and Fix Findings with Ticketing.

Before you begin

  • To add the integration, you need the Editor or Owner role, or another role with this permission. To create tickets, team members need the Editor or Owner role, or another role with permission to create tickets. To see every role, read Roles and permissions.
  • A GitHub account that can open issues in the repositories where you want Mondoo to add issues. Mondoo files every issue as this account, using a personal access token with the Issues repository permission set to Read and write. The next section shows how to create the token.
  • If you use GitHub Enterprise Server, an instance that's reachable from the internet. Mondoo connects to it from the Mondoo cloud and doesn't connect to private network addresses.

Create a GitHub personal access token to give Mondoo access to the repository

A personal access token gives Mondoo the ability to create GitHub issues on your behalf. A token can grant access to an entire GitHub organization or only to specific repositories. Once you share the token with Mondoo, any new tickets created in the space can write new GitHub issues using that token.

To learn more about personal access tokens, read Managing your personal access tokens in the GitHub documentation.

  1. Log into GitHub. If you haven't verified your email address with GitHub, do that now.

  2. In the upper-right corner of any GitHub page, select your profile photo and then select Settings.

  3. In the left sidebar, select Developer settings.

  4. In the left sidebar, under Personal access tokens, select Fine-grained tokens.

  5. Near the top-right corner of the page, select the Generate new token button.

  6. In the Token name box, enter an easily identifiable name, such as Mondoo ticketing integration.

  7. In the Resource owner drop-down list, select the organization that owns the repository or repositories where you want Mondoo to create issues.

  8. In the Expiration drop-down list, select the number of days before the token expires. (Be sure to note the expiration date so that, as it approaches, you can create a new one without interrupting the Mondoo-GitHub integration.)

  9. Under Repository access, select All repositories to give Mondoo access to all the repositories in the chosen organization, or select Only select repositories and add the repositories you want to give Mondoo access to.

  10. Select Repository permissions and, in the Issues drop-down list, select Read and write.

  11. Select the Generate token button.

  12. Copy the token that GitHub generates. You need it in the next steps.

If your GitHub organization requires approval for personal access tokens, Mondoo can't use your token until a GitHub organization administrator approves the token.

If you prefer, you can create a classic personal access token. Assign the repo scope to the classic token. To learn more, read Creating a personal access token (classic) in the GitHub documentation.

Add a GitHub integration

  1. In the Mondoo App, navigate to the space where you want to set up ticketing and, in the side navigation bar, select Integrations.

  2. Select INSTALL, then choose the Ticket Systems category.

    The Ticket Systems category of the Install Integration page in the Mondoo App

  3. Select GitHub Issues.

    The GitHub Issues integration setup page in the Mondoo App

  4. In the Choose an integration name box, enter a name for the integration. Make it a name that clearly shows this is a GitHub integration.

  5. If you use a dedicated GitHub Enterprise Server instead of github.com, enter its URL under Provide your GitHub Enterprise Server URL (optional). This is the URL you use to access the home page for your GitHub account. An example is https://github.mycompany.com. If you use github.com, leave the box empty.

  6. Under Provide your personal access token, paste the token you copied from GitHub in the steps above.

  7. Under Configure preferences, choose how the integration behaves:

    • Automatically close issues is on by default for new integrations: closing a ticket in Mondoo also closes the corresponding GitHub issue.
    • To create a GitHub issue for each drift ticket when an asset becomes more exposed to attack, turn on Create drift issues in this integration and enter the GitHub organization and repository where you want to create new issues. Drift tickets also require the space's Regression setting. To learn more, read Automatically create tickets on drift.
  8. Select the CREATE INTEGRATION button.

    Mondoo creates the integration and opens its page. To change these settings later, select the pencil icon (Edit integration) on that page.

Verify the integration

Mondoo doesn't contact your ticket system when you save the integration, so a mistyped URL, a wrong token, or a missing permission only shows up when Mondoo files its first ticket. Create one test ticket to confirm that the integration works:

  1. In the side navigation bar, select Findings, then open any check or advisory. To learn more, read Create Tickets from Checks or Create Tickets from Advisories.

  2. Select ACTIONS > Create ticket.

  3. In Select Integration, choose the integration you just added, provide the fields it asks for, and select CREATE TICKET.

    Mondoo confirms that the ticket is being created and that the external ticket will be ready shortly.

  4. In the side navigation bar, select Ticketing and find the test ticket on the Open tab. As soon as Mondoo has filed it, the External Ticket column shows the issue or ticket it created (for an email integration, the recipient).

  5. In your ticket system, confirm that the new issue or ticket exists and contains the finding details.

  6. Close the test ticket in Mondoo. If the integration closes external tickets automatically, Mondoo closes the external one too. To learn more, read Close a ticket.

If the External Ticket column stays empty or the ticket's status is Error, read Troubleshoot below.

Troubleshoot

A failed ticket doesn't change the integration's status. If the test ticket's External Ticket column stays empty or its status is Error, check these causes:

CauseFix
The personal access token expired or was revoked.Create a new token, then select the pencil icon (Edit integration) on the integration's page and paste it under Personal access token (provide new to update).
The token can't write issues in the repository. It doesn't include that repository, its Issues permission isn't Read and write, or the organization still has to approve it.Edit the token in GitHub, or ask an organization owner to approve it. A classic token needs the repo scope.
The Repository Owner or Repository Name in the Create Ticket dialog is wrong.Create the ticket again with the owner and name exactly as they appear in the repository's URL.
Issues are turned off for the repository.In the repository's settings on GitHub, turn on Issues, or create the ticket in another repository.
Mondoo can't reach your GitHub Enterprise Server instance.Make the instance reachable from the internet, and check the URL you entered for the integration.

After you fix the cause, create a new ticket for the finding and close the one that failed.

Next steps

Last updated on

On this page