Skip to content

GitHub: Get a Dependabot alert

GitHub dependabot.dependabotGetAlert: arguments, response, policy and SDK examples.

← Dependabot operations · Get started

Operation github.dependabot_get_alert

Provider route: GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/github with npm, or alter-sdk-github with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { GitHubIntegration } from "@alter-ai/github";
async function execute(input: Parameters<GitHubIntegration["dependabot"]["dependabotGetAlert"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new GitHubIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.dependabot.dependabotGetAlert(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_github import GitHubIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = GitHubIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.dependabot.dependabot_get_alert(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.ownerstringRequired within parent
path.repostringRequired within parent
path.alert_numberintegerRequired within parentThe security alert number.
Read only: true

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get a Dependabot alert — response body

Referenced models: Get a Dependabot alert — response body

7 more schemas are linked from the tables above, on the schema pages.

Get a Dependabot alert — response body
FieldTypePresenceDescription and constraints
$objectRootA Dependabot alert.
Additional keys: not allowed
assigneesarrayOptionalThe users assigned to this alert.
Read only: true
assignees[]ModelEach itemExpand List users — response body — item
auto_dismissed_atModelOptionalExpand Get a Dependabot alert — response body — auto dismissed at
created_atstringRequired within parentThe time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
dependencyModelRequired within parentExpand Get a Dependabot alert — response body — dependency
dismissal_requestModelOptionalExpand Get a Dependabot alert — response body — dismissal request
dismissed_atModelRequired within parentExpand Get a Dependabot alert — response body — dismissed at
dismissed_byModelRequired within parentExpand Get an issue — response body — user
dismissed_commentJSONRequired within parent
dismissed_comment (anyOf 1)stringAlternativeAn optional comment associated with the alert's dismissal.
Maximum length: 280
dismissed_comment (anyOf 2)nullAlternative
dismissed_reasonJSONRequired within parent
dismissed_reason (anyOf 1)stringAlternativeThe reason that the alert was dismissed.
Known values: fix_started, inaccurate, no_bandwidth, not_used, tolerable_risk
dismissed_reason (anyOf 2)nullAlternative
fixed_atModelRequired within parentExpand Get a Dependabot alert — response body — fixed at
html_urlstringRequired within parentThe GitHub URL of the alert resource.
Format: uri
Read only: true
numberModelRequired within parentExpand Get a Dependabot alert — response body — number
reachabilityModelOptionalExpand Get a Dependabot alert — response body — reachability
security_advisoryModelRequired within parentExpand Get a Dependabot alert — response body — security advisory
security_vulnerabilityModelRequired within parentExpand Get a Dependabot alert — response body — security vulnerability
statestringRequired within parentThe state of the Dependabot alert.
Known values: auto_dismissed, dismissed, fixed, open
Read only: true
updated_atstringRequired within parentThe time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
urlstringRequired within parentThe REST API URL of the alert resource.
Format: uri
Read only: true

Referenced models: Get a Dependabot alert — response body — auto dismissed at, Get a Dependabot alert — response body — dismissed at, Get a Dependabot alert — response body — fixed at, Get a Dependabot alert — response body — number, Get a Dependabot alert — response body — dismissal request, Get a Dependabot alert — response body — security advisory, Get a Dependabot alert — response body — security vulnerability, Get an issue — response body — user, List users — response body — item, Get a Dependabot alert — response body — dependency, Get a Dependabot alert — response body — reachability

Get a Dependabot alert — response body — auto dismissed at
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeThe time that the alert was auto-dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
$ (anyOf 2)nullAlternative
Get a Dependabot alert — response body — dismissed at
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeThe time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
$ (anyOf 2)nullAlternative
Get a Dependabot alert — response body — fixed at
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)stringAlternativeThe time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
Format: date-time
Read only: true
$ (anyOf 2)nullAlternative
Get a Dependabot alert — response body — number
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)integerAlternativeThe security alert number.
Read only: true
$ (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Get a Dependabot alert — response body — dismissal request
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeInformation about an active dismissal request for this Dependabot alert.
$ (anyOf 1).created_atstringOptionalThe date and time when the dismissal request was created.
Format: date-time
$ (anyOf 1).idJSONOptional
$ (anyOf 1).id (anyOf 1)integerAlternativeThe unique identifier of the dismissal request.
$ (anyOf 1).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).requesterobjectOptionalThe user who requested the dismissal.
$ (anyOf 1).requester.idJSONOptional
$ (anyOf 1).requester.id (anyOf 1)integerAlternativeThe unique identifier of the user.
$ (anyOf 1).requester.id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 1).requester.loginstringOptionalThe login name of the user.
$ (anyOf 1).statusstringOptionalThe current status of the dismissal request.
Known values: pending, approved, rejected, cancelled
$ (anyOf 1).urlstringOptionalThe API URL to get more information about this dismissal request.
Format: uri
$ (anyOf 2)nullAlternative
Get a Dependabot alert — response body — security vulnerability
FieldTypePresenceDescription and constraints
$objectRootDetails pertaining to one vulnerable version range for the advisory.
Read only: true
Additional keys: not allowed
first_patched_versionJSONRequired within parent
first_patched_version (anyOf 1)objectAlternativeDetails pertaining to the package version that patches this vulnerability.
Read only: true
Additional keys: not allowed
first_patched_version (anyOf 1).identifierstringRequired within parentThe package version that patches this vulnerability.
Read only: true
first_patched_version (anyOf 2)nullAlternative
packageModelRequired within parentExpand Get a Dependabot alert — response body — dependency package
severitystringRequired within parentThe severity of the vulnerability.
Known values: low, medium, high, critical
Read only: true
vulnerable_version_rangestringRequired within parentConditions that identify vulnerable versions of this vulnerability's package.
Read only: true

Referenced models: Get a Dependabot alert — response body — dependency package

Get an issue — response body — user
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Get an issue — response body — user A Git Hub user
$ (anyOf 2)nullAlternative

Referenced models: Get an issue — response body — user A Git Hub user

Get a Dependabot alert — response body — dependency package
FieldTypePresenceDescription and constraints
$objectRootDetails for the vulnerable package.
Read only: true
Additional keys: not allowed
ecosystemstringRequired within parentThe package's language or package management ecosystem.
Read only: true
namestringRequired within parentThe unique package name within its ecosystem.
Read only: true

SDK function policy ID: github.dependabot_get_alert. Catalog operation: dependabot/get-alert. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"X-GitHub-Api-Version": "2026-03-10", "User-Agent": "Alter", "Accept": "application/vnd.github+json"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.