# Auto-fix

Xygeni provides an Auto-Fix feature that automates the correction of SAST (Static Application Security Testing) issues. This feature can be accessed through two methods: the UI interface or the XygeniBot.

***

## 1. Xygeni AI Fix in the UI

The UI provides a streamlined, issue-by-issue approach to fixing vulnerabilities.

### How to Use:

1. **Navigate to Risks View**: After scanning your project, go to the risks view
2. **Select a SAST Vulnerability**: Choose one of the identified code vulnerabilities
3. **Click "Fix Vulnerability"**: This button appears once you've configured your integrations

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2Fgit-blob-a1594e01a18ecc13228f80bb89335a8a5766aff9%2Fautofix_slide_mark.png?alt=media" alt="" width="400"><figcaption></figcaption></figure>

4. **Review AI-Generated Fix**: Xygeni's AI agent analyzes the issue and proposes a potential fix

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2Fgit-blob-d998154e274ff19043d1b0e61d14bd657ffa6da2%2Fautofix_preview.png?alt=media" alt="" width="600"><figcaption></figcaption></figure>

5. **Open a Pull Request**: Submit the fix for review by project stakeholders through your SCM/ticketing system

<figure><img src="https://4096647782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUTz59rJLkJBjiRWAMknU%2Fuploads%2Fgit-blob-53f369cfebac917b067e26f50dd9671a50f7eb20%2Fautofix_pr.png?alt=media" alt="" width="600"><figcaption></figcaption></figure>

{% hint style="info" %}
The "Fix Vulnerability" button only appears after proper integration configuration has been completed. See [Remediation Systems](https://docs.xygeni.io/xygeni-administration/platform-administration/integrations/remediation-systems) for further information
{% endhint %}

## 2. AI Fix with XygeniBot

While the UI allows manual, one-by-one fixes, the XygeniBot enables bulk auto-remediation with advanced configuration options.

### Key Benefits:

* **Bulk Processing**: Auto-remediate all issues found within an analysis.
* **Customizable Filtering**: Configure which vulnerabilities to fix and which to skip. Set rules based on severity, language, tags or rules.
* **Customizable AI agent**: Use your own provided AI agent.

### Integration Setup

See [Xygeni Bot](https://docs.xygeni.io/scan-management/xygeni-bot) for further information.
