Skip to content

List the security alerts of a project's repository

GET
/projects/{projectId}/security-alerts
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/projects/example/security-alerts?type=dependabot&state=open' \
--header 'Authorization: Bearer <token>'

Lists the Dependabot, code scanning or secret scanning alerts GitHub raised for the repository linked to the project, one type per call, open by default. Read-only: Chelsea never dismisses or reopens an alert, and a secret scanning alert carries its kind and state, never the secret’s value. Reads one GitHub page: pass meta.nextCursor as cursor for the next, since GitHub gives no totals. A project the caller cannot reach answers 404; a project with no linked repository, or a repository with that feature off on GitHub, answers 409; 424 GITHUB_ACCESS_MISSING means the App or the organization has not accepted the read permission for that type. Requires github.view.

projectId
required

Project identifier (CUID2).

string
>= 1 characters

Project identifier (CUID2).

type
required

dependabot, code_scanning or secret_scanning. One type per call, since GitHub pages each its own way.

string
Allowed values: dependabot code_scanning secret_scanning

dependabot, code_scanning or secret_scanning. One type per call, since GitHub pages each its own way.

state

Defaults to open. Dependabot: open, fixed, dismissed, auto_dismissed. Code scanning: open, fixed, dismissed, closed. Secret scanning: open, resolved.

string
Allowed values: open fixed dismissed auto_dismissed closed resolved

Defaults to open. Dependabot: open, fixed, dismissed, auto_dismissed. Code scanning: open, fixed, dismissed, closed. Secret scanning: open, resolved.

cursor

meta.nextCursor of the previous page. Omit for the first page.

string
/^[A-Za-z0-9_=-]{1,200}$/

meta.nextCursor of the previous page. Omit for the first page.

limit

Page size, 1 to 100. Defaults to 30.

integer
>= 1 <= 100

Page size, 1 to 100. Defaults to 30.

A page of alerts.

Media typeapplication/json
object
data
required
Array<object>

An alert GitHub raised for a project’s repository. A secret scanning alert never carries the secret’s value.

object
createdAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
location
required

The manifest of a Dependabot alert or the file of a code scanning alert.

string | null
number
required

The alert’s number in its repository.

integer
>= -9007199254740991 <= 9007199254740991
packageName
required

The package of a Dependabot alert.

string | null
reference
required

The GHSA id of a Dependabot alert, the rule id of a code scanning alert or the secret type id.

string | null
resolution
required

How the alert was closed, when it was.

string | null
severity
required

GitHub’s severity word (critical, high, medium, low, …); null when it gives none.

string | null
state
required

GitHub’s state word, such as open or fixed.

string
title
required

The advisory’s summary, the rule’s description, or the kind of secret for a secret scanning alert.

string
type
required

dependabot, code_scanning or secret_scanning.

string
url
required

The alert on GitHub.

string
meta
required

Cursor pagination metadata for list responses.

object
hasMore
required

True when nextCursor is set.

boolean
limit
required

Page size that was applied.

integer
>= -9007199254740991 <= 9007199254740991
nextCursor
required

Pass as cursor to fetch the next page. Null on the last page.

string | null

Example generated

{
"data": [
{
"createdAt": "2026-04-15T12:00:00Z",
"location": "example",
"number": 1,
"packageName": "example",
"reference": "example",
"resolution": "example",
"severity": "example",
"state": "example",
"title": "example",
"type": "example",
"url": "example"
}
],
"meta": {
"hasMore": true,
"limit": 1,
"nextCursor": "example"
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Conflict.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

GitHub failed (GITHUB_API_ERROR), or Chelsea’s GitHub App or the organization has not granted the access this needs (GITHUB_ACCESS_MISSING; the message names the step in Settings, Integrations, GitHub).

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.