Skip to content

GitHub: Privately report a security vulnerability

GitHub securityAdvisories.securityAdvisoriesCreatePrivateVulnerabilityReport: arguments, response, policy and SDK examples.

← Security advisories operations · Get started

Operation github.security_advisories_create_private_vulnerability_report

Provider route: POST /repos/{owner}/{repo}/security-advisories/reports. 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["securityAdvisories"]["securityAdvisoriesCreatePrivateVulnerabilityReport"]>[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.securityAdvisories.securityAdvisoriesCreatePrivateVulnerabilityReport(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.security_advisories.security_advisories_create_private_vulnerability_report(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
bodyModelRequired within parentExpand Privately report a security vulnerability — request body — body

Referenced models: Privately report a security vulnerability — request body — body

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 repository security advisory — response body

Referenced models: Get a repository security advisory — response body

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

Get a repository security advisory — response body
FieldTypePresenceDescription and constraints
$objectRootA repository security advisory.
Additional keys: not allowed
authorJSONRequired within parent
author (anyOf 1)JSONAlternativeThe author of the advisory.
Read only: true
author (anyOf 1) (allOf 1)ModelAll variants applyExpand List users — response body — item
author (anyOf 2)nullAlternative
closed_atJSONRequired within parent
closed_at (anyOf 1)stringAlternativeThe date and time of when the advisory was closed, in ISO 8601 format.
Format: date-time
Read only: true
closed_at (anyOf 2)nullAlternative
collaborating_teamsJSONRequired within parent
collaborating_teams (anyOf 1)arrayAlternativeA list of teams that collaborate on the advisory.
collaborating_teams (anyOf 1)[]ModelEach itemExpand List teams — response body — item
collaborating_teams (anyOf 2)nullAlternative
collaborating_usersJSONRequired within parent
collaborating_users (anyOf 1)arrayAlternativeA list of users that collaborate on the advisory.
collaborating_users (anyOf 1)[]ModelEach itemExpand List users — response body — item
collaborating_users (anyOf 2)nullAlternative
created_atJSONRequired within parent
created_at (anyOf 1)stringAlternativeThe date and time of when the advisory was created, in ISO 8601 format.
Format: date-time
Read only: true
created_at (anyOf 2)nullAlternative
creditsJSONRequired within parent
credits (anyOf 1)arrayAlternative
credits (anyOf 1)[]objectEach item
credits (anyOf 1)[].loginstringOptionalThe username of the user credited.
credits (anyOf 1)[].typestringOptionalThe type of credit the user is receiving.
Known values: analyst, finder, reporter, coordinator, remediation_developer, remediation_reviewer, remediation_verifier, tool, sponsor, other
credits (anyOf 2)nullAlternative
credits_detailedJSONRequired within parent
credits_detailed (anyOf 1)arrayAlternativeRead only: true
credits_detailed (anyOf 1)[]ModelEach itemExpand Get a repository security advisory — response body — credits detailed array item
credits_detailed (anyOf 2)nullAlternative
cve_idJSONRequired within parent
cve_id (anyOf 1)stringAlternativeThe Common Vulnerabilities and Exposures (CVE) ID.
cve_id (anyOf 2)nullAlternative
cvss_severitiesModelOptionalExpand Get a global security advisory — response body — cvss severities
cwe_idsJSONRequired within parent
cwe_ids (anyOf 1)arrayAlternativeA list of only the CWE IDs.
cwe_ids (anyOf 1)[]stringEach item
cwe_ids (anyOf 2)nullAlternative
cwesJSONRequired within parent
cwes (anyOf 1)arrayAlternativeRead only: true
cwes (anyOf 1)[]objectEach item
cwes (anyOf 1)[].cwe_idstringRequired within parentThe Common Weakness Enumeration (CWE) identifier.
cwes (anyOf 1)[].namestringRequired within parentThe name of the CWE.
Read only: true
cwes (anyOf 2)nullAlternative
descriptionJSONRequired within parent
description (anyOf 1)stringAlternativeA detailed description of what the advisory entails.
Maximum length: 65535
description (anyOf 2)nullAlternative
ghsa_idstringRequired within parentThe GitHub Security Advisory ID.
Read only: true
html_urlstringRequired within parentThe URL for the advisory.
Format: uri
Read only: true
identifiersarrayRequired within parentRead only: true
identifiers[]objectEach item
identifiers[].typestringRequired within parentThe type of identifier.
Known values: CVE, GHSA
identifiers[].valuestringRequired within parentThe identifier value.
private_forkJSONRequired within parent
private_fork (anyOf 1)JSONAlternativeA temporary private fork of the advisory's repository for collaborating on a fix.
Read only: true
private_fork (anyOf 1) (allOf 1)ModelAll variants applyExpand List repositories for a user migration — response body — item
private_fork (anyOf 2)nullAlternative
published_atJSONRequired within parent
published_at (anyOf 1)stringAlternativeThe date and time of when the advisory was published, in ISO 8601 format.
Format: date-time
Read only: true
published_at (anyOf 2)nullAlternative
publisherJSONRequired within parent
publisher (anyOf 1)JSONAlternativeThe publisher of the advisory.
Read only: true
publisher (anyOf 1) (allOf 1)ModelAll variants applyExpand List users — response body — item
publisher (anyOf 2)nullAlternative
severityJSONRequired within parent
severity (anyOf 1)stringAlternativeThe severity of the advisory.
Known values: critical, high, medium, low
severity (anyOf 2)nullAlternative
statestringRequired within parentThe state of the advisory.
Known values: published, closed, withdrawn, draft, triage
submissionJSONRequired within parent
submission (anyOf 1)objectAlternativeRead only: true
submission (anyOf 1).acceptedbooleanRequired within parentWhether a private vulnerability report was accepted by the repository's administrators.
Read only: true
submission (anyOf 2)nullAlternative
summarystringRequired within parentA short summary of the advisory.
Maximum length: 1024
updated_atJSONRequired within parent
updated_at (anyOf 1)stringAlternativeThe date and time of when the advisory was last updated, in ISO 8601 format.
Format: date-time
Read only: true
updated_at (anyOf 2)nullAlternative
urlstringRequired within parentThe API URL for the advisory.
Format: uri
Read only: true
vulnerabilitiesJSONRequired within parent
vulnerabilities (anyOf 1)arrayAlternative
vulnerabilities (anyOf 1)[]ModelEach itemExpand Get a repository security advisory — response body — vulnerabilities array item
vulnerabilities (anyOf 2)nullAlternative
withdrawn_atJSONRequired within parent
withdrawn_at (anyOf 1)stringAlternativeThe date and time of when the advisory was withdrawn, in ISO 8601 format.
Format: date-time
Read only: true
withdrawn_at (anyOf 2)nullAlternative

Referenced models: Get a global security advisory — response body — cvss severities, Get a repository security advisory — response body — credits detailed array item, Get a repository security advisory — response body — vulnerabilities array item, List repositories for a user migration — response body — item, List users — response body — item, List teams — response body — item

Privately report a security vulnerability — request body — body
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
cvss_vector_stringJSONOptional
cvss_vector_string (anyOf 1)stringAlternativeThe CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`.
cvss_vector_string (anyOf 2)nullAlternative
cwe_idsJSONOptional
cwe_ids (anyOf 1)arrayAlternativeA list of Common Weakness Enumeration (CWE) IDs.
cwe_ids (anyOf 1)[]stringEach item
cwe_ids (anyOf 2)nullAlternative
descriptionstringRequired within parentA detailed description of what the advisory impacts.
Maximum length: 65535
severityJSONOptional
severity (anyOf 1)stringAlternativeThe severity of the advisory. You must choose between setting this field or `cvss_vector_string`.
One of: critical, high, medium, low
severity (anyOf 2)nullAlternative
start_private_forkbooleanOptionalWhether to create a temporary private fork of the repository to collaborate on a fix. The fork is created only if you are permitted to create one; otherwise, this parameter is ignored and the report is still created.
Default: false
summarystringRequired within parentA short summary of the advisory.
Maximum length: 1024
vulnerabilitiesJSONOptional
vulnerabilities (anyOf 1)arrayAlternativeAn array of products affected by the vulnerability detailed in a repository security advisory.
vulnerabilities (anyOf 1)[]ModelEach itemExpand Create a repository security advisory — request body — body vulnerabilities item
vulnerabilities (anyOf 2)nullAlternative

Referenced models: Create a repository security advisory — request body — body vulnerabilities item

SDK function policy ID: github.security_advisories_create_private_vulnerability_report. Catalog operation: security-advisories/create-private-vulnerability-report. 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.