RepositoryAdvisory
- class github.RepositoryAdvisory.RepositoryAdvisory
This class represents a RepositoryAdvisory.
The reference can be found here https://docs.github.com/en/rest/security-advisories/repository-advisories
The OpenAPI schema can be found at
/components/schemas/repository-advisory
- add_vulnerability(ecosystem: str, package_name: str | None = None, vulnerable_version_range: str | None = None, patched_versions: str | None = None, vulnerable_functions: list[str] | None = None) None
- Calls:
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories>
- add_vulnerabilities(vulnerabilities: Iterable[AdvisoryVulnerabilityInput]) None
- Calls:
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories>
- offer_credit(login_or_user: str | NamedUser, credit_type: str) None
Offers credit to a user for a vulnerability in a repository.
Unless you are giving credit to yourself, the user having credit offered will need to explicitly accept the credit. :calls: PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories>
- offer_credits(credited: Iterable[Credit]) None
Offers credit to a list of users for a vulnerability in a repository.
Unless you are giving credit to yourself, the user having credit offered will need to explicitly accept the credit. :calls: PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories> :param credited: iterable of dict with keys “login” and “type”
- clear_credits() None
- edit(summary: Opt[str] = NotSet, description: Opt[str] = NotSet, severity_or_cvss_vector_string: Opt[str] = NotSet, cve_id: Opt[str] = NotSet, vulnerabilities: Opt[Iterable[AdvisoryVulnerabilityInput]] = NotSet, cwe_ids: Opt[Iterable[str]] = NotSet, credits: Opt[Iterable[Credit]] = NotSet, state: Opt[str] = NotSet) RepositoryAdvisory
- accept_report() None
Accepts the advisory reported from an external reporter via private vulnerability reporting.
- Calls:
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories>
- publish() None
Publishes the advisory.
- Calls:
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories>
- request_cve() None
Requests a CVE for the advisory.
- close() None
Closes the advisory.
- Calls:
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} <https://docs.github.com/en/rest/security-advisories/repository-advisories>