> For the complete documentation index, see [llms.txt](https://docs.xygeni.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/automatic-remediation.md).

# Automatic Remediation

Xygeni CLI provides **automatic remediation** for some of the vulnerabilities found by Xygeni Scanners. Automatic remediation is currently available for:

* Secrets (see [Secrets Auto-Remediation](/xygeni-products/secrets-security/secrets-auto-remediation.md)), where `xygeni secrets --auto-remediate` revokes the leaked secret.
* SAST vulnerabilities, IaC flaws and CI/CD misconfigurations, where `xygeni scan --auto-remediate` hands the findings to the XygeniBot, which opens pull requests with the AI-generated fixes (see [Xygeni Bot](/xygeni-products/scan-management/xygeni-bot.md)).

{% hint style="info" %}
A fix can only be proposed when the finding is located in a file of the repository, which is the file the AI agent rewrites. This is the case of IaC flaws, reported on the template or manifest where they occur, and of the CI/CD misconfigurations found in pipeline definitions, workflow files or Dockerfiles. CI/CD misconfigurations reported against the repository or the CI/CD platform itself — branch protection, organization settings, or a policy file that does not exist yet — have no file to patch, so no pull request is created for them; the dashboard offers a remediation guide instead.
{% endhint %}

Nevertheless, CLI is not the only mechanism to provide automatic remediation. For Open Source vulnerabilities, Xygeni Web UI provides a useful functionality to automatic remediation.

Please, visit [OSS Auto-Remediation](/xygeni-products/open-source-security-oss/oss-auto-remediation.md) for further information.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/automatic-remediation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
