Set up Cases and GitHub Issues
Set up cases in a space to allow users in the space to keep track of security tasks and add GitHub issues directly from within the Mondoo Console. Cases setup involves configuring Mondoo to integrate with GitHub.
For an overview of cases, read Track and Fix Findings with Cases and Your Ticket System.
Prerequisites
-
Owner or Editor access to the Mondoo space
-
A GitHub account with access to the project where you want Mondoo to add issues
-
Access to a GitHub organization or repository
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 cases 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.
-
Log into GitHub. If you haven't verified your email address with GitHub, do that now.
-
In the upper-right corner of any GitHub page, select your profile photo and then select Settings.
-
In the left sidebar, select Developer settings.
-
In the left sidebar, under Personal access tokens, select Fine-grained tokens.
-
Near the top-right corner of the page, select the Generate new token button.
-
In the Token name box, enter an easily identifiable name, such as
Mondoo cases integration
. -
In the Resource owner drop-down list, select the organization that owns the repository or repositories where you want Mondoo to create issues.
-
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.)
-
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.
-
Select Repository permissions and, in the Issues drop-down list, select Read and write.
-
Select the Generate token button.
-
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.
Add a GitHub integration
-
In the Mondoo Console, navigate to the space where you want to set up cases and, in the side navigation bar, select Cases.
-
Select the ADD INTEGRATION button.
-
Select GitHub Issues.
-
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.
-
If you have a GitHub Enterprise account, in the Provide GitHub Enterprise URL box, type the URL for the account. This is the URL you use to access the home page for your GitHub account. An example is
https://github.mycompany.com
. -
In the Provide your personal access token box, paste the token you copied from GitHub in the steps above.
-
To close a case in Mondoo when the corresponding GitHub issue closes, enable Automatically close cases.
-
To create a case and a corresponding GitHub issue when an asset becomes more exposed to attack, enable Create drift issues in this integration and enter the GitHub organization and repository where you want to create new issues. To learn more, read Automatically create cases on drift.
-
Select the CREATE INTEGRATION button.