> ## 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.

<Expandable title="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.
</Expandable>

## Usage

### Custom Approval

<Tip>
  Custom Approval is mostly used by [UI workflow](/change-database/change-workflow/#ui-workflow). If you use [GitOps workflow](/change-database/change-workflow/#gitops-workflow), we recommend you to configure approval in the PR/MR process.
</Tip>

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

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

### SQL Review

[SQL review](/sql-review/review-policy/) 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).

<img src="https://mintcdn.com/dbx/qQbrvk6s9M9FT8y7/content/docs/administration/risks/github-actions-risk.webp?fit=max&auto=format&n=qQbrvk6s9M9FT8y7&q=85&s=ed661d8e19d63ac18e90caac75eb6609" alt="sql-review" width="927" height="664" data-path="content/docs/administration/risks/github-actions-risk.webp" />
