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

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/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories>
add_vulnerabilities(vulnerabilities: Iterable[Union[github.RepositoryAdvisoryVulnerability.SimpleAdvisoryVulnerability, RepositoryAdvisoryVulnerability]]) → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories>
offer_credit(login_or_user: str | github.NamedUser.NamedUser, credit_type: str) → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories>

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.

offer_credits(credited: Iterable[Union[github.RepositoryAdvisoryCredit.SimpleCredit, RepositoryAdvisoryCredit]]) → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories>

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. :param credited: iterable of dict with keys “login” and “type”

revoke_credit(login_or_user: str | github.NamedUser.NamedUser) → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id
clear_credits() → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id
edit(summary: Union[str, github.GithubObject._NotSetType] = NotSet, description: Union[str, github.GithubObject._NotSetType] = NotSet, severity_or_cvss_vector_string: Union[str, github.GithubObject._NotSetType] = NotSet, cve_id: Union[str, github.GithubObject._NotSetType] = NotSet, vulnerabilities: Union[Iterable[Union[github.RepositoryAdvisoryVulnerability.SimpleAdvisoryVulnerability, RepositoryAdvisoryVulnerability]], github.GithubObject._NotSetType] = NotSet, cwe_ids: Union[Iterable[str], github.GithubObject._NotSetType] = NotSet, credits: Union[Iterable[Union[github.RepositoryAdvisoryCredit.SimpleCredit, RepositoryAdvisoryCredit]], github.GithubObject._NotSetType] = NotSet, state: Union[str, github.GithubObject._NotSetType] = NotSet) → github.RepositoryAdvisory.RepositoryAdvisory
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id
accept_report() → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories>

Accepts the advisory reported from an external reporter via private vulnerability reporting.

publish() → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories>

Publishes the advisory.

close() → None
Calls:PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories>

Closes the advisory.