Secure Slack Workspaces with Mondoo
Continuously scan a Slack workspace for misconfigurations and security issues.
To connect a Slack workspace to Mondoo, you create a Slack API token for Mondoo and add it to a Slack integration in your space. Mondoo keeps the assessment current as the workspace changes.
Before you begin
- Editor or Owner access to the Mondoo space, or another role with permission to add integrations. To see every role, read Roles and permissions.
- A Slack account in the workspace that can create and install apps. Members can install apps by default. If the workspace requires app approval, a Workspace Owner or app manager must approve the app before you can install it.
- For the optional Enterprise Grid scopes, an org admin or owner who can install the app across the Enterprise Grid organization.
Create a Slack API token for Mondoo
Mondoo authenticates to Slack with a user OAuth token from a new Slack app.
-
On the Slack API website, go to Your Apps and select Create an App.

-
Select From scratch.

-
Name the app (for example,
mondoo-security), pick the workspace to secure, and select Create App.
-
Under Add features and functionality, select Permissions.

-
Scroll to Scopes > User Token Scopes and add each of these scopes (select Add an OAuth Scope for each):
channels:readgroups:readim:readmpim:readteam:readusergroups:readusers:read
You can also add these optional scopes. The Mondoo Slack Team Security policy doesn't use any of them, and Mondoo scans everything else without them:
admin: the workspace access log (slack.accessLogs)admin.apps:read: on an Enterprise Grid organization, approved apps, restricted apps, and pending app requests (slack.approvedApps,slack.restrictedApps, andslack.appRequests)admin.skills:read: on an Enterprise Grid organization, Slackbot skills owned by the organization (slack.slackbotSkills)
The two Enterprise Grid scopes only work in a token from an org admin or owner who installs the app across the whole Enterprise Grid organization, not in a single workspace.

-
Scroll up to OAuth Tokens for Your Workspace and select Install to Workspace, then Allow to confirm.

-
Copy the User OAuth Token. You need it in the next section.

Add a Slack integration
In the Mondoo App, navigate to the space where you want to add the integration. Some integrations can also be added once at the organization level to cover every space with one connection. To see which ones, read Set up integrations once for your whole organization.
In the space's side navigation bar, select Integrations. In the top right, select INSTALL. On the Install Integration page, find the integration you want by browsing a category or searching by name:
-
Under SaaS Security, select Slack.

-
In Integration Name, enter a name that identifies the workspace.
-
In Slack API Token, paste the User OAuth Token you copied.
-
(Optional) Under Enable security policies (optional), enable the policies you want Mondoo to score your Slack workspace against.
-
(Optional) Under Set Annotations (optional), select + ADD ANNOTATION to add key-value pairs that Mondoo applies to every asset this integration discovers. To learn more, read Annotate assets.
-
Select START SCANNING.
Verify the integration
When you select START SCANNING, Mondoo starts the first scan and opens the integration's page. Status shows Active once the scan is queued, and Most Recent Activity lists each scan and any errors it reports.

When the scan finishes, a Slack Team asset for the workspace appears in the space. To review it, navigate to the space and select Inventory. To learn what each integration status means, read Integration status and troubleshooting.
Troubleshoot
| Message | Cause | Fix |
|---|---|---|
auth.test rejected the token when you create the integration | Slack refused the token, for example because it was mistyped or isn't a User OAuth Token. | Copy the User OAuth Token (it starts with xoxp-) under the app's OAuth Tokens for Your Workspace and try again. |
token_revoked or invalid_auth in Most Recent Activity | The token stopped working, for example because the app was uninstalled or the token was revoked. | Reinstall the app, copy the new token, and rotate it in Mondoo. |
| Scans are paused at the top of the integration page | The integration's credential was rejected by Slack. | Rotate the API token. |
ended in a scan error, so their results are missing in Most Recent Activity | The token lacks one of the user token scopes, so Slack refuses some of what Mondoo reads. | The message names the most common error. Add the missing scopes, reinstall the app, and rotate the new token into Mondoo. |
Manage your integration
To open the integration, navigate to the space, select Integrations > Slack, and choose the integration.
Rotate the API token
How you replace the token depends on how Mondoo stored it when the integration was created. Integrations added by someone with permission to create and view credentials store the token as a credential. Older integrations, and integrations added by someone without that permission, keep the token on the integration.
-
If the integration uses a credential: The integration detail page shows a Credential section, and the edit form shows Managed by a credential in place of the token box. Select the credential's name to open it, then select Rotate and enter the new token. Every integration that uses the credential switches to the new token. To learn more, read Manage Integration Credentials.

-
If the integration stores its own token: Select the pencil icon. In Slack API Token (optional update), enter the new token, then select SAVE CHANGES. Leave the box empty to keep the existing token.
Next steps
- Explore your asset inventory.
- Assess and improve your security to review and prioritize your findings.
- Mondoo Slack Resource Pack Reference
Last updated on