> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytebase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Risk Center

The **Risk Center** (**CI/CD > Risk Center**) shows how Bytebase evaluates the risk level of database changes.

Bytebase automatically assigns one of three risk levels — **High**, **Moderate**, or **Low** — to each database change. Currently, the risk level is determined purely based on the SQL statement types, with more sophisticated analysis planned.

**Current Risk Level Assignment**

| Risk Level | Statement Types |
| - | - |
| **High** | `DROP_DATABASE`, `DROP_TABLE`, `DROP_SCHEMA`, `TRUNCATE` |
| **Moderate** | `DELETE`, `UPDATE`, `ALTER_TABLE`, `DROP_INDEX` |
| **Low** | Everything else |

If a change contains multiple statements, Bytebase takes the highest risk level found across all statements.

## Usage

### Custom Approval

> [!TIP]
>
> Custom Approval is mostly used by [UI workflow](https://docs.bytebase.com/change-database/change-workflow.md#ui-workflow). If you use [GitOps workflow](https://docs.bytebase.com/change-database/change-workflow.md#gitops-workflow), we recommend you to configure approval in the PR/MR process.

Risk levels are available as the `risk_level` variable when defining [custom approval flows](https://docs.bytebase.com/change-database/approval.md). You can use conditions like:

```text theme={null}
risk_level == "HIGH"
risk_level == "MODERATE" && resource.environment_id == "prod"
```

### SQL Review

[SQL review](https://docs.bytebase.com/sql-review/review-policy.md) 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](https://mintcdn.com/dbx/qQbrvk6s9M9FT8y7/content/docs/administration/risks/github-actions-risk.webp?fit=max\&auto=format\&n=qQbrvk6s9M9FT8y7\&q=85\&s=ed661d8e19d63ac18e90caac75eb6609)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.