What lands in the channel
--slack-on always if you would rather have the confirmation.
What it does not send
File names, scores, rule names and counts. Nothing else. It does not include your code, the text of a finding, the value of a detected secret (masked or otherwise), or the line it appeared on. When more than ten files break the same rule, the message shows ten and states how many were omitted rather than silently shortening the list. Iris Code builds the message on your machine and posts it directly to Slack. It never passes through our servers, which is the reason it can name your files at all. If we relayed it, we would be collecting your file paths, and paths reveal product names, client names and unreleased features. That is also why the webhook URL cannot be set in.irisconfig.json. That file is committed to your repository, so anyone able to open a pull request could redirect your team’s file paths to a URL of their own.
Setting it up
1
Make the channel
Create the channel you want reports in, say
#code-health. Slack’s picker only shows channels that already exist.2
Create the Slack app
https://hooks.slack.com/services/.Private channel? Also run /invite @Iris Code in it.3
Test it
4
Add the secret
Add
IRIS_SLACK_WEBHOOK as a secret in your CI, with the webhook URL as the value. Nothing else changes.- GitHub Actions
- GitLab CI
- Bitbucket
- Anywhere else
Settings → Secrets and variables → Actions → New repository secret. Then pass it to the step you already have:If you used Iris Code: Add GitHub Actions Workflow, that line is already in your file, commented out.
Making it look like yours
The name and picture on the message come from the Slack app you made, not from us. Change them at Basic Information → Display Information: the app name, a square icon of at least 512x512, and a short description.
Commands and flags
IRIS_SLACK_WEBHOOK is the only place Iris reads the webhook, and it works with both iris gate and iris check. The URL is a posting credential, so Iris never accepts it as a command-line argument or reads it from .irisconfig.json; that keeps it out of shell history, process listings and committed files.
Behaviour worth knowing
A Slack outage cannot affect your build. If the message fails to send, Iris Code writes a single warning line to stderr and exits with the code the gate decided. A notification problem never turns a passing build red, or a failing one green. Only Slack hosts are accepted. Any URL that is nothttps://hooks.slack.com is refused, and refused before the scan runs so the error is immediate. The message contains your file paths, so a mistyped URL must not be able to send them elsewhere.
Local runs work too. You get the message, the colour, the score and the file list. File names are not clickable, because outside CI there is no commit to link them to.