# CodeScene

> CodeScene: what the collector reads, how to connect it, its permissions, its certification by Atlantic Agentic Labs and its security posture.

Built, not certified Built and tested against recorded and synthetic responses (version 0.1.0, 21 November 2026). Not yet run against the vendor's sandbox or a client environment.

Reads a CodeScene account’s projects, the code health of each project’s latest analysis and its hotspots (the most changed files, with their code health and code smells), so coding and review agents can answer where the code is unhealthy and where change concentrates. It reads analysis results only; it reads no source code and starts no analysis.

Built against the CodeScene REST API v2 (cloud).

## At a glance

| Collector                   | CodeScene, version `0.1.0`                                                                                                                            |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Reads                       | CodeScene: CodeScene (cloud): projects, code health and hotspots ([the vendor's documentation](https://codescene.io/docs/integrations/rest-api.html)) |
| Family                      | Engineering                                                                                                                                           |
| Kind                        | Code quality                                                                                                                                          |
| Ways to connect             | Access token                                                                                                                                          |
| Scopes                      | - Read: `API token of a user with view access to the projects`                                                                                        |
| Read only                   | Yes                                                                                                                                                   |
| Vendor's API can move money | No                                                                                                                                                    |
| Personal data               | Content                                                                                                                                               |
| Hosts it may contact        | `api.codescene.io`                                                                                                                                    |
| Vendor API versions         | CodeScene REST API v2: projects, latest analysis, latest analysis files                                                                               |
| Lowest engine version       | `0.47.1`                                                                                                                                              |

## What it reads

- Projects: name, analysis status and errors, and from the latest analysis: its time, code health now, a month ago and a year ago, hotspot code health, the worst performer, lines of code, active developers, commits and authors, code coverage, the analysed revisions and the languages. The list has no “changed since” filter, so each run lists it and writes the projects whose text differs from the last run. A project that has gone is withdrawn.
- Hotspots: one record a project with the 50 most changed files of the latest analysis (or the number you set), each with its code health now, a month and a year ago, change frequency, lines of code, defects, primary team and code smells. Read again only when a new analysis lands.
- Where CodeScene has no value it sends `-`, and the record keeps it.
- Never read: source code, commits, authors and file owners, developer and team settings, delta analyses and PR safeguards.

## How to connect

1. In CodeScene, sign in as a user who can view the projects to read and cannot change them, and create an API token.
2. In LightHouse, open **Connectors**, choose **CodeScene**, give the project ids to read (or leave it empty for all the token can see), a label and how often to read, and paste the token.
3. In code, give the deployment the token as `CODESCENE_TOKEN` from your secret store and add a `kind: codescene` source card with `projects`, `label` and `requires`. `token_env` changes the variable name; `kinds` and `hotspots` (1 to 500) narrow what is read.

## Permissions

A token of a user with view access only: CodeScene tokens carry their user’s permissions. The collector sends only `GET` requests to `api.codescene.io`, with the token as a Bearer credential; it never starts an analysis, changes a project or writes. A token of an administrator could delete projects if it leaked, so make it as a viewing user. Its read-only test proves the collector’s side on every change.

## Limits

- CodeScene cloud only (`api.codescene.io`). A self-hosted CodeScene server is not supported in this version.
- A project with no analysis yet, or whose analysis answers 403 or 404, is written from the list alone and keeps its hotspots as they were.
- At most 50 pages of projects are read.
- Hotspots are the first page of the latest analysis’s files in CodeScene’s change-frequency order; the technical debt and refactoring-target lists are not read.
- Requests are paced and back off when CodeScene asks (`Retry-After`).

## Data handling

- Project names, file paths, team names, code health figures and code smell names are copied into the deployment’s corpus under the source’s `label`. File owners are not copied.
- Source code is never read.
- The token stays in your secret store and is never written to logs or run notes; it is sent only to `api.codescene.io`.
- Nothing leaves the deployment: only counts reach LightHouse.

## Troubleshooting

| What you see                                       | What it means                                      | What to do                                             |
| -------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------ |
| `not CodeScene project ids`                        | `projects` holds something other than numeric ids  | Use the ids from the project URLs                      |
| `credential variable 'CODESCENE_TOKEN' is not set` | The token variable is empty                        | Set it from your secret store                          |
| `HTTP 401`                                         | The token is revoked or expired                    | Make a new token                                       |
| A project with no hotspots                         | It has no analysis yet, or the token cannot see it | Run an analysis in CodeScene, or grant the user access |
| Read succeeded, 0 written                          | Nothing changed since the last read                | Nothing to do                                          |

## Certification

Each entry is a run by Atlantic Agentic Labs, newest first. Only a run against the vendor’s sandbox or a client environment certifies a collector; a certification lasts six months, or less if the vendor publishes an API version the collector does not list. See [How collectors are certified](/collectors/certification/).

| Date             | Collector | Engine   | Vendor API                                                              | Method                              | Expires        |
| ---------------- | --------- | -------- | ----------------------------------------------------------------------- | ----------------------------------- | -------------- |
| 21 November 2026 | `0.1.0`   | `0.47.1` | CodeScene REST API v2: projects, latest analysis, latest analysis files | Fixtures only: built, not certified | Not applicable |

## Security posture

From the collector’s last scan on the default branch. What each line means, and what blocks a release: [Security posture](/collectors/security/).

| Last scanned               | 25 November 2026                                                                                                                                                                                                      |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Critical findings          | 0                                                                                                                                                                                                                     |
| High findings              | 0                                                                                                                                                                                                                     |
| Medium findings            | 0                                                                                                                                                                                                                     |
| Low findings               | 0                                                                                                                                                                                                                     |
| Info findings              | 0                                                                                                                                                                                                                     |
| Release blocked            | No                                                                                                                                                                                                                    |
| Network allow-list check   | Pass                                                                                                                                                                                                                  |
| Read-only behavioural test | Pass                                                                                                                                                                                                                  |
| SBOM (CycloneDX)           | Produced                                                                                                                                                                                                              |
| Dependency licences        | Pass                                                                                                                                                                                                                  |
| Scanners                   | bandit 1.9.4, semgrep 1.181.1, pip-audit 2.10.1, osv-scanner 2.7.0, cyclonedx-py 7.5.0, pip-licenses 5.5.5, gitleaks repository job aal-secrets, hosts_check tools/hosts_check.py, read-only test pytest -m read_only |

Source: https://docs.atlanticagenticlabs.com/collectors/catalogue/codescene/
