> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/ai-code-analysis/ai-code-audit-overview/create-an-ai-code-audit.md).

# Create a Code Security Audit

Select Code Security Audit, choose repositories, and confirm the credit cost.

The create flow is three steps: choose **Code Security Audit**, pick the repositories, then confirm the credit cost and start.

## Prerequisites

* You need the **Manage Pentests and AI Code Analysis** [permission](/getting-started/automated-user-management/setting-roles-and-permissions.md) to create an audit. You can still open AI Code Analysis and existing assessments without it.
* At least one repository is connected. [Self-scanned repositories](/code-scanning/local-code-scanning.md) are excluded from the picker. You can pick up to 20 repositories.
* Your wallet has enough credits for the quoted cost. You can top up from inside the create flow. See [Wallet & Credits](/miscellaneous-info/wallet-and-credits.md).

## Set up the audit

Go to **AI Code Analysis**, then click **Create Audit**.

{% stepper %}
{% step %}

### Select Code Security Audit

On **Select Audit Type**, select **Code Security Audit**, then click **Continue**.

**Cancel** returns to the AI Code Analysis home.
{% endstep %}

{% step %}

### Select repositories

1. Open **Repositories** and select up to 20 connected repositories. **Continue** stays disabled until at least one repository is selected.
2. To keep a monorepo focused, click **Exclude Paths** next to a selected repository and add directories that are not part of this audit.
3. Under **Scope**, leave **Audit all selected repositories** selected, or choose **Audit specific parts only** and describe what to review. For example: "Audit the new billing flow and the services it calls."
4. **Additional Notes** are optional. Add them when context is missing from the source, such as runtime configuration, known architecture quirks, or firewall and proxy settings.

<figure><img src="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-738e8311f3af420f58e748dbfdaff91da6576561%2Fexclude-repository-paths.png?alt=media" alt="Exclude Paths button next to a selected repository"><figcaption></figcaption></figure>

{% hint style="info" %}
Exclude unrelated applications or services, not documentation, READMEs, or other non-code assets. Aikido can use those files as architectural context.
{% endhint %}

**Cancel** returns to **Audit Type**.
{% endstep %}

{% step %}

### Confirm pricing and start

Wait until the **Pricing** step shows the credit total. Your balance is in the footer. Click **Add Credits** if the wallet is short.

The card title depends on scope:

* **Full AI Code Analysis** when you audit all selected repositories.
* **Scoped AI Code Analysis** when you chose **Audit specific parts only**. The step also shows the scope you wrote.

When **Configure** appears, use it to set the depth of the audit:

* **High risk only** prioritizes the areas most likely to expose serious vulnerabilities. Some areas get less coverage, or none.
* **Recommended coverage** investigates the security-sensitive parts of your selected audit scope.
* **Deeper coverage** builds on recommended coverage with additional investigation of lower-priority areas and less common code paths or cloud resources.

The credit total updates before you start.

Click **Start Audit** to launch. Credits are charged when you click **Start Audit**.
{% endstep %}
{% endstepper %}

Aikido opens the assessment detail page. See [Track Progress and Findings](/ai-code-analysis/ai-code-audit-overview/track-progress-and-findings.md).

## FAQ

### Why is there a 20 repository cap?

The picker allows 20 repositories so the audit stays focused. If you need more in one audit, [contact support](/miscellaneous-info/contact-support.md).

### The credit estimate looks wrong, or a repository is missing

[Contact support](/miscellaneous-info/contact-support.md). Self-scanned repositories are excluded from the picker.

## Related

{% content-ref url="/pages/kZRWK6NswIlL0dAmeNea" %}
[Code Security Audit](/ai-code-analysis/ai-code-audit-overview.md)
{% endcontent-ref %}

{% content-ref url="/pages/P12625XkjR5KcYlJmjTa" %}
[Track Progress and Findings](/ai-code-analysis/ai-code-audit-overview/track-progress-and-findings.md)
{% endcontent-ref %}


---

# 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://help.aikido.dev/ai-code-analysis/ai-code-audit-overview/create-an-ai-code-audit.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.
