Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Risk Center
feature_name: RISK_CENTER
title: Risks
feature_name: RISKS
---

In **Settings > Risk Center**, you can define different risk levels for each operation types ([DML, DDL, Create Database](/change-database/change-workflow/), [Request Query](/security/database-permission/request/), [Request Export](/security/database-permission/export/)) with custom rules.
In **Settings > Risks**, you can define different risk levels for each operation types ([DML, DDL, Create Database](/change-database/change-workflow/), [Request Query](/security/database-permission/request/), [Request Export](/security/database-permission/export/)) with custom rules.

Once an operation matches the risk conditions, it will be assigned to the corresponding risk level you've defined.
If an operation matches more than one risk levels, the highest level will be used.
Expand All @@ -20,15 +20,15 @@ Custom Approval is mostly used by [UI workflow](/change-database/change-workflow

You can configure different [custom approval flows](/administration/custom-approval) for each operation types and risk levels.

![ddl-dml](/content/docs/administration/risk-center/ddl-dml.webp)
![ddl-dml](/content/docs/administration/risks/ddl-dml.webp)

![request-query](/content/docs/administration/risk-center/request-query.webp)
![request-query](/content/docs/administration/risks/request-query.webp)

### SQL Review

[SQL review](/sql-review/overview/) returns the associated risk level for the checked SQL statement. Bytebase GitHub action can also surface the risk level under a [PR](https://github.com/bytebase/example-gitops-github-flow/pull/6#issuecomment-2731413296).

![sql-review](/content/docs/administration/risk-center/github-actions-risk.webp)
![sql-review](/content/docs/administration/risks/github-actions-risk.webp)

## Configuration

Expand All @@ -38,7 +38,7 @@ Click **Add rule** to create a new risk rule.

Name the rule so that you may know what it cares about. Select the operation type of rule. The **Risk** can be defined as **High**, **Moderate** or **Low**.

![basic-info](/content/docs/administration/risk-center/basic-info.webp)
![basic-info](/content/docs/administration/risks/basic-info.webp)

### Condition

Expand All @@ -47,12 +47,12 @@ Configure the condition of the rule. You may use a combination of conditions and
- Condition: An expression with **Factor**, **Operator** and **Value(s)**. For example, the condition "Environment ID == prod" will match issues executed in the "prod" environment.
- Condition group: A collection of conditions connected by operators "And" and "Or".

![condition](/content/docs/administration/risk-center/condition.webp)
![condition](/content/docs/administration/risks/condition.webp)

### Templates

A template is a system preset example of useful conditions that might be frequently used.

Click **View** to view the detailed condition template. And click **Load** to load the template into your rule.

![templates](/content/docs/administration/risk-center/templates.webp)
![templates](/content/docs/administration/risks/templates.webp)
4 changes: 2 additions & 2 deletions mintlify/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"group": "General",
"pages": [
"change-database/webhook",
"change-database/risk-center",
"change-database/risks",
"change-database/settings"
]
}
Expand Down Expand Up @@ -294,7 +294,7 @@
"tutorials/first-schema-change",
"tutorials/deploy-schema-migration",
"tutorials/data-rollback",
"tutorials/risk-center-best-practice",
"tutorials/risks-best-practice",
"tutorials/batch-change-with-database-group",
"tutorials/sql-review-gui",
"tutorials/how-to-move-schema-change-from-test-to-prod",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Go to **Environments** > **Prod**, Find **Rollout policy** section, and choose *

![bb-custom-approval](/content/docs/tutorials/share/bb-custom-approval.webp)

1. Go to **CI/CD** > **Risk Center**. Click **Add rule** and click **Load** for the first template. Click **Add**.
1. Go to **CI/CD** > **Risks**. Click **Add rule** and click **Load** for the first template. Click **Add**.

![bb-risk-center-ddl-high](/content/docs/tutorials/share/bb-risk-center-ddl-high.webp)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This tutorial will walk you through how to create custom approval flows based on

<Tip>

To learn the best practice, check out [Risk Center Best Practice](/tutorials/risk-center-best-practice/).
To learn the best practice, check out [Risks Best Practice](/tutorials/risks-best-practice/).

</Tip>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ In Bytebase **Enterprise Plan**, you can request a JIT access to the production

![bb-custom-approval](/content/docs/tutorials/just-in-time-database-access-amazon-aurora/bb-custom-approval.webp)

1. Click **CI/CD** > **Risk Center** on the left sidebar. Define a High risk policy for `Request Querier Role` which triggers when the environment is `Prod`.
1. Click **CI/CD** > **Risks** on the left sidebar. Define a High risk policy for `Request Querier Role` which triggers when the environment is `Prod`.

![bb-risk-center](/content/docs/tutorials/just-in-time-database-access-amazon-aurora/bb-risk-center.webp)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ In Bytebase **Enterprise Plan**, you can request a JIT access to the production

![bb-custom-approval](/content/docs/tutorials/just-in-time-database-access-part1/bb-custom-approval.webp)

1. Click **CI/CD** > **Risk Center** on the left sidebar. Define a High risk policy for `Request Querier Role` which triggers when the environment is `Prod`.
1. Click **CI/CD** > **Risks** on the left sidebar. Define a High risk policy for `Request Querier Role` which triggers when the environment is `Prod`.

![bb-risk-center](/content/docs/tutorials/just-in-time-database-access-part1/bb-risk-center.webp)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ terraform apply

#### Risk Policies

1. Go to **CI/CD > Risk Center** to view risk policies.
1. Go to **CI/CD > Risks** to view risk policies.

![risks](/content/docs/tutorials/manage-general-settings-with-terraform/bb-risks.webp)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Risk Center Best Practice
title: Risks Best Practice
author: Cayden
updated_at: 2025/04/08 16:15
tags: Tutorial
Expand Down
2 changes: 1 addition & 1 deletion src/lib/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const FEATURES = {
SYNCHRONIZE_SCHEMA: 'Synchronize schema between databases',
BATCH_CHANGE: 'Batch change',
CUSTOM_APPROVAL: 'Custom approval workflow',
RISK_CENTER: 'Risk Center',
RISKS: 'Risks',

//Not in the pricing page
DRIFT_DETECTION: 'Schema drift detection',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pricing-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PRICING_PLANS = new Map([
['ONLINE_SCHEMA_CHANGE', 'PRO'],
['BATCH_CHANGE', 'PRO'],
['CUSTOM_APPROVAL', 'ENTERPRISE'],
['RISK_CENTER', 'ENTERPRISE'],
['RISKS', 'ENTERPRISE'],

//Not in the pricing page
['DRIFT_DETECTION', 'ENTERPRISE'],
Expand Down