GitHub Security Advisory Comments API Adds Programmatic Vulnerability Discussions
GitHub's new security advisory comments API brings vulnerability discussions into REST automation, with support for reading, adding and editing comments.
On this page
GitHub has opened a new REST API for security advisory comments, turning a discussion that previously lived only in the GitHub web interface into data that developers can read and modify programmatically. The public preview, announced October 2, 2026, adds endpoints for listing, reading, creating, and editing comments on repository security advisories, including advisories created from private vulnerability reports.
GitHub security advisory comments can now be automated
Repository security advisories are used by maintainers to coordinate the handling of vulnerabilities before publishing the details to users. Until now, the discussion attached to an advisory was accessible through GitHub's interface but was not available through the REST API in the same way as issues and pull requests. GitHub's new API changes that boundary by making non-confidential advisory comments available to software that has permission to access the underlying advisory.
The change is more significant than simply adding another comments endpoint. Security teams often need to preserve investigation notes, export records for audits, move information between systems, or automatically add status updates during a coordinated disclosure. Those workflows previously had to treat the advisory conversation as something a person could read but an integration could not directly manage. The new API makes the discussion part of the programmable security workflow.
The new API covers four basic comment operations
GitHub says the public preview supports four operations: listing comments on a repository security advisory, retrieving an individual comment, adding a comment, and editing a comment. The list operation can also be limited to comments updated since a specified time, which is useful for synchronization jobs that do not need to download an entire conversation on every run.
That last capability matters for automation. An audit exporter, for example, can keep the last synchronization timestamp and request only comments changed after that point. A triage system can use the same pattern to detect new discussion without repeatedly processing the full advisory history. The result is closer to how developers already work with issue and pull-request APIs, but applied to the more controlled environment of vulnerability coordination.
The comments count helps decide when an API call is worthwhile
GitHub has also changed repository security advisory responses to include a comments count. Global advisory responses now include the count for their linked repository advisory as well. GitHub says these counts cover non-confidential comments, allowing an integration to determine whether discussion exists before making another request to retrieve it.
This creates a simple optimization for applications that monitor many advisories. Instead of treating every advisory as if it contains an active discussion, an integration can first inspect the count and only fetch comments when there is something to process. For a small project the difference is negligible, but security platforms monitoring large numbers of repositories can avoid unnecessary API calls and data processing.
Access follows the security advisory, not just the comment
The new API does not make advisory discussions public by default. GitHub says access follows the permissions of the underlying security advisory, so a user who cannot see an advisory cannot use the API to retrieve its comments. Applications therefore need the appropriate repository security advisories access, and users or tokens must have permission to view the advisory they are requesting.
For integrations using fine-grained personal access tokens, GitHub's repository security advisory API uses a dedicated Repository security advisories repository permission. Read operations require read access, while operations that change advisory data require write access. This is preferable to handing an automation token broader repository privileges simply because it needs to process vulnerability discussions.
Confidential comments are deliberately outside the REST API
The same day as the REST API announcement, GitHub introduced confidential comments for repository security advisories. These comments are visible only to people with write access to the repository, allowing maintainers to discuss investigation details or coordination notes without exposing them to the reporter or other advisory collaborators who lack write access.
That distinction is critical when building an export or synchronization tool. GitHub explicitly says confidential comments are not returned by the new REST endpoints. They are available through the GraphQL API, but the REST API intentionally does not expose them. An integration that assumes the REST comment list represents the complete conversation would therefore produce an incomplete record.
Private vulnerability reports make the API more useful for triage
Repository security advisories can be created from privately reported vulnerabilities, allowing maintainers and reporters to work through a security issue before public disclosure. GitHub's documentation describes the resulting advisory as a place to discuss the vulnerability, collaborate on a fix, and eventually publish the advisory when the project is ready.
The new comments API applies to these advisories too. That means an internal security workflow can potentially connect the conversation to its own case-management, audit, or reporting system without requiring a maintainer to manually copy every discussion update. The permission boundary remains the same: the integration can only access what its identity is allowed to see.
A synchronization job can use the new API without copying every comment
A practical implementation can be kept deliberately small. First, authenticate with a token that has repository security advisory access. Next, identify the repository security advisory using its GitHub Security Advisory identifier, commonly called a GHSA ID. Before fetching the conversation, inspect the advisory's comment count and, for recurring synchronization, keep the timestamp of the last successful update so the next request can ask for comments changed after that point. GitHub's existing advisory API identifies an advisory with the repository owner, repository name, and GHSA identifier.
{ "repository": "owner/project", "advisory": "GHSA-example", "last_sync": "2026-10-02T12:00:00Z" }The important part of this pattern is what you do not store as your synchronization key. Do not assume that the advisory's last-updated timestamp means every comment has changed, and do not repeatedly import the complete discussion when the API can filter comments by their update time. Store the identifiers and timestamps returned by GitHub, then reconcile changes rather than blindly appending copies.
Editing comments enables automated triage notes
GitHub specifically points to automated triage notes as one use for the new write capability. An internal security system could add a comment when a vulnerability enters a particular stage, then edit that comment as the investigation progresses instead of generating a new message for every state change. That can keep the advisory discussion more compact while retaining the latest automated status.
Write access should still be treated differently from read access. An exporter only needs to observe the conversation, while a triage bot that adds or edits comments changes the advisory's history. Separating those responsibilities into different credentials or applications reduces the chance that a reporting integration can accidentally modify security discussions.
Deletion is the notable missing operation
The preview does not provide an API operation for deleting advisory comments. GitHub explicitly lists deletion as unsupported for the new REST endpoints. Developers building a synchronization or moderation workflow therefore need to design around an append-and-edit model rather than assuming the API provides the same lifecycle controls available for every other comment system.
This also affects data reconciliation. If an external system keeps a permanent copy of advisory discussions, it should preserve the distinction between what GitHub currently exposes and what the external system previously received. The absence of a REST deletion operation means an integration cannot use deletion requests as its normal mechanism for making an external archive mirror GitHub perfectly.
The public preview is aimed at security automation, not another discussion system
GitHub's own examples point toward audits, migrations, automated triage notes, and security workflows that behave more consistently with existing issue and pull-request automation. Those are practical uses because the API removes a manual step from processes that already depend on repository security advisories.
The timing also fits the way repository security advisories already work. GitHub provides APIs for creating, reading, and updating advisories, while maintainers can use an advisory to coordinate a fix before publishing it. Adding comments to that API surface means more of the lifecycle can now be handled by software instead of switching between an automated security system and the GitHub interface whenever someone needs to record or inspect discussion.
For developers building security tooling, the useful starting point is therefore not a bot that posts a message to every advisory. It is a small read-only integration that understands advisory permissions, tracks comment updates, and keeps confidential discussion out of REST-based exports. Once that data flow is reliable, adding automated triage or reporting becomes a much smaller engineering problem.
Share this post
Written by



