> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/documentation/use-octoxlabs/inventories/source-codes.md).

# Source Codes

See the code repositories that your source control and code scanning adapters report, with language, activity and ownership data, and filter them with queries.

Source Code Inventory lists the code repositories that your adapters find in source control and code analysis platforms. Use it to see which repositories exist, who is active in them, which languages they use, and which ones are public, archived or stale.

Each row is one repository reported by one adapter. OctoXLabs does not merge repositories from different adapters, so the **Adapters** column of a row shows a single adapter.

{% hint style="success" %}
Available since OctoXLabs 6.0.0 (December 2025).
{% endhint %}

### Where the data comes from

The inventory is filled by adapters that provide repository data, and it is rebuilt at every discovery. The release that introduced it supported GitLab (cloud and self-hosted), GitHub, Bitbucket, SonarQube and Azure DevOps Services. Other adapters, such as Checkmarx One, Bright Security and the file-based adapters for CSV, JSON, XLSX and XML files, can also provide repositories (see File-based adapters). The full list is in the adapter pages at <https://docs.octoxlabs.com/adapters>.

Depending on the adapter, a record can include branches, commits, issues, pull or merge requests, members, contributors, languages, the README and licence files, and scanner results. To make data appear, connect one of these adapters and run a discovery. See Connect an adapter and Discovery and Aggregation.

### Open the inventory

In the left menu, click **Inventories** > **Source Codes**. The page title is **Source Code Inventory**.

The list shows the data of one discovery. Use the discovery selector next to the search box to look at an earlier discovery. The newest completed discovery is selected by default.

{% hint style="info" %}
You need the permission to view source codes to see the page and the permission to view source code details to open a record. Both are available only when your product licence includes the source codes module. See Product Licence.
{% endhint %}

### Columns

These columns are shown by default. Use **Columns** > **Edit Columns** to change them.

| Column              | Field               | What it shows                                                                                 |
| ------------------- | ------------------- | --------------------------------------------------------------------------------------------- |
| Adapters            | `Adapters`          | The adapter that reported the repository. Click it to filter the list by that adapter.        |
| Primary Key         | `PrimaryKey`        | The unique ID of the repository record. It is always shown. Click it to open the detail page. |
| Repository Name     | `RepositoryName`    | The name of the repository.                                                                   |
| Star Count          | `StarCount`         | Number of stars.                                                                              |
| Fork Count          | `ForkCount`         | Number of forks.                                                                              |
| Open Request Count  | `OpenRequestCount`  | Number of open pull or merge requests.                                                        |
| Open Issue Count    | `OpenIssueCount`    | Number of open issues.                                                                        |
| Visibility          | `Visibility`        | The visibility of the repository as reported by the platform. Click a value to filter by it.  |
| Primary Language    | `PrimaryLanguage`   | The main language of the repository. Click a value to filter by it.                           |
| Last Commit Date    | `LastCommitDate`    | When the last commit was made.                                                                |
| Last Commit By      | `LastCommitBy`      | Who made the last commit.                                                                     |
| Last Commit Message | `LastCommitMessage` | The message of the last commit.                                                               |

You can add more fields with **Edit Columns**. Useful ones include `RepositoryLink`, `WatcherCount`, `IsForked`, `ForkedFrom`, `IsArchived`, `License`, `AutoDevOpsEnabled`, `AIRelated`, `AIFrameworks`, `Tools.Names` and `Tools.Groups`, and the fields that a single adapter reports. The **Default Branch** of a repository is shown on the detail page.

Click a value in the **Adapters**, **Tags**, **Visibility** or **Primary Language** column to add that value to the query and filter the list. Double-click a cell to copy its value.

### Filter and search

Choose one of three ways to filter the list.

{% tabs %}
{% tab title="Type a query" %}
Write a query in the search box and press Enter. For example, to find repositories that are archived and still have open issues:

```
IsArchived = true AND OpenIssueCount > 0
```

The syntax is the same everywhere in OctoXLabs. See OctoXLabs Query Reference for the fields of this inventory.
{% endtab %}

{% tab title="Query Wizard" %}
Click **Query Wizard** to build the query from rows of field, operator and value, then click **Run**.
{% endtab %}

{% tab title="Query AI" %}
Click the **Query** button with the AI icon and describe what you want in plain language. The button appears when you have the permission to use AI and your administrator has set up AI. See AI Configuration.
{% endtab %}
{% endtabs %}

To keep a query, click **Save As** above the search box and give the query a name. Saved queries of this inventory are listed under **Inventories** > **Source Codes** > **Saved Queries**. See Create and Save Queries.

IMAGEHERE: Source Code Inventory list with the default columns, the search box and the discovery selector.

### Actions on the list

| Button                          | What it does                                                                                                                                                 |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Query Wizard**                | Opens the query builder.                                                                                                                                     |
| **Actions** > **Add Tag**       | Adds a tag to the rows you selected with the check boxes. If no row is selected, a **No assets selected** warning appears. Needs the permission to add tags. |
| **Columns** > **Edit Columns**  | Opens a picker to choose the columns. **PrimaryKey** cannot be removed. Your choice is saved for your user.                                                  |
| **Columns** > **Reset Columns** | Goes back to the default columns.                                                                                                                            |
| **Download**                    | Creates a report of the current query and columns in **CSV**, **PDF** or **XLSX** format. Needs report permissions.                                          |

The list shows at most 10,000 records for a query. For larger result sets, use the Report Builder. See Generate a Report.

Above the list, a strip of charts and widgets for this inventory can be changed with **Add Chart/Widget** (up to 4 items). To build your own, see Create a Dashboard Chart.

### Repository detail page

Click a **Primary Key** to open the record. The cards at the top show:

* **Repository Name**, **Adapter**, **Visibility** and **Primary Language**.
* **Default Branch**, with a link icon that opens the repository on the source platform, and **Contributors Top 5** (name and number of commits).
* **Language Composition**, a doughnut chart of the languages in the repository.
* A card with **Manually Added Tags**, **Tags from Query** and **Notes**, where you can add tags and a note to this repository by hand.

Below the cards, use the selector on the right to switch between **Pretty View**, **Raw** and **Dependency Map**. The tabs on the left list **OctoXLabs** (the normalised fields) and one tab for the adapter that reported the repository. The adapter tab shows the data the adapter returned. For GitHub, GitLab, Bitbucket Cloud and SonarQube Self-Hosted it is arranged in sections:

| Adapter               | Sections in Pretty View                                                                                                                                                     |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GitHub                | **General Information**, **Branches**, **Commits**, **Issues**, **Source Files**, **Merge Requests**, **Members**, **Contributors**                                         |
| GitLab                | **General Information**, **Branches**, **Contributors**, **Members**, **Merge Requests**, **Source Files**                                                                  |
| Bitbucket Cloud       | **General Information**, **Branches**, **Commits**, **Repository Dependencies**, **Repository Links**, **Project**, **Project Links**, **Merge Requests**, **Source Files** |
| SonarQube Self-Hosted | **General Information**, **Branches**, **Issues**, **Impacts**, **Flows**, **Languages**, **Members**, **Merge Requests**                                                   |

For other adapters, the fields are listed as the adapter returned them. Use the search box and the sort options (**A-Z**, **Z-A**, **Default**) to find a field. The discovery selector lets you open the same repository in another discovery. For the map, see Dependency Map.

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Create and Save Queries</strong></td><td>Build a query once and reuse it in the list, dashboards and reports.</td><td></td></tr><tr><td><strong>Query Reference</strong></td><td>Operators, value types and the fields of every inventory.</td><td></td></tr><tr><td><strong>AI Services Inventory</strong></td><td>See the AI services and models your cloud accounts expose.</td><td></td></tr><tr><td><strong>Dashboards</strong></td><td>Chart repository counts, languages and visibility on a dashboard.</td><td></td></tr></tbody></table>
