-
Notifications
You must be signed in to change notification settings - Fork 0
Automation (remediation) documentation #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d885c62
3348b3b
3fb8473
56ce566
282ac6c
9e027b6
8f36460
8f6ba8b
4fa3830
f38857f
5cbdafe
effcee9
70cdaf0
6eeaedd
ba4f912
c50766a
fa8f40c
60fc525
1d6898c
e2a357e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| title: "Automation credits" | ||
| description: "Understand how you buy automation credit, how each run deducts them, and how auto top-up keeps your balance stocked." | ||
| --- | ||
|
|
||
| [Automations](/platform/automations/overview) run on shared organization automation credits. Every [remediation](/platform/automations/remediation) run, whether triggered manually from a finding or by an automation, deducts credits based on what the run costs when it completes. | ||
|
|
||
| Automation credits are organization-wide. They are separate from Code Review seats and your Whitebox Scan credits. | ||
|
|
||
| ## How credits work | ||
|
|
||
| <Steps> | ||
| <Step title="Keep a balance"> | ||
| <Tip> | ||
| All organizations with an active [Code Review](/code-review/overview) | ||
| subscription start with $50 in automation credits. | ||
| </Tip> | ||
| Buy credits from **Billing**, or turn on auto top-up to keep the balance above | ||
| a threshold you set. | ||
| </Step> | ||
| <Step title="Runs check the balance"> | ||
| A remediation run only starts while the organization has credits. When the | ||
| balance runs out, new runs don't start and the Billing page shows that | ||
| automations are paused. | ||
| </Step> | ||
| <Step title="Runs deduct on completion"> | ||
| Each run's cost is deducted from the balance once, when the run completes. | ||
| Costs vary with the size of the run. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## Buy credits | ||
|
|
||
| Organization **Owners** can buy automation credits from **Billing**. A saved payment method is required; if the organization has none, add one first. | ||
|
|
||
| <Steps> | ||
| <Step title="Open Billing"> | ||
| Go to **Billing** in the Hacktron dashboard and find your automation credit | ||
| balance. | ||
| </Step> | ||
| <Step title="Choose an amount"> | ||
| Select **Buy credits**, enter the credit amount, and review the price shown. | ||
| </Step> | ||
| <Step title="Complete checkout"> | ||
| Complete any required card authentication (such as 3D Secure). The purchased | ||
| credits are added to the organization balance after the charge succeeds. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| The Billing page shows the credit balance and recent activity: purchases, run deductions, and grants. | ||
|
|
||
| ## Auto top-up | ||
|
|
||
| Auto top-up buys credits automatically when the balance drops below a threshold, so yourautomations keep running without manual purchases. | ||
|
|
||
| Set it up on the Billing page under your automation credit balance: | ||
|
|
||
| - **Trigger**: the balance that starts a top-up. | ||
| - **Target**: the balance the top-up buys back up to. Your target must be above the trigger. | ||
| - **Monthly limit**: an optional cap on how many credits auto top-up may buy per month. | ||
|
|
||
| Auto top-up requires a saved payment method and charges the card on file without an interactive checkout. If a top-up charge fails, your automations stay paused until the balance is topped up manually or the card issue is resolved. | ||
|
|
||
| ## Related docs | ||
|
|
||
| <Columns cols={2}> | ||
| <Card title="Remediation" icon="wrench" href="/platform/automations/remediation"> | ||
| Trigger an AI-generated fix for a finding. | ||
| </Card> | ||
|
|
||
| <Card title="Automations" icon="bolt" href="/platform/automations/overview"> | ||
| Auto-remediate qualifying findings and notify your team. | ||
| </Card> | ||
| </Columns> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| --- | ||
| title: "Automations" | ||
| description: "Act on findings automatically. Set the rules for which findings qualify, and Hacktron fixes them the moment they're reported, then alerts your team. " | ||
| --- | ||
|
|
||
| Automations act on findings for you. Configure which findings qualify, and when a matching finding is reported, Hacktron fires the automation: its **actions** run against the finding, and its **notifiers** alert your team over Slack or email. | ||
|
|
||
| <Tip> | ||
| **Autofix** is the first available action — it starts a [remediation](/platform/automations/remediation) run that fixes the finding — and we'll expand automations with more actions over time. | ||
| </Tip> | ||
|
|
||
| Automations live under **Automations** in the dashboard sidebar. Organization **Admins** create and manage automations; other members can view them. | ||
|
|
||
| ## Create an automation | ||
|
|
||
| <Steps> | ||
| <Step title="Create"> | ||
| On the **Automations** page, select **New automation** and give it a name. | ||
|
|
||
|  | ||
| </Step> | ||
| <Step title="Pick environments"> | ||
| Choose the repositories and [applications](/platform/context/applications) the automation covers. You can limit each entry to specific branches (up to two) or leave the branch selection empty to cover all branches. | ||
|
|
||
|  | ||
| </Step> | ||
| <Step title="Configure settings"> | ||
| On the **Settings** tab, set: | ||
|
|
||
| - **Triggers**: when the automation runs, for example a PR scan finding, it's narrowed by the rules you set, the severity levels that qualify, and scope rules that limit it to specific repositories or applications. | ||
| - **Actions**: what the automation does. **Autofix** starts a [remediation](/platform/automations/remediation) run for the matching finding. | ||
| - **Notifiers**: who hears about a run, whether it's a Slack channel, email recipients from your organization's members, or both. | ||
|
|
||
|  | ||
| </Step> | ||
| <Step title="Save"> | ||
| Select **Save**. An automation needs at least one environment, one trigger, and one action to run. Incomplete automations show an **Incomplete** badge and cannot be enabled. A save that removes required configuration disables the automation until it is complete again. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| ## When an automation fires | ||
|
|
||
| When a new finding is reported, an enabled automation fires if the finding matches its trigger, severity rules, scope rules, and one of its environments (including any branch limits). Firing runs the automation's actions — an **Autofix** action starts a remediation run, which uses [automation credits](/platform/automations/credits) — and sends your notifications. | ||
|
|
||
| Each finding is fixed at most once, a finding that already has a remediation run won't fire automations again. | ||
|
|
||
| <Info> | ||
| A repository with a `remediation` block in its [`.hacktron/config.yaml`](/code-review/config#auto-remediate-findings) follows that block exclusively, including `auto: false`, which turns auto-remediation off for that repository. Organization automations apply only to repositories without a `remediation` block. | ||
| </Info> | ||
|
|
||
| ### Notifications | ||
|
|
||
| - **Slack**: Hacktron posts a message to your channel linking the finding. The Hacktron bot joins public channels automatically; for a private channel, invite the bot to the channel first. | ||
| - **Email**: Hacktron emails the recipients you choose from your organization's members. | ||
|
|
||
| Notifications are best-effort, if one fails to send, it never blocks the remediation run itself. | ||
|
|
||
| ## Run history | ||
|
|
||
| The **Run history** tab lists every run your automation has fired, with its status, the environment it matched, and the credits it used. Runs matched through an application are attributed to that application. | ||
|
|
||
| Run statuses mirror [remediation outcomes](/platform/automations/remediation#outcomes): **Running**, **Success**, **No fix needed**, **False positive**, and **Failed**. You can filter the history by status and search it. | ||
|
|
||
| <img | ||
| src="/images/run-history.png" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The light-mode run history screenshot points to Useful? React with 👍 / 👎. |
||
| alt="Image" | ||
| title="Image" | ||
| lightAlt="Run history" | ||
| darkAlt="Run history" | ||
| className="dark:hidden" | ||
| /> | ||
| <img | ||
| src="/images/image.png" | ||
| alt="Image" | ||
| title="Image" | ||
| lightAlt="Run history" | ||
| darkAlt="Run history" | ||
| className="hidden dark:block" | ||
| /> | ||
|
|
||
| ## Related docs | ||
|
|
||
| <Columns cols={2}> | ||
| <Card title="Remediation" icon="wrench" href="/platform/automations/remediation"> | ||
| How a remediation run works and where the fix lands. | ||
| </Card> | ||
|
|
||
| <Card title="Automation credits" icon="coins" href="/platform/automations/credits"> | ||
| How runs are billed and how to keep a balance with auto top-up. | ||
| </Card> | ||
| </Columns> | ||
Uh oh!
There was an error while loading. Please reload this page.