# Guardrails Management

### Overview

**Guardrails Management** in Xygeni provides a centralized interface to define, configure, and enforce [**security guardrails**](https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/guardrails) for projects.\
Guardrails are logic-based policies (written in the **XyFlow Guardrail DSL**) that determine how the Xygeni scanner behaves when certain conditions are met—such as failing a build when a *critical issue* or *new vulnerability* is detected. This feature ensures automated compliance enforcement and consistent security posture across projects.

### Guardrails Management Interface

To acces the **Guardrails Management tab** go to **Settings → Guardrails Management**.

The main panel lists all existing guardrails and their current status. You can create, edit, or delete guardrails directly from this page.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FJW1LfnYulRehncQVO6c4%2Fimage.png?alt=media&#x26;token=9c744a0e-2d48-4911-a141-13495d438e59" alt=""><figcaption></figcaption></figure>

| Column                  | Description                                                                               |
| ----------------------- | ----------------------------------------------------------------------------------------- |
| **Guardrail Name**      | The unique name assigned to the guardrail definition.                                     |
| **Status**              | Indicates whether the guardrail is currently *Enabled* or *Disabled*.                     |
| **Associated Projects** | Lists the projects to which this guardrail applies. Hover or click to view the full list. |

### Creating a Guardrail

To create a new guardrail, click on the ***New Guardrail*** button at the top right of the interface. This will open a slide where you can configure a new guardrail:

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FLlD6StU4wrwNeB6KJZkH%2Fimage.png?alt=media&#x26;token=668e9fd0-e4a2-45f1-a3f0-9f72e6b6b7bd" alt=""><figcaption></figcaption></figure>

| Field            | Description                                                                                                                                                                                                                                                          |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**         | Enter a unique name for your guardrail (e.g., `Block Critical Issues`).                                                                                                                                                                                              |
| **Status**       | Choose between: **Enabled** — activates the guardrail immediately.  **Disabled** — saves the guardrail without applying it.                                                                                                                                          |
| **Apply From**   | Defines application scope: **Wildcard** — applies to all projects matching the specified wildcard. **Projects** — limits to specific projects selected manually.                                                                                                     |
| **Set Wildcard** | Specify a matching pattern (e.g., `*prod*`, `*backend*`) if **Wildcard** is selected.                                                                                                                                                                                |
| **Set Project**  | Specify what projects you desire to apply the guardrail to.                                                                                                                                                                                                          |
| **Editor**       | Code area for defining guardrail logic using the [**XyFlow Guardrail Syntax**](https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/guardrails#guardrail_convention). Syntax highlighting is supported. You may also upload a guardrail as a file directly. |

After configuring your guardrail, click on **Create** to complete the setup.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FuFazB3w03lI4TZADYq0y%2Fimage.png?alt=media&#x26;token=5159a41f-002d-4228-af7d-1dc0f04b8cdc" alt=""><figcaption></figcaption></figure>

### Modifying and Removing a Guardrail

From this interface you can also modify existing guardrails by selecting the <img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FngvFQ3YsLR1S3A5nbcp3%2Fimage.png?alt=media&#x26;token=aee79b89-70d0-442c-a6da-51925bc8b209" alt="" data-size="line"> edit button for a specific guardrail. As well as remove a guardrail completely by selecting the <img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FqBfNCiHhjuaaw83pqSqq%2Fimage.png?alt=media&#x26;token=21ebbe4e-8d45-4fb5-bf41-759837992e46" alt="" data-size="line"> delete button.

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2FB7QjcjYDk4wdq80Gqpun%2Fimage.png?alt=media&#x26;token=b354b73b-14ae-4a8b-bc51-e1b8486f23f9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more information about guardails please visit the [Guardrail Documentation](https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/guardrails).
{% endhint %}
