Skip to main content
Install the CLI, pass your licence as an environment variable, and run iris gate as your quality gate step. There is no browser step, no interactive login, and nothing persisted on the runner. Analysis runs on your own infrastructure, so your code never leaves it.

Exit codes

Use exit codes to control pipeline behaviour. iris gate follows the same conventions as all other Iris Code commands:

Setting IRIS_LICENCE_TOKEN

Add your licence key as a secret in your CI provider settings, then expose it as the IRIS_LICENCE_TOKEN environment variable in the step that runs Iris Code. The CLI checks this variable before reading the credentials file, so no iris auth login step is needed on runners.
iris secrets and iris security both run without any authentication at all. Use them for a free CI scan that requires no licence - they work on any runner regardless of IRIS_LICENCE_TOKEN.

GitHub Actions

The example below shows a minimal iris gate step. For the full workflow including branch protection rules and threshold configuration, see the GitHub Actions guide.
For inline PR annotations, use iris gate . --format github (added in v1.6.0). See the full guide at /enforcement/github-actions.
To add free secrets and security smell scans that need no licence, include these steps independently:

Gating on dependency CVEs

Use iris cve (Pro) as a separate dependency gate. It runs the same scan as iris deps but exits 1 only when an advisory at or above the chosen severity is found, so low-severity noise never turns the pipeline red:
See the command reference for severity levels and exit codes.

Telling the team in Slack

A pipeline that only writes to the build log gets read by whoever opened the build log. Set IRIS_SLACK_WEBHOOK as a protected CI secret and the outcome lands in a channel instead:
The message is built and sent by your own runner and never passes through Iris servers, so it can name the failing files. It stays quiet on a passing run unless you add --slack-on always, and a Slack outage can never change the exit code. See Slack notifications for the full setup.

GitLab CI

Generic shell

For any CI environment that runs arbitrary shell scripts:
iris gate has no threshold flag - set minHealthScore (and any gateMax* limits) in .irisconfig.json instead. See .irisconfig.json for the full reference.
Pair iris gate (Pro) with iris secrets (free) for layered coverage - gate blocks low-quality code, secrets scan catches leaked credentials on every push regardless of licence status.