Get a Dependabot alert
OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The account owner of the repository. The name is not case sensitive.
The name of the repository without the .git extension. The name is not case sensitive.
The security alert number.
The number that identifies a Dependabot alert in its repository.
You can find this at the end of the URL for a Dependabot alert within GitHub,
or in number fields in the response from the
GET /repos/{owner}/{repo}/dependabot/alerts operation.
Responses
Section titled “ Responses ”Response
A Dependabot alert.
object
The security alert number.
The state of the Dependabot alert.
Details for the vulnerable dependency.
object
Details for the vulnerable package.
object
The package’s language or package management ecosystem.
The unique package name within its ecosystem.
The full path to the dependency manifest file, relative to the root of the repository.
The execution scope of the vulnerable dependency.
The vulnerable dependency’s relationship to your project.
[!NOTE] We are rolling out support for dependency relationship across ecosystems. This value will be “unknown” for all dependencies in unsupported ecosystems.
Details for the GitHub Security Advisory.
object
The unique GitHub Security Advisory ID assigned to the advisory.
The unique CVE ID assigned to the advisory.
A short, plain text summary of the advisory.
A long-form Markdown-supported description of the advisory.
Vulnerable version range information for the advisory.
Details pertaining to one vulnerable version range for the advisory.
object
Details for the vulnerable package.
object
The package’s language or package management ecosystem.
The unique package name within its ecosystem.
The severity of the vulnerability.
Conditions that identify vulnerable versions of this vulnerability’s package.
Details pertaining to the package version that patches this vulnerability.
object
The package version that patches this vulnerability.
The severity of the advisory.
The classification of the advisory.
Details for the advisory pertaining to the Common Vulnerability Scoring System.
object
The overall CVSS score of the advisory.
The full CVSS vector string for the advisory.
object
object
The CVSS 3 vector string.
The CVSS 3 score.
object
The CVSS 4 vector string.
The CVSS 4 score.
The EPSS scores as calculated by the Exploit Prediction Scoring System.
object
Details for the advisory pertaining to Common Weakness Enumeration.
A CWE weakness assigned to the advisory.
object
The unique CWE ID.
The short, plain text name of the CWE.
Values that identify this advisory among security information sources.
An advisory identifier.
object
The type of advisory identifier.
The value of the advisory identifer.
Links to additional advisory information.
A link to additional advisory information.
object
The URL of the reference.
The time that the advisory was published in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The time that the advisory was last modified in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The time that the advisory was withdrawn in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Details pertaining to one vulnerable version range for the advisory.
object
Details for the vulnerable package.
object
The package’s language or package management ecosystem.
The unique package name within its ecosystem.
The severity of the vulnerability.
Conditions that identify vulnerable versions of this vulnerability’s package.
Details pertaining to the package version that patches this vulnerability.
object
The package version that patches this vulnerability.
The REST API URL of the alert resource.
The GitHub URL of the alert resource.
The time that the alert was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The time that the alert was last updated in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The time that the alert was dismissed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
A GitHub user.
object
The reason that the alert was dismissed.
An optional comment associated with the alert’s dismissal.
The time that the alert was no longer detected and was considered fixed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The time that the alert was auto-dismissed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Information about an active dismissal request for this Dependabot alert.
object
The unique identifier of the dismissal request.
The current status of the dismissal request.
The user who requested the dismissal.
object
The unique identifier of the user.
The login name of the user.
The date and time when the dismissal request was created.
The API URL to get more information about this dismissal request.
The users assigned to this alert.
A GitHub user.
object
Examples
{ "number": 1, "state": "open", "dependency": { "package": { "ecosystem": "pip", "name": "ansible" }, "manifest_path": "path/to/requirements.txt", "scope": "runtime" }, "security_advisory": { "ghsa_id": "GHSA-8f4m-hccc-8qph", "cve_id": "CVE-2021-20191", "summary": "Insertion of Sensitive Information into Log File in ansible", "description": "A flaw was found in ansible. Credentials, such as secrets, are being disclosed in console log by default and not protected by no_log feature when using those modules. An attacker can take advantage of this information to steal those credentials. The highest threat from this vulnerability is to data confidentiality.", "vulnerabilities": [ { "package": { "ecosystem": "pip", "name": "ansible" }, "severity": "medium", "vulnerable_version_range": ">= 2.9.0, < 2.9.18", "first_patched_version": { "identifier": "2.9.18" } }, { "package": { "ecosystem": "pip", "name": "ansible" }, "severity": "medium", "vulnerable_version_range": "< 2.8.19", "first_patched_version": { "identifier": "2.8.19" } }, { "package": { "ecosystem": "pip", "name": "ansible" }, "severity": "medium", "vulnerable_version_range": ">= 2.10.0, < 2.10.7", "first_patched_version": { "identifier": "2.10.7" } } ], "severity": "medium", "cvss": { "vector_string": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "score": 5.5 }, "cvss_severities": { "cvss_v3": { "vector_string": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "score": 5.5 }, "cvss_v4": { "vector_string": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N", "score": 8.5 } }, "epss": { "percentage": 0.00045, "percentile": "0.16001e0" }, "cwes": [ { "cwe_id": "CWE-532", "name": "Insertion of Sensitive Information into Log File" } ], "identifiers": [ { "type": "GHSA", "value": "GHSA-8f4m-hccc-8qph" }, { "type": "CVE", "value": "CVE-2021-20191" } ], "references": [ { "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-20191" }, { "url": "https://access.redhat.com/security/cve/cve-2021-20191" }, { "url": "https://bugzilla.redhat.com/show_bug.cgi?id=1916813" } ], "published_at": "2021-06-01T17:38:00Z", "updated_at": "2021-08-12T23:06:00Z", "withdrawn_at": null }, "security_vulnerability": { "package": { "ecosystem": "pip", "name": "ansible" }, "severity": "medium", "vulnerable_version_range": "< 2.8.19", "first_patched_version": { "identifier": "2.8.19" } }, "url": "https://api.github.com/repos/octocat/hello-world/dependabot/alerts/1", "html_url": "https://github.com/octocat/hello-world/security/dependabot/1", "created_at": "2022-06-14T15:21:52Z", "updated_at": "2022-06-14T15:21:52Z", "dismissed_at": null, "dismissed_by": null, "dismissed_reason": null, "dismissed_comment": null, "fixed_at": null, "assignees": [ { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false } ]}Not modified
Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}