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
-
closed_at
¶ Type: datetime.datetime
-
created_at
¶ Type: datetime.datetime
-
credits
¶ Type: list of github.RepositoryAdvisoryCredit.RepositoryAdvisoryCredit
-
credits_detailed
¶ Type: list of github.RepositoryAdvisoryCreditDetailed.RepositoryAdvisoryCreditDetailed
-
cve_id
¶ Type: string
-
cwe_ids
¶ Type: list of string
-
cwes
¶ Type: list of github.CWE.CWE
-
description
¶ Type: string
-
ghsa_id
¶ Type: string
-
html_url
¶ Type: string
-
published_at
¶ Type: datetime.datetime
-
severity
¶ Type: string
-
state
¶ Type: string
-
summary
¶ Type: string
-
updated_at
¶ Type: datetime.datetime
-
url
¶ Type: string
-
vulnerabilities
¶ Type: list of github.RepositoryAdvisoryVulnerability.RepositoryAdvisoryVulnerability
-
withdrawn_at
¶ Type: datetime.datetime
-
add_vulnerability
(ecosystem: str, package_name: Optional[str] = None, vulnerable_version_range: Optional[str] = None, patched_versions: Optional[str] = None, vulnerable_functions: Optional[List[str]] = None)¶ Calls: PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories> :param ecosystem: string
Parameters: - package_name – string
- vulnerable_version_range – string
- patched_versions – string
- vulnerable_functions – list of string
-
add_vulnerabilities
(vulnerabilities: Iterable[Union[github.RepositoryAdvisoryVulnerability.SimpleAdvisoryVulnerability, RepositoryAdvisoryVulnerability]])¶ Calls: PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories> Parameters: vulnerabilities – iterable of github.RepositoryAdvisoryVulnerability.AdvisoryVulnerability
-
offer_credit
(login_or_user: Union[str, github.NamedUser.NamedUser], credit_type: str)¶ 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. :param login_or_user: string username or
github.NamedUser.NamedUser
:param credit_type: string
-
offer_credits
(credited: Iterable[Credit])¶ 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: Union[str, github.NamedUser.NamedUser])¶ Calls: PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id Parameters: login_or_user – string username or github.NamedUser.NamedUser
-
clear_credits
()¶ 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
Parameters: - summary – string
- description – string
- severity_or_cvss_vector_string – string
- cve_id – string
- vulnerabilities – iterable of
github.RepositoryAdvisoryVulnerability.AdvisoryVulnerability
- cwe_ids – iterable of string
- credits – iterable of
github.RepositoryAdvisoryCredit.Credit
- state – string
Return type:
-
accept_report
()¶ 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
()¶ Calls: PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories> Publishes the advisory.
-
close
()¶ Calls: PATCH /repos/{owner}/{repo}/security-advisories/:advisory_id <https://docs.github.com/en/rest/security-advisories/repository-advisories> Closes the advisory.
-