---
title: Automations
description: Run actions and send notifications on triggers.
url: https://www.hacktron.ai/docs/platform/automations
---

# Automations

Choose a trigger for each automation based on what you want it to do.

| Trigger | What happens |
| --- | --- |
| **New vulnerability found** | When a finding matches your rules, **Apply Remediation** can [open a fix](/docs/platform/automations/remediation). You can also send notifications on their own. |
| [**On a schedule**](/docs/platform/automations/scheduled-whitebox-scans) | **Start whitebox scan** scans each environment at the times you choose. |
| [**CVE webhook**](/docs/platform/automations/inbound-cve-webhook) | **Scan for affected code** checks the selected repositories when your system sends a CVE. Ask Hacktron to enable this trigger for your organisation. |

Automations are under **Automations** in the dashboard sidebar. Organisation **Admins** create and manage them, and other members can view them.

## Create an automation

::::steps

### Create

On the **Automations** page, select **New automation** and give it a name.

![The New Automation dialog, asking for the automation's name](https://www.hacktron.ai/shots/platform/automations/new_automation/light.8c886c34.webp)

### Pick environments

Choose the repositories and [applications](/docs/platform/context/applications) the automation covers. For **New vulnerability found**, select up to two branches per entry or leave the selection empty to match findings on any branch. For **CVE webhook**, choose one branch per repository or leave the branch field empty to check the default branch. Scheduled scans use the branches in each environment’s [scan settings](/docs/platform/automations/scheduled-whitebox-scans#create-a-scheduled-scan).

![The Environments tab, with the branch picker for one repository open and filtered to release branches](https://www.hacktron.ai/shots/platform/automations/automation_environments/light.18686a33.webp)

### Configure settings

On the **Settings** tab, set:

| Setting | What it sets |
| --- | --- |
| **Triggers** | When the automation runs, added from **Add Trigger**. An automation has one trigger. **New vulnerability found** fires on a new finding, and **Add rule** limits it to the severity levels that qualify. [**On a schedule**](/docs/platform/automations/scheduled-whitebox-scans) fires at the times you set. [**CVE webhook**](/docs/platform/automations/inbound-cve-webhook) fires when your system sends a CVE. |
| **Actions** | What the automation does, added from **Add Action**. **Apply Remediation** starts a [remediation](/docs/platform/automations/remediation) run for the matching finding. [**Start whitebox scan**](/docs/platform/automations/scheduled-whitebox-scans) is only available with **On a schedule**, and **Apply Remediation** isn't available with it. With **New vulnerability found**, the action is optional when the automation has a notifier. **CVE webhook** comes with **Scan for affected code**, its only action. |
| **Notifiers** | Who hears about a run, added from **Add Notifier**: a Slack channel, email recipients from your organisation's members, a [webhook](/docs/platform/automations/webhooks) to your own endpoint, or any mix of them. A **CVE webhook** automation's notifiers get a message when a check finishes. Findings from a check reach **New vulnerability found** automations like any other new finding. |

![The Settings tab with a trigger for Critical and High findings, an action, and a Slack notifier](https://www.hacktron.ai/shots/platform/automations/automation_settings/light.b4efacef.webp)

### Save

Select **Save changes**. An automation needs at least one environment, one trigger, and an action or a notifier to run, and a scheduled automation also needs [scan settings for every environment](/docs/platform/automations/scheduled-whitebox-scans#create-a-scheduled-scan). An incomplete automation shows an **Incomplete** badge and can't be enabled. A save that removes required configuration disables the automation until it is complete again.

::::

## When an automation fires

An automation with **New vulnerability found** fires when a new finding matches its severity rule and environment, including any branch limits, and the automation is enabled. **Apply Remediation** then starts a remediation run, which uses [automation credits](/docs/platform/automations/credits). After the action, Hacktron sends a notification. An automation with no action only sends the notification, and spends no credits.

Each finding is fixed at most once. A finding that already has a remediation run doesn't fire automations again. An automation with no action notifies you about each finding once.

### Notifications

In Slack, Hacktron posts a message to your channel with a link to the finding. The Hacktron bot joins public channels on its own. For a private channel, invite the bot first.

By email, Hacktron writes to the recipients you chose from your organisation's members.

By webhook, Hacktron sends a signed JSON `POST` to your endpoint, and retries it if your endpoint doesn't accept it. [Webhooks](/docs/platform/automations/webhooks) covers the events, how to verify them with the signing secret, and the retries.

Notifications are best-effort. If one fails to send, the remediation run goes ahead, and the other notifiers still send.

## Scheduled whitebox scans

Use **On a schedule** to repeat a whitebox scan of each configured environment. The [scheduled whitebox scans guide](/docs/platform/automations/scheduled-whitebox-scans) covers the schedule, saved scan settings, login checks, and per-scan credit limits.

## Run history

The **Run history** tab lists every run the automation has fired, with its status, the environment it matched, and the credits it used. A run matched through an application is attributed to that application.

Run statuses follow the [remediation outcomes](/docs/platform/automations/remediation#outcomes): **Running**, **Success**, **No fix needed**, **False positive**, **Fail**, and **Stopped**. You can filter the history by status and search it.

An automation with no action lists the findings it matched instead, with the [delivery status](/docs/platform/automations/webhooks#delivery-status) of each webhook.

[Scheduled scan runs](/docs/platform/automations/scheduled-whitebox-scans#run-history) show scan progress, skipped scans, and any reason a scan needs attention.

![The Run history tab, with one running run and its trigger, environment, and credits spent](https://www.hacktron.ai/shots/platform/automations/automation_run_history/light.81177b8b.webp)

## Related docs

:::tiles
- [Remediation](/docs/platform/automations/remediation): Receive fixes as pull requests.
- [Scheduled whitebox scans](/docs/platform/automations/scheduled-whitebox-scans): Repeat scans on a schedule.
- [Inbound CVE webhook](/docs/platform/automations/inbound-cve-webhook): Check your repositories for a CVE your system sends.
- [Outbound webhooks](/docs/platform/automations/webhooks): Send automation events to your own endpoint.
- [Automation credits](/docs/platform/automations/credits): Buy and spend automation credits.
:::
