> 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-analysis.md).

# AI Code Analysis

AI Code Analysis reasons across your source code to identify security and data-exposure risks that need context across files, services, or repositories.

Choose the audit type that matches your goal:

<table data-view="cards"><thead><tr><th>Audit type</th><th>What it helps you find</th><th data-hidden data-card-target data-type="content-ref">Target</th></tr></thead><tbody><tr><td><strong>Code Security Audit</strong></td><td>AI SAST: Find real attack paths and validated security risks in code with AI.</td><td><a href="/pages/kZRWK6NswIlL0dAmeNea">/pages/kZRWK6NswIlL0dAmeNea</a></td></tr><tr><td><strong>Data Exposure Audit</strong></td><td>DSPM: Find sensitive data flows and data exposure risks in code with AI.</td><td><a href="/pages/Io2yJZC8MsZHFIvz5M38">/pages/Io2yJZC8MsZHFIvz5M38</a></td></tr></tbody></table>

## How it works

Both audit types use connected repositories. Code Security Audit doesn't require a staging environment or live target, and Data Exposure Audit doesn't access your data stores. Findings include code-based evidence and remediation guidance.

* **Agentic analysis:** Aikido uses multiple agents to investigate your code, follow relevant context across files and services, and validate potential findings.
* **Models and harnesses matched to the task:** Aikido selects the models and analysis harness that best fit each stage of the analysis, balancing the depth of analysis with the resources it uses.
* **Confirmed cost before you start:** The pricing step shows the exact credit total for your selected repositories before you launch an analysis. Once confirmed, that total is fixed for the analysis.

For testing a running application, use [Aikido Pentest](/pentests/aikido-pentest.md). For fast, continuous checks of known vulnerability patterns, use [SAST](/code-scanning/scanning-practices/sast-by-aikido-supported-languages-and-security-focus.md).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/ai-code-analysis/ai-code-analysis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
