CentralCSP
FeaturesAlertingChannels

Slack

Deliver CentralCSP alerts to a Slack channel. Create the incoming webhook in Slack, paste the URL, and send a test message.

Last update:

A Slack channel type posts each alert as a message in one Slack channel, through a Slack incoming webhook. Setup takes a few minutes: create the webhook in Slack, paste its URL into CentralCSP, send a test.

Prerequisites

  • The website Manager role in CentralCSP.
  • Permission to install apps in your Slack workspace. Some workspaces restrict this to admins.

1. Create the incoming webhook in Slack

Slack issues webhook URLs through a Slack app. You create the app once; it can hold one webhook per Slack channel.

  1. Open api.slack.com/apps and select Create New App, then From scratch.
  2. Name the app (for example CentralCSP alerts), pick your workspace, and select Create App.
  3. In the app's settings, open Incoming Webhooks and switch Activate Incoming Webhooks on.
  4. Select Add New Webhook to Workspace, choose the Slack channel that should receive alerts, and select Allow.
  5. Copy the webhook URL. It starts with https://hooks.slack.com/services/.

Slack's own guide is at Sending messages using incoming webhooks.

The webhook URL is a secret

Anyone holding the URL can post to that Slack channel. Do not commit it or share it publicly; Slack scans for leaked URLs and revokes them, which silently stops your alerts. CentralCSP stores the URL and never returns it through the API.

2. Add the channel in CentralCSP

  1. In the dashboard, go to Alerts > Configuration > Add channel.
  2. Name the channel, choose the Slack type, and paste the webhook URL.
  3. Save.

The URL is validated as you type: it must be on hooks.slack.com with a path starting /services/, so a chat page URL or an API token pasted by mistake is rejected before you save.

3. Test the channel

Select Test on the new channel. A sample alert built from a fake CSP violation is sent immediately.

If the message does not arrive, the webhook was refused. Check that the app is still installed in the workspace and that the webhook still exists under Incoming Webhooks; a revoked or deleted webhook fails permanently, it does not recover on its own.

Posting to several Slack channels

One webhook URL posts to one Slack channel. To notify a second channel, add another webhook to the same Slack app (step 1.4), then create a second CentralCSP channel with that URL, and attach both to your rules.

Next steps

On this page