advisories

package
v0.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGetDirectionQueryParameterType

func ParseGetDirectionQueryParameterType(v string) (any, error)

func ParseGetEcosystemQueryParameterType

func ParseGetEcosystemQueryParameterType(v string) (any, error)

func ParseGetSeverityQueryParameterType

func ParseGetSeverityQueryParameterType(v string) (any, error)

func ParseGetSortQueryParameterType

func ParseGetSortQueryParameterType(v string) (any, error)

func ParseGetTypeQueryParameterType

func ParseGetTypeQueryParameterType(v string) (any, error)

func SerializeGetDirectionQueryParameterType

func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string

func SerializeGetEcosystemQueryParameterType

func SerializeGetEcosystemQueryParameterType(values []GetEcosystemQueryParameterType) []string

func SerializeGetSeverityQueryParameterType

func SerializeGetSeverityQueryParameterType(values []GetSeverityQueryParameterType) []string

func SerializeGetSortQueryParameterType

func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string

func SerializeGetTypeQueryParameterType

func SerializeGetTypeQueryParameterType(values []GetTypeQueryParameterType) []string

Types

type AdvisoriesRequestBuilder

AdvisoriesRequestBuilder builds and executes requests for operations under \advisories

func NewAdvisoriesRequestBuilder

NewAdvisoriesRequestBuilder instantiates a new AdvisoriesRequestBuilder and sets the default values.

func NewAdvisoriesRequestBuilderInternal

func NewAdvisoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *AdvisoriesRequestBuilder

NewAdvisoriesRequestBuilderInternal instantiates a new AdvisoriesRequestBuilder and sets the default values.

func (*AdvisoriesRequestBuilder) ByGhsa_id

ByGhsa_id gets an item from the github.com/octokit/go-sdk/pkg/github.advisories.item collection returns a *WithGhsa_ItemRequestBuilder when successful

func (*AdvisoriesRequestBuilder) Get

Get lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." returns a []GlobalAdvisoryable when successful returns a ValidationErrorSimple error when the service returns a 422 status code returns a BasicError error when the service returns a 429 status code API method documentation

func (*AdvisoriesRequestBuilder) ToGetRequestInformation

ToGetRequestInformation lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." returns a *RequestInformation when successful

func (*AdvisoriesRequestBuilder) WithUrl

WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. returns a *AdvisoriesRequestBuilder when successful

type AdvisoriesRequestBuilderGetQueryParameters

type AdvisoriesRequestBuilderGetQueryParameters struct {
	// If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.If the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.Example: `affects=package1,package2@1.0.0,package3@^2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`
	Affects *string `uriparametername:"affects"`
	// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
	After *string `uriparametername:"after"`
	// A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
	Before *string `uriparametername:"before"`
	// If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned.
	Cve_id *string `uriparametername:"cve_id"`
	// If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.Example: `cwes=79,284,22` or `cwes[]=79&cwes[]=284&cwes[]=22`
	Cwes *string `uriparametername:"cwes"`
	// The direction to sort the results by.
	Direction *GetDirectionQueryParameterType `uriparametername:"direction"`
	// If specified, only advisories for these ecosystems will be returned.
	Ecosystem *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecurityAdvisoryEcosystems `uriparametername:"ecosystem"`
	// If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.
	Ghsa_id *string `uriparametername:"ghsa_id"`
	// Whether to only return advisories that have been withdrawn.
	Is_withdrawn *bool `uriparametername:"is_withdrawn"`
	// If specified, only show advisories that were updated or published on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)."
	Modified *string `uriparametername:"modified"`
	// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
	Per_page *int32 `uriparametername:"per_page"`
	// If specified, only return advisories that were published on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)."
	Published *string `uriparametername:"published"`
	// If specified, only advisories with these severities will be returned.
	Severity *GetSeverityQueryParameterType `uriparametername:"severity"`
	// The property to sort the results by.
	Sort *GetSortQueryParameterType `uriparametername:"sort"`
	// If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware.
	Type *GetTypeQueryParameterType `uriparametername:"type"`
	// If specified, only return advisories that were updated on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)."
	Updated *string `uriparametername:"updated"`
}

AdvisoriesRequestBuilderGetQueryParameters lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)."

type GetDirectionQueryParameterType

type GetDirectionQueryParameterType int
const (
	ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota
	DESC_GETDIRECTIONQUERYPARAMETERTYPE
)

func (GetDirectionQueryParameterType) String

type GetEcosystemQueryParameterType

type GetEcosystemQueryParameterType int
const (
	ACTIONS_GETECOSYSTEMQUERYPARAMETERTYPE GetEcosystemQueryParameterType = iota
	COMPOSER_GETECOSYSTEMQUERYPARAMETERTYPE
	ERLANG_GETECOSYSTEMQUERYPARAMETERTYPE
	GO_GETECOSYSTEMQUERYPARAMETERTYPE
	MAVEN_GETECOSYSTEMQUERYPARAMETERTYPE
	NPM_GETECOSYSTEMQUERYPARAMETERTYPE
	NUGET_GETECOSYSTEMQUERYPARAMETERTYPE
	OTHER_GETECOSYSTEMQUERYPARAMETERTYPE
	PIP_GETECOSYSTEMQUERYPARAMETERTYPE
	PUB_GETECOSYSTEMQUERYPARAMETERTYPE
	RUBYGEMS_GETECOSYSTEMQUERYPARAMETERTYPE
	RUST_GETECOSYSTEMQUERYPARAMETERTYPE
)

func (GetEcosystemQueryParameterType) String

type GetSeverityQueryParameterType

type GetSeverityQueryParameterType int
const (
	UNKNOWN_GETSEVERITYQUERYPARAMETERTYPE GetSeverityQueryParameterType = iota
	LOW_GETSEVERITYQUERYPARAMETERTYPE
	MEDIUM_GETSEVERITYQUERYPARAMETERTYPE
	HIGH_GETSEVERITYQUERYPARAMETERTYPE
	CRITICAL_GETSEVERITYQUERYPARAMETERTYPE
)

func (GetSeverityQueryParameterType) String

type GetSortQueryParameterType

type GetSortQueryParameterType int
const (
	UPDATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota
	PUBLISHED_GETSORTQUERYPARAMETERTYPE
)

func (GetSortQueryParameterType) String

func (i GetSortQueryParameterType) String() string

type GetTypeQueryParameterType

type GetTypeQueryParameterType int
const (
	REVIEWED_GETTYPEQUERYPARAMETERTYPE GetTypeQueryParameterType = iota
	MALWARE_GETTYPEQUERYPARAMETERTYPE
	UNREVIEWED_GETTYPEQUERYPARAMETERTYPE
)

func (GetTypeQueryParameterType) String

func (i GetTypeQueryParameterType) String() string

type WithGhsa_ItemRequestBuilder

WithGhsa_ItemRequestBuilder builds and executes requests for operations under \advisories\{ghsa_id}

func NewWithGhsa_ItemRequestBuilder

NewWithGhsa_ItemRequestBuilder instantiates a new WithGhsa_ItemRequestBuilder and sets the default values.

func NewWithGhsa_ItemRequestBuilderInternal

func NewWithGhsa_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *WithGhsa_ItemRequestBuilder

NewWithGhsa_ItemRequestBuilderInternal instantiates a new WithGhsa_ItemRequestBuilder and sets the default values.

func (*WithGhsa_ItemRequestBuilder) Get

Get gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. returns a GlobalAdvisoryable when successful returns a BasicError error when the service returns a 404 status code API method documentation

func (*WithGhsa_ItemRequestBuilder) ToGetRequestInformation

ToGetRequestInformation gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. returns a *RequestInformation when successful

func (*WithGhsa_ItemRequestBuilder) WithUrl

WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. returns a *WithGhsa_ItemRequestBuilder when successful

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL