> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/ox-code/scanning/ox-ide-integrations/ox-ide-extension-for-visual-studio.md).

# OX IDE Extension for Visual Studio

## About OX IDE Extension for Visual Studio

The OX IDE Extension for Visual Studio detects security issues in your code directly within Microsoft Visual Studio. It connects to the OX Security platform, allowing you to run scans, review detected issues, and access remediation recommendations without leaving your IDE.

Each detected issue is linked to the affected code, helping you locate and resolve security issues during development.

## Supported IDEs

Visual Studio 2022 and later, including Community, Professional, and Enterprise editions.

## Prerequisites

Before installing the extension, make sure you have:

* Visual Studio 2022 or later.
* An OX Security account with API access.
* An OX API key. For more information, see [Creating API keys](https://docs.ox.security/admin-settings/creating-api-keys.md).

## Step 1: Install the OX IDE Extension

You can install the extension from the Visual Studio Marketplace or manually using a VSIX file.

### Installing from Visual Studio Marketplace

**To install the extension:**

1. Open Visual Studio.
2. Go to **Extensions > Manage Extensions**.
3. Select **Browse**.
4. Search for **OX Security**.
5. Select the OX Security extension and click **Install**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-eb7aac68dff2e8a151ede74cab750cf61f9498c3%2F1.%20marketplace_installation.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

6. Close Visual Studio to allow the VSIX Installer to complete the installation.
7. If prompted, click **Modify**.
8. Restart Visual Studio.

After installation, the OX Security extension is available in Visual Studio.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-1dad0da017e931bde4e49be9ac4c5a884c9d3fb0%2F2.plugin_installed.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### Alternative: Manual installation

If the extension is not available through the Visual Studio Marketplace, install it manually using a VSIX file.

**To install the extension manually:**

1. Download the OX Security extension `.vsix` file.
2. Close Visual Studio.
3. Double-click the downloaded `.vsix` file.
4. In the VSIX Installer, click **Install**.
5. Start Visual Studio.

## Step 2: Configure the extension

Connect the extension to your OX Security environment using an API key.

**To configure the extension:**

1. In Visual Studio, go to **Extensions > OX Security**.
2. Set the **API Host** to your OX Security environment.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-6f760c807b2dd8e2ea4d71e5fdcacd1a28b73844%2F3.set_api_host.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

3. Enter your OX API key.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-d6c2123895ccd99ba8c8074f248ce9e32c833b54%2F4.set_api_key.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

4. (Optional) Configure additional settings, such as telemetry.
5. Select **Save**.

The extension is now ready to scan your code.

## Step 3: Run a security scan

Run a security scan to identify security issues in your code directly from Visual Studio.

To run a scan:

1. Open your project in Visual Studio.
2. In the **OX Security** area, click **Scan**.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-f5b53a7e21a30f9b03610dc1e293ea2a0c54f34a%2F5.run_scan.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

The scan starts, and the results appear in the OX Security extension when the scan completes.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-0f4c1a49b6febd5a471991db79ae3242873b7945%2F6.scan_results.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

## Step 4: Review scan results

The OX Security extension displays detected security issues and provides information to help you investigate and remediate them.

Each issue includes the following information:

| Field          | Description                                |
| -------------- | ------------------------------------------ |
| Severity       | The severity level of the detected issue.  |
| Description    | A summary of the detected security issue.  |
| Category       | The category of the security issue.        |
| Code reference | A reference to the affected code line.     |
| Suggested fix  | Recommendations for remediating the issue. |

**To review an issue:**

1. In the scan results, select the issue you want to investigate.
2. Review the issue details and remediation recommendations.
3. Use the code reference to navigate to the affected code in Visual Studio.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-ba369c84092ae261efb75b1a18650fd3b0e99d1e%2F7.issue_card.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>


---

# 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.ox.security/ox-code/scanning/ox-ide-integrations/ox-ide-extension-for-visual-studio.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.
