Setup Overview
Step 1: Create a Slack App
- Go to api.slack.com/apps
- Click Create New App
- Select From scratch
- Enter app name:
Panguard Security(or your preference) - Select your Workspace
- Click Create App
Step 2: Configure Bot Permissions
- Navigate to OAuth & Permissions in the left sidebar
- Scroll to the Scopes section
- Under Bot Token Scopes, add:
| Scope | Purpose |
|---|---|
chat:write | Send messages to channels |
chat:write.public | Send to public channels the bot has not joined |
files:write | Upload PDF reports and attachments |
- Click Install to Workspace at the top
- Click Allow to authorize
Step 3: Get the Bot Token
After installation, the page displays your Bot User OAuth Token:Step 4: Get the Signing Secret
- Navigate to Basic Information in the left sidebar
- Find the App Credentials section
- Click Show next to Signing Secret
- Copy and save the value
Step 5: Create a Notification Channel
- Create a Slack channel (e.g.,
#security-alerts) - Invite the bot: type
/invite @Panguard Securityin the channel
Step 6: Configure Panguard Chat
- Bot Token — the
xoxb-...token from Step 3 - Signing Secret — from Step 4
- Default Channel — e.g.,
#security-alerts
Test the Connection
Bot not posting to channel
Bot not posting to channel
Ensure the bot has been invited to the target channel with
/invite @Panguard Security.Permission errors
Permission errors
Verify the bot has
chat:write scope. Check the app’s OAuth & Permissions page.Invalid token format
Invalid token format
The token must start with
xoxb-. If it starts with xoxp-, you are using a user token instead of a bot token.Interactive Buttons (Optional)
Enable interactive threat response buttons in Slack notifications (e.g., “Block Source”, “View Details”):- In Slack App settings, navigate to Interactivity & Shortcuts
- Enable Interactivity
- Set the Request URL to:
https://your-server.com/webhook/slack - Click Save Changes
Interactive buttons require your Panguard instance to have a publicly accessible URL. For local development, tools like ngrok can provide temporary public URLs.
Block Kit Message Format
Slack notifications use Block Kit for rich formatting:- Header — severity-colored indicator with threat title
- Context — timestamp, source IP, confidence score
- Details — structured fields with rule name, MITRE ATT&CK ID, affected resource
- Actions — interactive buttons (when interactivity is enabled)