local_models

package
v0.0.0-...-46da95b Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package local_models provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

View Source
const (
	DefaultSuppressionExpiration = "never"
)
View Source
const LINKS_KEY_REPORT = "report"

Variables

This section is empty.

Functions

func TranslateMetadataToLocalFindingModel

func TranslateMetadataToLocalFindingModel(resultMetaData *scan.ResultMetaData, localFindings *LocalFinding, config configuration.Configuration)

func UpdateFindingSummary

func UpdateFindingSummary(findingsModel *LocalFinding)

updateFindingsSummary updates the summary of the findings based on their severity levels

Types

type ContentAddress

type ContentAddress struct {
	// contains filtered or unexported fields
}

ContentAddress Content address whence source code can be obtained for scanning.

func (ContentAddress) AsTypesLegacyDeepcodeBundleAddress

func (t ContentAddress) AsTypesLegacyDeepcodeBundleAddress() (TypesLegacyDeepcodeBundleAddress, error)

AsTypesLegacyDeepcodeBundleAddress returns the union data inside the ContentAddress as a TypesLegacyDeepcodeBundleAddress

func (ContentAddress) AsTypesWorkspaceV1Address

func (t ContentAddress) AsTypesWorkspaceV1Address() (TypesWorkspaceV1Address, error)

AsTypesWorkspaceV1Address returns the union data inside the ContentAddress as a TypesWorkspaceV1Address

func (ContentAddress) Discriminator

func (t ContentAddress) Discriminator() (string, error)

func (*ContentAddress) FromTypesLegacyDeepcodeBundleAddress

func (t *ContentAddress) FromTypesLegacyDeepcodeBundleAddress(v TypesLegacyDeepcodeBundleAddress) error

FromTypesLegacyDeepcodeBundleAddress overwrites any union data inside the ContentAddress as the provided TypesLegacyDeepcodeBundleAddress

func (*ContentAddress) FromTypesWorkspaceV1Address

func (t *ContentAddress) FromTypesWorkspaceV1Address(v TypesWorkspaceV1Address) error

FromTypesWorkspaceV1Address overwrites any union data inside the ContentAddress as the provided TypesWorkspaceV1Address

func (ContentAddress) MarshalJSON

func (t ContentAddress) MarshalJSON() ([]byte, error)

func (*ContentAddress) MergeTypesLegacyDeepcodeBundleAddress

func (t *ContentAddress) MergeTypesLegacyDeepcodeBundleAddress(v TypesLegacyDeepcodeBundleAddress) error

MergeTypesLegacyDeepcodeBundleAddress performs a merge with any union data inside the ContentAddress, using the provided TypesLegacyDeepcodeBundleAddress

func (*ContentAddress) MergeTypesWorkspaceV1Address

func (t *ContentAddress) MergeTypesWorkspaceV1Address(v TypesWorkspaceV1Address) error

MergeTypesWorkspaceV1Address performs a merge with any union data inside the ContentAddress, using the provided TypesWorkspaceV1Address

func (*ContentAddress) UnmarshalJSON

func (t *ContentAddress) UnmarshalJSON(b []byte) error

func (ContentAddress) ValueByDiscriminator

func (t ContentAddress) ValueByDiscriminator() (interface{}, error)

type CreateExcludeRule

type CreateExcludeRule struct {
	// contains filtered or unexported fields
}

CreateExcludeRule CreateExcludeRule defines individual rules for exclusion of files during a test. Currently it supports either bare strings as recursive globs, or explicitly stated file patterns as recursive globs.

func (CreateExcludeRule) AsCreateExcludeRule0

func (t CreateExcludeRule) AsCreateExcludeRule0() (CreateExcludeRule0, error)

AsCreateExcludeRule0 returns the union data inside the CreateExcludeRule as a CreateExcludeRule0

func (CreateExcludeRule) AsCreateObjectExcludeRule

func (t CreateExcludeRule) AsCreateObjectExcludeRule() (CreateObjectExcludeRule, error)

AsCreateObjectExcludeRule returns the union data inside the CreateExcludeRule as a CreateObjectExcludeRule

func (*CreateExcludeRule) FromCreateExcludeRule0

func (t *CreateExcludeRule) FromCreateExcludeRule0(v CreateExcludeRule0) error

FromCreateExcludeRule0 overwrites any union data inside the CreateExcludeRule as the provided CreateExcludeRule0

func (*CreateExcludeRule) FromCreateObjectExcludeRule

func (t *CreateExcludeRule) FromCreateObjectExcludeRule(v CreateObjectExcludeRule) error

FromCreateObjectExcludeRule overwrites any union data inside the CreateExcludeRule as the provided CreateObjectExcludeRule

func (CreateExcludeRule) MarshalJSON

func (t CreateExcludeRule) MarshalJSON() ([]byte, error)

func (*CreateExcludeRule) MergeCreateExcludeRule0

func (t *CreateExcludeRule) MergeCreateExcludeRule0(v CreateExcludeRule0) error

MergeCreateExcludeRule0 performs a merge with any union data inside the CreateExcludeRule, using the provided CreateExcludeRule0

func (*CreateExcludeRule) MergeCreateObjectExcludeRule

func (t *CreateExcludeRule) MergeCreateObjectExcludeRule(v CreateObjectExcludeRule) error

MergeCreateObjectExcludeRule performs a merge with any union data inside the CreateExcludeRule, using the provided CreateObjectExcludeRule

func (*CreateExcludeRule) UnmarshalJSON

func (t *CreateExcludeRule) UnmarshalJSON(b []byte) error

type CreateExcludeRule0

type CreateExcludeRule0 = string

CreateExcludeRule0 defines model for .

type CreateObjectExcludeRule

type CreateObjectExcludeRule = TypesFileObjectExcludeRule

CreateObjectExcludeRule defines model for CreateObjectExcludeRule.

type CreateTestJSONRequestBody

type CreateTestJSONRequestBody = TypesCreateTestAttributes

CreateTestJSONRequestBody defines body for CreateTest for application/json ContentType.

type CreateTestParams

type CreateTestParams struct {
	// Version The API version requested.
	Version IoSnykApiRequestSnykApiRequestVersion `form:"version" json:"version"`

	// SnykRequestId A unique ID assigned to each API request, for tracing and troubleshooting.
	//
	// Snyk clients can optionally provide this ID.
	SnykRequestId *IoSnykApiRequestSnykApiRequestRequestId `json:"snyk-request-id,omitempty"`

	// SnykInteractionId Identifies the Snyk client interaction in which this API request occurs.
	//
	// The identifier is an opaque string. though at the time of writing it may either be a
	// uuid or a urn containing a uuid and some metadata.
	// to be safe, the
	SnykInteractionId *IoSnykApiRequestSnykApiRequestInteractionId `json:"snyk-interaction-id,omitempty"`
}

CreateTestParams defines parameters for CreateTest.

type ExcludeRule

type ExcludeRule struct {
	// contains filtered or unexported fields
}

ExcludeRule ExcludeRule defines individual rules for exclusion of files during a test. Currently it supports either bare strings as recursive globs, or explicitly stated file patterns as recursive globs.

func (ExcludeRule) AsExcludeRule0

func (t ExcludeRule) AsExcludeRule0() (ExcludeRule0, error)

AsExcludeRule0 returns the union data inside the ExcludeRule as a ExcludeRule0

func (ExcludeRule) AsObjectExcludeRule

func (t ExcludeRule) AsObjectExcludeRule() (ObjectExcludeRule, error)

AsObjectExcludeRule returns the union data inside the ExcludeRule as a ObjectExcludeRule

func (*ExcludeRule) FromExcludeRule0

func (t *ExcludeRule) FromExcludeRule0(v ExcludeRule0) error

FromExcludeRule0 overwrites any union data inside the ExcludeRule as the provided ExcludeRule0

func (*ExcludeRule) FromObjectExcludeRule

func (t *ExcludeRule) FromObjectExcludeRule(v ObjectExcludeRule) error

FromObjectExcludeRule overwrites any union data inside the ExcludeRule as the provided ObjectExcludeRule

func (ExcludeRule) MarshalJSON

func (t ExcludeRule) MarshalJSON() ([]byte, error)

func (*ExcludeRule) MergeExcludeRule0

func (t *ExcludeRule) MergeExcludeRule0(v ExcludeRule0) error

MergeExcludeRule0 performs a merge with any union data inside the ExcludeRule, using the provided ExcludeRule0

func (*ExcludeRule) MergeObjectExcludeRule

func (t *ExcludeRule) MergeObjectExcludeRule(v ObjectExcludeRule) error

MergeObjectExcludeRule performs a merge with any union data inside the ExcludeRule, using the provided ObjectExcludeRule

func (*ExcludeRule) UnmarshalJSON

func (t *ExcludeRule) UnmarshalJSON(b []byte) error

type ExcludeRule0

type ExcludeRule0 = string

ExcludeRule0 defines model for .

type FindingResource

type FindingResource TypesFindingResource

func NewFindingResource

func NewFindingResource(referenceId *TypesReferenceId, fingerprints []Fingerprint, component TypesComponent, isAutofixable *bool, message TypesFindingMessage, opts ...FindingResourceOption) FindingResource

NewFindingResource creates a new FindingResource with the provided options

type FindingResourceOption

type FindingResourceOption func(*FindingResource)

FindingResourceOption defines a type for functional options to customize FindingResource

func WithCodeFlows

func WithCodeFlows(codeFlows *[]TypesCodeFlow) FindingResourceOption

WithCodeFlows sets the CodeFlows field

func WithLocations

func WithLocations(locations *[]IoSnykReactiveFindingLocation) FindingResourceOption

WithLocations sets the Locations field

func WithPolicy

func WithPolicy(policy *TypesPolicyv1) FindingResourceOption

WithPolicy sets the Policy field

func WithRating

func WithRating(rating *TypesFindingRating) FindingResourceOption

WithRating sets the Rating field

func WithSuggestions

func WithSuggestions(suggestions *[]Suggestion) FindingResourceOption

WithSuggestions sets the Suggestions field

func WithSuppression

func WithSuppression(suppression *TypesSuppression) FindingResourceOption

WithSuppression sets the Suppression field

type Fingerprint

type Fingerprint struct {
	// contains filtered or unexported fields
}

Fingerprint defines model for Fingerprint.

func (Fingerprint) AsTypesCodeSastFingerprintAssetV1

func (t Fingerprint) AsTypesCodeSastFingerprintAssetV1() (TypesCodeSastFingerprintAssetV1, error)

AsTypesCodeSastFingerprintAssetV1 returns the union data inside the Fingerprint as a TypesCodeSastFingerprintAssetV1

func (Fingerprint) AsTypesCodeSastFingerprintProjectV1

func (t Fingerprint) AsTypesCodeSastFingerprintProjectV1() (TypesCodeSastFingerprintProjectV1, error)

AsTypesCodeSastFingerprintProjectV1 returns the union data inside the Fingerprint as a TypesCodeSastFingerprintProjectV1

func (Fingerprint) AsTypesCodeSastFingerprintV0

func (t Fingerprint) AsTypesCodeSastFingerprintV0() (TypesCodeSastFingerprintV0, error)

AsTypesCodeSastFingerprintV0 returns the union data inside the Fingerprint as a TypesCodeSastFingerprintV0

func (Fingerprint) AsTypesCodeSastFingerprintV1

func (t Fingerprint) AsTypesCodeSastFingerprintV1() (TypesCodeSastFingerprintV1, error)

AsTypesCodeSastFingerprintV1 returns the union data inside the Fingerprint as a TypesCodeSastFingerprintV1

func (Fingerprint) AsTypesIdentityFingerprint

func (t Fingerprint) AsTypesIdentityFingerprint() (TypesIdentityFingerprint, error)

AsTypesIdentityFingerprint returns the union data inside the Fingerprint as a TypesIdentityFingerprint

func (Fingerprint) AsTypesScaProblemFingerprint

func (t Fingerprint) AsTypesScaProblemFingerprint() (TypesScaProblemFingerprint, error)

AsTypesScaProblemFingerprint returns the union data inside the Fingerprint as a TypesScaProblemFingerprint

func (Fingerprint) Discriminator

func (t Fingerprint) Discriminator() (string, error)

func (*Fingerprint) FromTypesCodeSastFingerprintAssetV1

func (t *Fingerprint) FromTypesCodeSastFingerprintAssetV1(v TypesCodeSastFingerprintAssetV1) error

FromTypesCodeSastFingerprintAssetV1 overwrites any union data inside the Fingerprint as the provided TypesCodeSastFingerprintAssetV1

func (*Fingerprint) FromTypesCodeSastFingerprintProjectV1

func (t *Fingerprint) FromTypesCodeSastFingerprintProjectV1(v TypesCodeSastFingerprintProjectV1) error

FromTypesCodeSastFingerprintProjectV1 overwrites any union data inside the Fingerprint as the provided TypesCodeSastFingerprintProjectV1

func (*Fingerprint) FromTypesCodeSastFingerprintV0

func (t *Fingerprint) FromTypesCodeSastFingerprintV0(v TypesCodeSastFingerprintV0) error

FromTypesCodeSastFingerprintV0 overwrites any union data inside the Fingerprint as the provided TypesCodeSastFingerprintV0

func (*Fingerprint) FromTypesCodeSastFingerprintV1

func (t *Fingerprint) FromTypesCodeSastFingerprintV1(v TypesCodeSastFingerprintV1) error

FromTypesCodeSastFingerprintV1 overwrites any union data inside the Fingerprint as the provided TypesCodeSastFingerprintV1

func (*Fingerprint) FromTypesIdentityFingerprint

func (t *Fingerprint) FromTypesIdentityFingerprint(v TypesIdentityFingerprint) error

FromTypesIdentityFingerprint overwrites any union data inside the Fingerprint as the provided TypesIdentityFingerprint

func (*Fingerprint) FromTypesScaProblemFingerprint

func (t *Fingerprint) FromTypesScaProblemFingerprint(v TypesScaProblemFingerprint) error

FromTypesScaProblemFingerprint overwrites any union data inside the Fingerprint as the provided TypesScaProblemFingerprint

func (Fingerprint) MarshalJSON

func (t Fingerprint) MarshalJSON() ([]byte, error)

func (*Fingerprint) MergeTypesCodeSastFingerprintAssetV1

func (t *Fingerprint) MergeTypesCodeSastFingerprintAssetV1(v TypesCodeSastFingerprintAssetV1) error

MergeTypesCodeSastFingerprintAssetV1 performs a merge with any union data inside the Fingerprint, using the provided TypesCodeSastFingerprintAssetV1

func (*Fingerprint) MergeTypesCodeSastFingerprintProjectV1

func (t *Fingerprint) MergeTypesCodeSastFingerprintProjectV1(v TypesCodeSastFingerprintProjectV1) error

MergeTypesCodeSastFingerprintProjectV1 performs a merge with any union data inside the Fingerprint, using the provided TypesCodeSastFingerprintProjectV1

func (*Fingerprint) MergeTypesCodeSastFingerprintV0

func (t *Fingerprint) MergeTypesCodeSastFingerprintV0(v TypesCodeSastFingerprintV0) error

MergeTypesCodeSastFingerprintV0 performs a merge with any union data inside the Fingerprint, using the provided TypesCodeSastFingerprintV0

func (*Fingerprint) MergeTypesCodeSastFingerprintV1

func (t *Fingerprint) MergeTypesCodeSastFingerprintV1(v TypesCodeSastFingerprintV1) error

MergeTypesCodeSastFingerprintV1 performs a merge with any union data inside the Fingerprint, using the provided TypesCodeSastFingerprintV1

func (*Fingerprint) MergeTypesIdentityFingerprint

func (t *Fingerprint) MergeTypesIdentityFingerprint(v TypesIdentityFingerprint) error

MergeTypesIdentityFingerprint performs a merge with any union data inside the Fingerprint, using the provided TypesIdentityFingerprint

func (*Fingerprint) MergeTypesScaProblemFingerprint

func (t *Fingerprint) MergeTypesScaProblemFingerprint(v TypesScaProblemFingerprint) error

MergeTypesScaProblemFingerprint performs a merge with any union data inside the Fingerprint, using the provided TypesScaProblemFingerprint

func (*Fingerprint) UnmarshalJSON

func (t *Fingerprint) UnmarshalJSON(b []byte) error

func (Fingerprint) ValueByDiscriminator

func (t Fingerprint) ValueByDiscriminator() (interface{}, error)

type GetRulesParams

type GetRulesParams struct {
	// Version The API version requested.
	Version IoSnykApiRequestSnykApiRequestVersion `form:"version" json:"version"`

	// SnykRequestId A unique ID assigned to each API request, for tracing and troubleshooting.
	//
	// Snyk clients can optionally provide this ID.
	SnykRequestId *IoSnykApiRequestSnykApiRequestRequestId `json:"snyk-request-id,omitempty"`

	// SnykInteractionId Identifies the Snyk client interaction in which this API request occurs.
	//
	// The identifier is an opaque string. though at the time of writing it may either be a
	// uuid or a urn containing a uuid and some metadata.
	// to be safe, the
	SnykInteractionId *IoSnykApiRequestSnykApiRequestInteractionId `json:"snyk-interaction-id,omitempty"`
}

GetRulesParams defines parameters for GetRules.

type GetTestParams

type GetTestParams struct {
	// Version The API version requested.
	Version IoSnykApiRequestSnykApiRequestVersion `form:"version" json:"version"`

	// SnykRequestId A unique ID assigned to each API request, for tracing and troubleshooting.
	//
	// Snyk clients can optionally provide this ID.
	SnykRequestId *IoSnykApiRequestSnykApiRequestRequestId `json:"snyk-request-id,omitempty"`

	// SnykInteractionId Identifies the Snyk client interaction in which this API request occurs.
	//
	// The identifier is an opaque string. though at the time of writing it may either be a
	// uuid or a urn containing a uuid and some metadata.
	// to be safe, the
	SnykInteractionId *IoSnykApiRequestSnykApiRequestInteractionId `json:"snyk-interaction-id,omitempty"`
}

GetTestParams defines parameters for GetTest.

type IoSnykApiCommonError

type IoSnykApiCommonError struct {
	// Code An application-specific error code, expressed as a string value.
	Code *string `json:"code,omitempty"`

	// Detail A human-readable explanation specific to this occurrence of the problem.
	Detail string `json:"detail"`

	// Id A unique identifier for this particular occurrence of the problem.
	Id *openapi_types.UUID `json:"id,omitempty"`

	// Links A link that leads to further details about this particular occurrance of the problem.
	Links  *IoSnykApiCommonErrorLink `json:"links,omitempty"`
	Meta   *map[string]interface{}   `json:"meta,omitempty"`
	Source *struct {
		Parameter *string `json:"parameter,omitempty"`
		Pointer   *string `json:"pointer,omitempty"`
	} `json:"source,omitempty"`

	// Status The HTTP status code applicable to this problem, expressed as a string value.
	Status string `json:"status"`

	// Title A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
	Title *string `json:"title,omitempty"`
}

IoSnykApiCommonError defines model for io.snyk.api.common.Error.

type IoSnykApiCommonErrorDocument

type IoSnykApiCommonErrorDocument struct {
	Errors  []IoSnykApiCommonError `json:"errors"`
	Jsonapi IoSnykApiCommonJsonApi `json:"jsonapi"`
}

IoSnykApiCommonErrorDocument defines model for io.snyk.api.common.ErrorDocument.

type IoSnykApiCommonErrorLink struct {
	About                *LinkProperty           `json:"about,omitempty"`
	AdditionalProperties map[string]LinkProperty `json:"-"`
}

IoSnykApiCommonErrorLink A link that leads to further details about this particular occurrance of the problem.

func (IoSnykApiCommonErrorLink) Get

func (a IoSnykApiCommonErrorLink) Get(fieldName string) (value LinkProperty, found bool)

Getter for additional properties for IoSnykApiCommonErrorLink. Returns the specified element and whether it was found

func (IoSnykApiCommonErrorLink) MarshalJSON

func (a IoSnykApiCommonErrorLink) MarshalJSON() ([]byte, error)

Override default JSON handling for IoSnykApiCommonErrorLink to handle AdditionalProperties

func (*IoSnykApiCommonErrorLink) Set

func (a *IoSnykApiCommonErrorLink) Set(fieldName string, value LinkProperty)

Setter for additional properties for IoSnykApiCommonErrorLink

func (*IoSnykApiCommonErrorLink) UnmarshalJSON

func (a *IoSnykApiCommonErrorLink) UnmarshalJSON(b []byte) error

Override default JSON handling for IoSnykApiCommonErrorLink to handle AdditionalProperties

type IoSnykApiCommonJsonApi

type IoSnykApiCommonJsonApi struct {
	// Version Version of the JSON API specification this server supports.
	Version IoSnykApiCommonJsonApiVersion `json:"version"`
}

IoSnykApiCommonJsonApi defines model for io.snyk.api.common.JsonApi.

type IoSnykApiCommonJsonApiVersion

type IoSnykApiCommonJsonApiVersion string

IoSnykApiCommonJsonApiVersion Version of the JSON API specification this server supports.

const (
	N10 IoSnykApiCommonJsonApiVersion = "1.0"
)

Defines values for IoSnykApiCommonJsonApiVersion.

type IoSnykApiCommonLinkObject

type IoSnykApiCommonLinkObject struct {
	Href IoSnykApiCommonLinkString `json:"href"`

	// Meta Free-form object that may contain non-standard information.
	Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
}

IoSnykApiCommonLinkObject defines model for io.snyk.api.common.LinkObject.

type IoSnykApiCommonLinkString

type IoSnykApiCommonLinkString = string

IoSnykApiCommonLinkString defines model for io.snyk.api.common.LinkString.

type IoSnykApiCommonMeta

type IoSnykApiCommonMeta map[string]interface{}

IoSnykApiCommonMeta Free-form object that may contain non-standard information.

type IoSnykApiCommonPaginatedLinks struct {
	First *LinkProperty `json:"first,omitempty"`
	Last  *LinkProperty `json:"last,omitempty"`
	Next  *LinkProperty `json:"next,omitempty"`
	Prev  *LinkProperty `json:"prev,omitempty"`
	Self  *LinkProperty `json:"self,omitempty"`
}

IoSnykApiCommonPaginatedLinks defines model for io.snyk.api.common.PaginatedLinks.

type IoSnykApiCommonRelatedLink struct {
	Related *LinkProperty `json:"related,omitempty"`
}

IoSnykApiCommonRelatedLink defines model for io.snyk.api.common.RelatedLink.

type IoSnykApiRequestPaginatedRequestEndingBefore

type IoSnykApiRequestPaginatedRequestEndingBefore = string

IoSnykApiRequestPaginatedRequestEndingBefore defines model for io.snyk.api.request.PaginatedRequest.ending_before.

type IoSnykApiRequestPaginatedRequestLimit

type IoSnykApiRequestPaginatedRequestLimit = int8

IoSnykApiRequestPaginatedRequestLimit defines model for io.snyk.api.request.PaginatedRequest.limit.

type IoSnykApiRequestPaginatedRequestStartingAfter

type IoSnykApiRequestPaginatedRequestStartingAfter = string

IoSnykApiRequestPaginatedRequestStartingAfter defines model for io.snyk.api.request.PaginatedRequest.starting_after.

type IoSnykApiRequestSnykApiRequestInteractionId

type IoSnykApiRequestSnykApiRequestInteractionId = string

IoSnykApiRequestSnykApiRequestInteractionId defines model for io.snyk.api.request.SnykApiRequest.interactionId.

type IoSnykApiRequestSnykApiRequestRequestId

type IoSnykApiRequestSnykApiRequestRequestId = openapi_types.UUID

IoSnykApiRequestSnykApiRequestRequestId defines model for io.snyk.api.request.SnykApiRequest.requestId.

type IoSnykApiRequestSnykApiRequestVersion

type IoSnykApiRequestSnykApiRequestVersion = string

IoSnykApiRequestSnykApiRequestVersion defines model for io.snyk.api.request.SnykApiRequest.version.

type IoSnykReactiveFindingLocation

type IoSnykReactiveFindingLocation struct {
	DependencyPath *[]IoSnykReactiveScaPackage `json:"dependency_path,omitempty"`

	// SourceLocations Original locations are necessary for "existing" and "removed" findings. Locations should be available for all scan types where possible.
	SourceLocations *IoSnykReactiveFindingSourceLocation `json:"source_locations,omitempty"`
}

IoSnykReactiveFindingLocation defines model for io.snyk.reactive.FindingLocation.

type IoSnykReactiveFindingSourceLocation

type IoSnykReactiveFindingSourceLocation struct {
	// Filepath Maps `sarif.Runs.Results.Location.PhysicalLocation.ArtifactLocation.URI`
	Filepath string `json:"filepath"`

	// OriginalEndColumn Maps `sarif.Runs.Results.Location.PhysicalLocation.Region.EndColumn`
	OriginalEndColumn int `json:"original_end_column"`

	// OriginalEndLine Maps `sarif.Runs.Results.Location.PhysicalLocation.Region.EndLine`
	OriginalEndLine int `json:"original_end_line"`

	// OriginalStartColumn Maps `sarif.Runs.Results.Location.PhysicalLocation.Region.StartColumn`
	OriginalStartColumn int `json:"original_start_column"`

	// OriginalStartLine Maps `sarif.Runs.Results.Location.PhysicalLocation.Region.StartLine`
	OriginalStartLine int `json:"original_start_line"`
}

IoSnykReactiveFindingSourceLocation Original locations are necessary for "existing" and "removed" findings. Locations should be available for all scan types where possible.

type IoSnykReactiveScaPackage

type IoSnykReactiveScaPackage struct {
	PackageName    string `json:"package_name"`
	PackageVersion string `json:"package_version"`
}

IoSnykReactiveScaPackage defines model for io.snyk.reactive.ScaPackage.

type LinkProperty

type LinkProperty struct {
	// contains filtered or unexported fields
}

LinkProperty defines model for LinkProperty.

func (LinkProperty) AsIoSnykApiCommonLinkObject

func (t LinkProperty) AsIoSnykApiCommonLinkObject() (IoSnykApiCommonLinkObject, error)

AsIoSnykApiCommonLinkObject returns the union data inside the LinkProperty as a IoSnykApiCommonLinkObject

func (LinkProperty) AsIoSnykApiCommonLinkString

func (t LinkProperty) AsIoSnykApiCommonLinkString() (IoSnykApiCommonLinkString, error)

AsIoSnykApiCommonLinkString returns the union data inside the LinkProperty as a IoSnykApiCommonLinkString

func (*LinkProperty) FromIoSnykApiCommonLinkObject

func (t *LinkProperty) FromIoSnykApiCommonLinkObject(v IoSnykApiCommonLinkObject) error

FromIoSnykApiCommonLinkObject overwrites any union data inside the LinkProperty as the provided IoSnykApiCommonLinkObject

func (*LinkProperty) FromIoSnykApiCommonLinkString

func (t *LinkProperty) FromIoSnykApiCommonLinkString(v IoSnykApiCommonLinkString) error

FromIoSnykApiCommonLinkString overwrites any union data inside the LinkProperty as the provided IoSnykApiCommonLinkString

func (LinkProperty) MarshalJSON

func (t LinkProperty) MarshalJSON() ([]byte, error)

func (*LinkProperty) MergeIoSnykApiCommonLinkObject

func (t *LinkProperty) MergeIoSnykApiCommonLinkObject(v IoSnykApiCommonLinkObject) error

MergeIoSnykApiCommonLinkObject performs a merge with any union data inside the LinkProperty, using the provided IoSnykApiCommonLinkObject

func (*LinkProperty) MergeIoSnykApiCommonLinkString

func (t *LinkProperty) MergeIoSnykApiCommonLinkString(v IoSnykApiCommonLinkString) error

MergeIoSnykApiCommonLinkString performs a merge with any union data inside the LinkProperty, using the provided IoSnykApiCommonLinkString

func (*LinkProperty) UnmarshalJSON

func (t *LinkProperty) UnmarshalJSON(b []byte) error

type ListFindingsParams

type ListFindingsParams struct {
	// Version The API version requested.
	Version IoSnykApiRequestSnykApiRequestVersion `form:"version" json:"version"`

	// StartingAfter Opaque pagination cursor for forward traversal.
	StartingAfter *IoSnykApiRequestPaginatedRequestStartingAfter `form:"starting_after,omitempty" json:"starting_after,omitempty"`

	// EndingBefore Opaque pagination cursor for reverse traversal.
	EndingBefore *IoSnykApiRequestPaginatedRequestEndingBefore `form:"ending_before,omitempty" json:"ending_before,omitempty"`

	// Limit The number of items to return.
	Limit *IoSnykApiRequestPaginatedRequestLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// SnykRequestId A unique ID assigned to each API request, for tracing and troubleshooting.
	//
	// Snyk clients can optionally provide this ID.
	SnykRequestId *IoSnykApiRequestSnykApiRequestRequestId `json:"snyk-request-id,omitempty"`

	// SnykInteractionId Identifies the Snyk client interaction in which this API request occurs.
	//
	// The identifier is an opaque string. though at the time of writing it may either be a
	// uuid or a urn containing a uuid and some metadata.
	// to be safe, the
	SnykInteractionId *IoSnykApiRequestSnykApiRequestInteractionId `json:"snyk-interaction-id,omitempty"`
}

ListFindingsParams defines parameters for ListFindings.

type LocalFinding

type LocalFinding struct {
	Findings []FindingResource    `json:"findings"`
	Outcome  TestOutcome          `json:"outcome"`
	Rules    []TypesRules         `json:"rules"`
	Summary  TypesFindingsSummary `json:"summary"`
	Links    map[string]string    `json:"links"`
}

TODO: This schema should be imported from Dragonfly

func TransformToLocalFindingModelFromSarif

func TransformToLocalFindingModelFromSarif(sarifDoc *sarif.SarifDocument, testSummary *json_schemas.TestSummary) (localFinding LocalFinding, err error)

type ObjectExcludeRule

type ObjectExcludeRule struct {
	// contains filtered or unexported fields
}

ObjectExcludeRule defines model for ObjectExcludeRule.

func (ObjectExcludeRule) AsTypesFileObjectExcludeRule

func (t ObjectExcludeRule) AsTypesFileObjectExcludeRule() (TypesFileObjectExcludeRule, error)

AsTypesFileObjectExcludeRule returns the union data inside the ObjectExcludeRule as a TypesFileObjectExcludeRule

func (ObjectExcludeRule) AsTypesOtherObjectExcludeRule

func (t ObjectExcludeRule) AsTypesOtherObjectExcludeRule() (TypesOtherObjectExcludeRule, error)

AsTypesOtherObjectExcludeRule returns the union data inside the ObjectExcludeRule as a TypesOtherObjectExcludeRule

func (ObjectExcludeRule) Discriminator

func (t ObjectExcludeRule) Discriminator() (string, error)

func (*ObjectExcludeRule) FromTypesFileObjectExcludeRule

func (t *ObjectExcludeRule) FromTypesFileObjectExcludeRule(v TypesFileObjectExcludeRule) error

FromTypesFileObjectExcludeRule overwrites any union data inside the ObjectExcludeRule as the provided TypesFileObjectExcludeRule

func (*ObjectExcludeRule) FromTypesOtherObjectExcludeRule

func (t *ObjectExcludeRule) FromTypesOtherObjectExcludeRule(v TypesOtherObjectExcludeRule) error

FromTypesOtherObjectExcludeRule overwrites any union data inside the ObjectExcludeRule as the provided TypesOtherObjectExcludeRule

func (ObjectExcludeRule) MarshalJSON

func (t ObjectExcludeRule) MarshalJSON() ([]byte, error)

func (*ObjectExcludeRule) MergeTypesFileObjectExcludeRule

func (t *ObjectExcludeRule) MergeTypesFileObjectExcludeRule(v TypesFileObjectExcludeRule) error

MergeTypesFileObjectExcludeRule performs a merge with any union data inside the ObjectExcludeRule, using the provided TypesFileObjectExcludeRule

func (*ObjectExcludeRule) MergeTypesOtherObjectExcludeRule

func (t *ObjectExcludeRule) MergeTypesOtherObjectExcludeRule(v TypesOtherObjectExcludeRule) error

MergeTypesOtherObjectExcludeRule performs a merge with any union data inside the ObjectExcludeRule, using the provided TypesOtherObjectExcludeRule

func (*ObjectExcludeRule) UnmarshalJSON

func (t *ObjectExcludeRule) UnmarshalJSON(b []byte) error

func (ObjectExcludeRule) ValueByDiscriminator

func (t ObjectExcludeRule) ValueByDiscriminator() (interface{}, error)

type Package

type Package struct {
	// contains filtered or unexported fields
}

Package A Package is either a Package URL (pURL) or a decomposed PackageObject identifying a software package.

See https://github.com/package-url/purl-spec for more information about pURLs.

func (Package) AsTypesPackageObject

func (t Package) AsTypesPackageObject() (TypesPackageObject, error)

AsTypesPackageObject returns the union data inside the Package as a TypesPackageObject

func (Package) AsTypesPackageURL

func (t Package) AsTypesPackageURL() (TypesPackageURL, error)

AsTypesPackageURL returns the union data inside the Package as a TypesPackageURL

func (*Package) FromTypesPackageObject

func (t *Package) FromTypesPackageObject(v TypesPackageObject) error

FromTypesPackageObject overwrites any union data inside the Package as the provided TypesPackageObject

func (*Package) FromTypesPackageURL

func (t *Package) FromTypesPackageURL(v TypesPackageURL) error

FromTypesPackageURL overwrites any union data inside the Package as the provided TypesPackageURL

func (Package) MarshalJSON

func (t Package) MarshalJSON() ([]byte, error)

func (*Package) MergeTypesPackageObject

func (t *Package) MergeTypesPackageObject(v TypesPackageObject) error

MergeTypesPackageObject performs a merge with any union data inside the Package, using the provided TypesPackageObject

func (*Package) MergeTypesPackageURL

func (t *Package) MergeTypesPackageURL(v TypesPackageURL) error

MergeTypesPackageURL performs a merge with any union data inside the Package, using the provided TypesPackageURL

func (*Package) UnmarshalJSON

func (t *Package) UnmarshalJSON(b []byte) error

type RiskFactors

type RiskFactors struct {
	// contains filtered or unexported fields
}

RiskFactors defines model for RiskFactors.

func (RiskFactors) AsTypesBusinessCriticalityRiskFactor

func (t RiskFactors) AsTypesBusinessCriticalityRiskFactor() (TypesBusinessCriticalityRiskFactor, error)

AsTypesBusinessCriticalityRiskFactor returns the union data inside the RiskFactors as a TypesBusinessCriticalityRiskFactor

func (RiskFactors) AsTypesCvssRiskFactor

func (t RiskFactors) AsTypesCvssRiskFactor() (TypesCvssRiskFactor, error)

AsTypesCvssRiskFactor returns the union data inside the RiskFactors as a TypesCvssRiskFactor

func (RiskFactors) AsTypesEpssRiskFactor

func (t RiskFactors) AsTypesEpssRiskFactor() (TypesEpssRiskFactor, error)

AsTypesEpssRiskFactor returns the union data inside the RiskFactors as a TypesEpssRiskFactor

func (RiskFactors) AsTypesVulnerabilityFactRiskFactor

func (t RiskFactors) AsTypesVulnerabilityFactRiskFactor() (TypesVulnerabilityFactRiskFactor, error)

AsTypesVulnerabilityFactRiskFactor returns the union data inside the RiskFactors as a TypesVulnerabilityFactRiskFactor

func (RiskFactors) AsTypesVulnerabilityGenericFactor

func (t RiskFactors) AsTypesVulnerabilityGenericFactor() (TypesVulnerabilityGenericFactor, error)

AsTypesVulnerabilityGenericFactor returns the union data inside the RiskFactors as a TypesVulnerabilityGenericFactor

func (RiskFactors) AsTypesVulnerabilityInstanceFactRiskFactor

func (t RiskFactors) AsTypesVulnerabilityInstanceFactRiskFactor() (TypesVulnerabilityInstanceFactRiskFactor, error)

AsTypesVulnerabilityInstanceFactRiskFactor returns the union data inside the RiskFactors as a TypesVulnerabilityInstanceFactRiskFactor

func (RiskFactors) Discriminator

func (t RiskFactors) Discriminator() (string, error)

func (*RiskFactors) FromTypesBusinessCriticalityRiskFactor

func (t *RiskFactors) FromTypesBusinessCriticalityRiskFactor(v TypesBusinessCriticalityRiskFactor) error

FromTypesBusinessCriticalityRiskFactor overwrites any union data inside the RiskFactors as the provided TypesBusinessCriticalityRiskFactor

func (*RiskFactors) FromTypesCvssRiskFactor

func (t *RiskFactors) FromTypesCvssRiskFactor(v TypesCvssRiskFactor) error

FromTypesCvssRiskFactor overwrites any union data inside the RiskFactors as the provided TypesCvssRiskFactor

func (*RiskFactors) FromTypesEpssRiskFactor

func (t *RiskFactors) FromTypesEpssRiskFactor(v TypesEpssRiskFactor) error

FromTypesEpssRiskFactor overwrites any union data inside the RiskFactors as the provided TypesEpssRiskFactor

func (*RiskFactors) FromTypesVulnerabilityFactRiskFactor

func (t *RiskFactors) FromTypesVulnerabilityFactRiskFactor(v TypesVulnerabilityFactRiskFactor) error

FromTypesVulnerabilityFactRiskFactor overwrites any union data inside the RiskFactors as the provided TypesVulnerabilityFactRiskFactor

func (*RiskFactors) FromTypesVulnerabilityGenericFactor

func (t *RiskFactors) FromTypesVulnerabilityGenericFactor(v TypesVulnerabilityGenericFactor) error

FromTypesVulnerabilityGenericFactor overwrites any union data inside the RiskFactors as the provided TypesVulnerabilityGenericFactor

func (*RiskFactors) FromTypesVulnerabilityInstanceFactRiskFactor

func (t *RiskFactors) FromTypesVulnerabilityInstanceFactRiskFactor(v TypesVulnerabilityInstanceFactRiskFactor) error

FromTypesVulnerabilityInstanceFactRiskFactor overwrites any union data inside the RiskFactors as the provided TypesVulnerabilityInstanceFactRiskFactor

func (RiskFactors) MarshalJSON

func (t RiskFactors) MarshalJSON() ([]byte, error)

func (*RiskFactors) MergeTypesBusinessCriticalityRiskFactor

func (t *RiskFactors) MergeTypesBusinessCriticalityRiskFactor(v TypesBusinessCriticalityRiskFactor) error

MergeTypesBusinessCriticalityRiskFactor performs a merge with any union data inside the RiskFactors, using the provided TypesBusinessCriticalityRiskFactor

func (*RiskFactors) MergeTypesCvssRiskFactor

func (t *RiskFactors) MergeTypesCvssRiskFactor(v TypesCvssRiskFactor) error

MergeTypesCvssRiskFactor performs a merge with any union data inside the RiskFactors, using the provided TypesCvssRiskFactor

func (*RiskFactors) MergeTypesEpssRiskFactor

func (t *RiskFactors) MergeTypesEpssRiskFactor(v TypesEpssRiskFactor) error

MergeTypesEpssRiskFactor performs a merge with any union data inside the RiskFactors, using the provided TypesEpssRiskFactor

func (*RiskFactors) MergeTypesVulnerabilityFactRiskFactor

func (t *RiskFactors) MergeTypesVulnerabilityFactRiskFactor(v TypesVulnerabilityFactRiskFactor) error

MergeTypesVulnerabilityFactRiskFactor performs a merge with any union data inside the RiskFactors, using the provided TypesVulnerabilityFactRiskFactor

func (*RiskFactors) MergeTypesVulnerabilityGenericFactor

func (t *RiskFactors) MergeTypesVulnerabilityGenericFactor(v TypesVulnerabilityGenericFactor) error

MergeTypesVulnerabilityGenericFactor performs a merge with any union data inside the RiskFactors, using the provided TypesVulnerabilityGenericFactor

func (*RiskFactors) MergeTypesVulnerabilityInstanceFactRiskFactor

func (t *RiskFactors) MergeTypesVulnerabilityInstanceFactRiskFactor(v TypesVulnerabilityInstanceFactRiskFactor) error

MergeTypesVulnerabilityInstanceFactRiskFactor performs a merge with any union data inside the RiskFactors, using the provided TypesVulnerabilityInstanceFactRiskFactor

func (*RiskFactors) UnmarshalJSON

func (t *RiskFactors) UnmarshalJSON(b []byte) error

func (RiskFactors) ValueByDiscriminator

func (t RiskFactors) ValueByDiscriminator() (interface{}, error)

type Suggestion

type Suggestion struct {
	// contains filtered or unexported fields
}

Suggestion Suggestions are indications given to the user that might help with mitigating the finding.

func (Suggestion) AsTypesSuggestedOther

func (t Suggestion) AsTypesSuggestedOther() (TypesSuggestedOther, error)

AsTypesSuggestedOther returns the union data inside the Suggestion as a TypesSuggestedOther

func (Suggestion) AsTypesSuggestedPackageUpgrade

func (t Suggestion) AsTypesSuggestedPackageUpgrade() (TypesSuggestedPackageUpgrade, error)

AsTypesSuggestedPackageUpgrade returns the union data inside the Suggestion as a TypesSuggestedPackageUpgrade

func (Suggestion) Discriminator

func (t Suggestion) Discriminator() (string, error)

func (*Suggestion) FromTypesSuggestedOther

func (t *Suggestion) FromTypesSuggestedOther(v TypesSuggestedOther) error

FromTypesSuggestedOther overwrites any union data inside the Suggestion as the provided TypesSuggestedOther

func (*Suggestion) FromTypesSuggestedPackageUpgrade

func (t *Suggestion) FromTypesSuggestedPackageUpgrade(v TypesSuggestedPackageUpgrade) error

FromTypesSuggestedPackageUpgrade overwrites any union data inside the Suggestion as the provided TypesSuggestedPackageUpgrade

func (Suggestion) MarshalJSON

func (t Suggestion) MarshalJSON() ([]byte, error)

func (*Suggestion) MergeTypesSuggestedOther

func (t *Suggestion) MergeTypesSuggestedOther(v TypesSuggestedOther) error

MergeTypesSuggestedOther performs a merge with any union data inside the Suggestion, using the provided TypesSuggestedOther

func (*Suggestion) MergeTypesSuggestedPackageUpgrade

func (t *Suggestion) MergeTypesSuggestedPackageUpgrade(v TypesSuggestedPackageUpgrade) error

MergeTypesSuggestedPackageUpgrade performs a merge with any union data inside the Suggestion, using the provided TypesSuggestedPackageUpgrade

func (*Suggestion) UnmarshalJSON

func (t *Suggestion) UnmarshalJSON(b []byte) error

func (Suggestion) ValueByDiscriminator

func (t Suggestion) ValueByDiscriminator() (interface{}, error)

type TestInput

type TestInput struct {
	// contains filtered or unexported fields
}

TestInput TestInput defines what will be tested.

Another term for this might be "test coordinates".

func (TestInput) AsTypesContentAddressInput

func (t TestInput) AsTypesContentAddressInput() (TypesContentAddressInput, error)

AsTypesContentAddressInput returns the union data inside the TestInput as a TypesContentAddressInput

func (TestInput) AsTypesGitSCMInput

func (t TestInput) AsTypesGitSCMInput() (TypesGitSCMInput, error)

AsTypesGitSCMInput returns the union data inside the TestInput as a TypesGitSCMInput

func (TestInput) Discriminator

func (t TestInput) Discriminator() (string, error)

func (*TestInput) FromTypesContentAddressInput

func (t *TestInput) FromTypesContentAddressInput(v TypesContentAddressInput) error

FromTypesContentAddressInput overwrites any union data inside the TestInput as the provided TypesContentAddressInput

func (*TestInput) FromTypesGitSCMInput

func (t *TestInput) FromTypesGitSCMInput(v TypesGitSCMInput) error

FromTypesGitSCMInput overwrites any union data inside the TestInput as the provided TypesGitSCMInput

func (TestInput) MarshalJSON

func (t TestInput) MarshalJSON() ([]byte, error)

func (*TestInput) MergeTypesContentAddressInput

func (t *TestInput) MergeTypesContentAddressInput(v TypesContentAddressInput) error

MergeTypesContentAddressInput performs a merge with any union data inside the TestInput, using the provided TypesContentAddressInput

func (*TestInput) MergeTypesGitSCMInput

func (t *TestInput) MergeTypesGitSCMInput(v TypesGitSCMInput) error

MergeTypesGitSCMInput performs a merge with any union data inside the TestInput, using the provided TypesGitSCMInput

func (*TestInput) UnmarshalJSON

func (t *TestInput) UnmarshalJSON(b []byte) error

func (TestInput) ValueByDiscriminator

func (t TestInput) ValueByDiscriminator() (interface{}, error)

type TestOutcome

type TestOutcome TypesTestOutcome

type TypesBusinessCriticalityRiskFactor

type TypesBusinessCriticalityRiskFactor struct {
	Factor TypesBusinessCriticalityRiskFactorFactor `json:"factor"`
	Value  TypesBusinessCriticalityRiskFactorValue  `json:"value"`
}

TypesBusinessCriticalityRiskFactor defines model for types.BusinessCriticalityRiskFactor.

type TypesBusinessCriticalityRiskFactorFactor

type TypesBusinessCriticalityRiskFactorFactor string

TypesBusinessCriticalityRiskFactorFactor defines model for TypesBusinessCriticalityRiskFactor.Factor.

const (
	BusinessCriticality TypesBusinessCriticalityRiskFactorFactor = "business-criticality"
)

Defines values for TypesBusinessCriticalityRiskFactorFactor.

type TypesBusinessCriticalityRiskFactorValue

type TypesBusinessCriticalityRiskFactorValue string

TypesBusinessCriticalityRiskFactorValue defines model for TypesBusinessCriticalityRiskFactor.Value.

const (
	TypesBusinessCriticalityRiskFactorValueHigh   TypesBusinessCriticalityRiskFactorValue = "high"
	TypesBusinessCriticalityRiskFactorValueLow    TypesBusinessCriticalityRiskFactorValue = "low"
	TypesBusinessCriticalityRiskFactorValueMedium TypesBusinessCriticalityRiskFactorValue = "medium"
)

Defines values for TypesBusinessCriticalityRiskFactorValue.

type TypesCodeFlow

type TypesCodeFlow struct {
	ThreadFlows []TypesThreadFlow `json:"threadFlows"`
}

TypesCodeFlow defines model for types.CodeFlow.

type TypesCodeSastFingerprintAssetV1

type TypesCodeSastFingerprintAssetV1 struct {
	Scheme TypesCodeSastFingerprintAssetV1Scheme `json:"scheme"`
	Value  string                                `json:"value"`
}

TypesCodeSastFingerprintAssetV1 defines model for types.CodeSastFingerprintAssetV1.

type TypesCodeSastFingerprintAssetV1Scheme

type TypesCodeSastFingerprintAssetV1Scheme string

TypesCodeSastFingerprintAssetV1Scheme defines model for TypesCodeSastFingerprintAssetV1.Scheme.

const (
	Snykassetfindingv1 TypesCodeSastFingerprintAssetV1Scheme = "snyk/asset/finding/v1"
)

Defines values for TypesCodeSastFingerprintAssetV1Scheme.

type TypesCodeSastFingerprintProjectV1

type TypesCodeSastFingerprintProjectV1 struct {
	Scheme TypesCodeSastFingerprintProjectV1Scheme `json:"scheme"`
	Value  string                                  `json:"value"`
}

TypesCodeSastFingerprintProjectV1 defines model for types.CodeSastFingerprintProjectV1.

type TypesCodeSastFingerprintProjectV1Scheme

type TypesCodeSastFingerprintProjectV1Scheme string

TypesCodeSastFingerprintProjectV1Scheme defines model for TypesCodeSastFingerprintProjectV1.Scheme.

const (
	Snykorgprojectfindingv1 TypesCodeSastFingerprintProjectV1Scheme = "snyk/org/project/finding/v1"
)

Defines values for TypesCodeSastFingerprintProjectV1Scheme.

type TypesCodeSastFingerprintV0

type TypesCodeSastFingerprintV0 struct {
	Scheme TypesCodeSastFingerprintV0Scheme `json:"scheme"`
	Value  string                           `json:"value"`
}

TypesCodeSastFingerprintV0 defines model for types.CodeSastFingerprintV0.

type TypesCodeSastFingerprintV0Scheme

type TypesCodeSastFingerprintV0Scheme string

TypesCodeSastFingerprintV0Scheme defines model for TypesCodeSastFingerprintV0.Scheme.

const (
	CodeSastV0 TypesCodeSastFingerprintV0Scheme = "code-sast-v0"
)

Defines values for TypesCodeSastFingerprintV0Scheme.

type TypesCodeSastFingerprintV1

type TypesCodeSastFingerprintV1 struct {
	Scheme TypesCodeSastFingerprintV1Scheme `json:"scheme"`
	Value  string                           `json:"value"`
}

TypesCodeSastFingerprintV1 defines model for types.CodeSastFingerprintV1.

type TypesCodeSastFingerprintV1Scheme

type TypesCodeSastFingerprintV1Scheme string

TypesCodeSastFingerprintV1Scheme defines model for TypesCodeSastFingerprintV1.Scheme.

const (
	CodeSastV1 TypesCodeSastFingerprintV1Scheme = "code-sast-v1"
)

Defines values for TypesCodeSastFingerprintV1Scheme.

type TypesComponent

type TypesComponent struct {
	// Name Name of the component. Names are free-form and semantically meaningful in the context of
	// what is being scanned, and how it is being scanned. It may or may not be a file name or path,
	// depending on what is scanned.
	Name string `json:"name"`

	// ScanType Scan type of the component.
	ScanType TypesScanType `json:"scan_type"`
}

TypesComponent A Component (as in, software component) is the subject of a security scan.

type TypesContentAddressInput

type TypesContentAddressInput struct {
	// Spec Content address specification, which defines the target address to test, or a
	// pair of addresses to test for a differential test.
	Spec TypesContentAddressSpec      `json:"spec"`
	Type TypesContentAddressInputType `json:"type"`
}

TypesContentAddressInput Test input obtained from a source code image, addressed by its content digest.

type TypesContentAddressInputType

type TypesContentAddressInputType string

TypesContentAddressInputType defines model for TypesContentAddressInput.Type.

const (
	TypesContentAddressInputTypeContentAddress TypesContentAddressInputType = "content-address"
)

Defines values for TypesContentAddressInputType.

type TypesContentAddressSpec

type TypesContentAddressSpec struct {
	// Base Base content for a differential test. When provided,
	// FindingAttributes.delta will be set with respect to the base in results.
	//
	// Otherwise FindingAttributes.delta is left unset.
	Base *ContentAddress `json:"base,omitempty"`

	// Target Target content to be scanned for this security test.
	Target ContentAddress `json:"target"`
}

TypesContentAddressSpec Content address specification, which defines the target address to test, or a pair of addresses to test for a differential test.

type TypesCoverage

type TypesCoverage struct {
	Files       int    `json:"files"`
	IsSupported bool   `json:"isSupported"`
	Lang        string `json:"lang"`
	Type        string `json:"type"`
}

TypesCoverage Coverage statistics about a Test's Findings.

type TypesCreateTestAttributes

type TypesCreateTestAttributes struct {
	// Context Test context; pertinent information important to associate with the outcome
	// of the test and its further processing, but is not directly used in the
	// test.
	//
	// These are worth modeling with a concrete type, rather than as generic
	// free-form metadata to communicate to consumers of the test what values are
	// available.
	Context *TypesCreateTestContext `json:"context,omitempty"`

	// Input Test inputs; what will be tested.
	Input TestInput `json:"input"`

	// Options CreateTestOptions are arguments which configure the test and determine the
	// behavior of how it is conducted.
	//
	// Options are optional when creating a test and may be derived from other
	// sources, such as a test configuration policy if not specified. Provided
	// options may be merged with or overridden by such policy.
	//
	// In the requested Test resource, these options will reflect the effective
	// options resolved and applied to the execution of the test.
	Options *TypesCreateTestOptions `json:"options,omitempty"`
}

TypesCreateTestAttributes Attributes provided when creating a new test.

type TypesCreateTestContext

type TypesCreateTestContext struct {
	// GitScmBranch Git SCM branch associated with the content, if known.
	//
	// This allows providing the Git SCM branch as context in cases where the input
	// is not directly imported from a Git SCM repository.
	//
	// For example, a developer working in an IDE on a feature branch.
	GitScmBranch *string `json:"git_scm_branch,omitempty"`

	// GitScmUrl Git SCM URL associated with the content, if known.
	//
	// This allows providing the Git SCM URL as context in cases where the input
	// is not directly imported from a Git SCM repository.
	//
	// For example, a developer working in an IDE on source code which was cloned
	// from, and will be proposed for merging back into, an SCM repository.
	GitScmUrl *string `json:"git_scm_url,omitempty"`

	// SdlcStage Indicate at which point in the SDLC lifecycle the test was executed.
	SdlcStage TypesCreateTestContextSdlcStage `json:"sdlc_stage"`
}

TypesCreateTestContext CreateTestContext identifies the context in which this Test occurs.

type TypesCreateTestContextSdlcStage

type TypesCreateTestContextSdlcStage string

TypesCreateTestContextSdlcStage Indicate at which point in the SDLC lifecycle the test was executed.

const (
	TypesCreateTestContextSdlcStageCicd      TypesCreateTestContextSdlcStage = "cicd"
	TypesCreateTestContextSdlcStageDev       TypesCreateTestContextSdlcStage = "dev"
	TypesCreateTestContextSdlcStagePrcheck   TypesCreateTestContextSdlcStage = "prcheck"
	TypesCreateTestContextSdlcStageRecurring TypesCreateTestContextSdlcStage = "recurring"
)

Defines values for TypesCreateTestContextSdlcStage.

type TypesCreateTestOptions

type TypesCreateTestOptions struct {
	// Exclude Files from which findings should be excluded and removed from
	// results.
	//
	// This is different from FindingAttributes.suppressions; the exclude is an
	// up-front declaration that findings in the excluded files are
	// immaterial to the test result (pass/fail), and should not be reported at all.
	//
	// Excluded files might still be used to link other files/findings though. For
	// example, a SAST (source-to-sink) or SCA analysis (transitive dependency
	// chain) might transit an excluded file, enabling discovery in a
	// non-excluded file.
	Exclude *[]CreateExcludeRule `json:"exclude,omitempty"`
}

TypesCreateTestOptions CreateTestOptions defines options which determine how the Test is conducted.

type TypesCvssRiskFactor

type TypesCvssRiskFactor struct {
	// CvssVersion The CVSS version being described. This will be a published CVSS
	// specification version, such as "3.1" or "4.0"
	CvssVersion string                    `json:"cvss_version"`
	Factor      TypesCvssRiskFactorFactor `json:"factor"`

	// Vector CVSS vector string, the format of which may be CVSS specification version
	// dependent.
	//
	// See https://www.first.org/cvss/specification-document#Vector-String for
	// details.
	Vector string `json:"vector"`
}

TypesCvssRiskFactor defines model for types.CvssRiskFactor.

type TypesCvssRiskFactorFactor

type TypesCvssRiskFactorFactor string

TypesCvssRiskFactorFactor defines model for TypesCvssRiskFactor.Factor.

const (
	Cvss TypesCvssRiskFactorFactor = "cvss"
)

Defines values for TypesCvssRiskFactorFactor.

type TypesEpssRiskFactor

type TypesEpssRiskFactor struct {
	Factor TypesEpssRiskFactorFactor `json:"factor"`
	Value  float32                   `json:"value"`
}

TypesEpssRiskFactor defines model for types.EpssRiskFactor.

type TypesEpssRiskFactorFactor

type TypesEpssRiskFactorFactor string

TypesEpssRiskFactorFactor defines model for TypesEpssRiskFactor.Factor.

const (
	Epss TypesEpssRiskFactorFactor = "epss"
)

Defines values for TypesEpssRiskFactorFactor.

type TypesExampleCommitFix

type TypesExampleCommitFix struct {
	CommitUrl string      `json:"commitUrl"`
	Lines     []TypesLine `json:"lines"`
}

TypesExampleCommitFix defines model for types.ExampleCommitFix.

func CreateExampleCommitFixes

func CreateExampleCommitFixes(sarifRule sarif.Rule) []TypesExampleCommitFix

CreateExampleCommitFixes creates a slice of ExampleCommitFix from the provided sarifRule

func NewExampleCommitFix

func NewExampleCommitFix(commitUrl string, lines []TypesLine) TypesExampleCommitFix

NewExampleCommitFix creates a new ExampleCommitFix with the provided parameters

type TypesFileObjectExcludeRule

type TypesFileObjectExcludeRule struct {
	Type TypesFileObjectExcludeRuleType `json:"type"`

	// Value A recursive glob matching files. Equivalent to a bare string.
	Value string `json:"value"`
}

TypesFileObjectExcludeRule defines model for types.FileObjectExcludeRule.

type TypesFileObjectExcludeRuleType

type TypesFileObjectExcludeRuleType string

TypesFileObjectExcludeRuleType defines model for TypesFileObjectExcludeRule.Type.

const (
	File TypesFileObjectExcludeRuleType = "file"
)

Defines values for TypesFileObjectExcludeRuleType.

type TypesFindingAttributes

type TypesFindingAttributes struct {
	CodeFlows *[]TypesCodeFlow `json:"codeFlows,omitempty"`

	// Component Component in which the finding was discovered.
	Component TypesComponent `json:"component"`

	// Delta Represent whether a finding is net new (introduced), removed, or preserved
	// in a test involving a diff between inputs.
	//
	// Only set in a differential test conducted with respect to base content.
	Delta *TypesFindingAttributesDelta `json:"delta,omitempty"`

	// Fingerprint Natural key, or fingerprint, to identify the same Finding across multiple
	// Test runs. Unique per Test. Here's why:
	// https://github.com/snyk/pr-experience-poc/blob/main/docs/design-documents/pr-inline-comments.md#why-do-we-need-fingerprints
	Fingerprint   []Fingerprint `json:"fingerprint"`
	IsAutofixable *bool         `json:"isAutofixable,omitempty"`

	// Locations A set of locations where the result was detected. Only one location should
	// be included unless the finding can only be resolved by making a change at
	// every location.
	Locations *[]IoSnykReactiveFindingLocation `json:"locations,omitempty"`
	Message   TypesFindingMessage              `json:"message"`
	Policy    *TypesPolicyv1                   `json:"policy,omitempty"`

	// Rating The severity and risk rating of the vulnerability
	Rating      *TypesFindingRating `json:"rating,omitempty"`
	ReferenceId *TypesReferenceId   `json:"referenceId,omitempty"`

	// Suggestions Suggestions are indications given to the user that might help with
	// mitigating the finding.
	//
	// For mitigation with a higher degree of confidence, remediation and fix
	// relationship links should be used.
	Suggestions *[]Suggestion `json:"suggestions,omitempty"`

	// Suppression Reasons for why a Finding can be suppressed from a Test result. This MAY NOT be required at all, given the presentation
	Suppression *TypesSuppression `json:"suppression,omitempty"`
}

TypesFindingAttributes A Finding entity with a common format for all types of security scans. Notably, this is a sub-resource of a Test.

type TypesFindingAttributesDelta

type TypesFindingAttributesDelta string

TypesFindingAttributesDelta Represent whether a finding is net new (introduced), removed, or preserved in a test involving a diff between inputs.

Only set in a differential test conducted with respect to base content.

const (
	Existing   TypesFindingAttributesDelta = "existing"
	Introduced TypesFindingAttributesDelta = "introduced"
	Removed    TypesFindingAttributesDelta = "removed"
)

Defines values for TypesFindingAttributesDelta.

type TypesFindingCounts

type TypesFindingCounts struct {
	// Count Net count of findings, including suppressions.
	Count uint32 `json:"count"`

	// CountAdjusted Net count of findings minus suppressions.
	CountAdjusted uint32 `json:"count_adjusted"`

	// CountBy Total finding counts (including ignores) grouped by severity and
	// possibly other factors.
	CountBy TypesFindingCounts_CountBy `json:"count_by"`

	// CountByAdjusted Net finding counts (excluding ignores) grouped by severity and possibly other
	// factors.
	CountByAdjusted TypesFindingCounts_CountByAdjusted `json:"count_by_adjusted"`

	// CountBySuppressed Net suppressed finding count, grouped by severity and possibly other factors.
	CountBySuppressed TypesFindingCounts_CountBySuppressed `json:"count_by_suppressed"`

	// CountKeyOrderAsc Ordering hint for the grouping keys in count_by.
	//
	// Record key is a well-known grouping of the resource object, matched with
	// count_by.
	//
	// Record values are arrays of known possible values for the group keys in
	// ascending order, from lowest to highest. Values other than those enumerated
	// must be tolerated; their ordering is unspecified with respect to enumerated
	// values.
	CountKeyOrderAsc TypesFindingCounts_CountKeyOrderAsc `json:"count_key_order_asc"`

	// CountSuppressed Findings excluded from the count shown to users, including ignored findings.
	CountSuppressed uint32 `json:"count_suppressed"`
}

TypesFindingCounts defines model for types.FindingCounts.

func NewFindingsCounts

func NewFindingsCounts() TypesFindingCounts

type TypesFindingCounts_CountBy

type TypesFindingCounts_CountBy struct {
	Severity             map[string]uint32            `json:"severity"`
	AdditionalProperties map[string]map[string]uint32 `json:"-"`
}

TypesFindingCounts_CountBy Total finding counts (including ignores) grouped by severity and possibly other factors.

func (TypesFindingCounts_CountBy) Get

func (a TypesFindingCounts_CountBy) Get(fieldName string) (value map[string]uint32, found bool)

Getter for additional properties for TypesFindingCounts_CountBy. Returns the specified element and whether it was found

func (TypesFindingCounts_CountBy) MarshalJSON

func (a TypesFindingCounts_CountBy) MarshalJSON() ([]byte, error)

Override default JSON handling for TypesFindingCounts_CountBy to handle AdditionalProperties

func (*TypesFindingCounts_CountBy) Set

func (a *TypesFindingCounts_CountBy) Set(fieldName string, value map[string]uint32)

Setter for additional properties for TypesFindingCounts_CountBy

func (*TypesFindingCounts_CountBy) UnmarshalJSON

func (a *TypesFindingCounts_CountBy) UnmarshalJSON(b []byte) error

Override default JSON handling for TypesFindingCounts_CountBy to handle AdditionalProperties

type TypesFindingCounts_CountByAdjusted

type TypesFindingCounts_CountByAdjusted struct {
	Severity             map[string]uint32            `json:"severity"`
	AdditionalProperties map[string]map[string]uint32 `json:"-"`
}

TypesFindingCounts_CountByAdjusted Net finding counts (excluding ignores) grouped by severity and possibly other factors.

func (TypesFindingCounts_CountByAdjusted) Get

func (a TypesFindingCounts_CountByAdjusted) Get(fieldName string) (value map[string]uint32, found bool)

Getter for additional properties for TypesFindingCounts_CountByAdjusted. Returns the specified element and whether it was found

func (TypesFindingCounts_CountByAdjusted) MarshalJSON

func (a TypesFindingCounts_CountByAdjusted) MarshalJSON() ([]byte, error)

Override default JSON handling for TypesFindingCounts_CountByAdjusted to handle AdditionalProperties

func (*TypesFindingCounts_CountByAdjusted) Set

func (a *TypesFindingCounts_CountByAdjusted) Set(fieldName string, value map[string]uint32)

Setter for additional properties for TypesFindingCounts_CountByAdjusted

func (*TypesFindingCounts_CountByAdjusted) UnmarshalJSON

func (a *TypesFindingCounts_CountByAdjusted) UnmarshalJSON(b []byte) error

Override default JSON handling for TypesFindingCounts_CountByAdjusted to handle AdditionalProperties

type TypesFindingCounts_CountBySuppressed

type TypesFindingCounts_CountBySuppressed struct {
	Severity             map[string]uint32            `json:"severity"`
	AdditionalProperties map[string]map[string]uint32 `json:"-"`
}

TypesFindingCounts_CountBySuppressed Net suppressed finding count, grouped by severity and possibly other factors.

func (TypesFindingCounts_CountBySuppressed) Get

func (a TypesFindingCounts_CountBySuppressed) Get(fieldName string) (value map[string]uint32, found bool)

Getter for additional properties for TypesFindingCounts_CountBySuppressed. Returns the specified element and whether it was found

func (TypesFindingCounts_CountBySuppressed) MarshalJSON

func (a TypesFindingCounts_CountBySuppressed) MarshalJSON() ([]byte, error)

Override default JSON handling for TypesFindingCounts_CountBySuppressed to handle AdditionalProperties

func (*TypesFindingCounts_CountBySuppressed) Set

func (a *TypesFindingCounts_CountBySuppressed) Set(fieldName string, value map[string]uint32)

Setter for additional properties for TypesFindingCounts_CountBySuppressed

func (*TypesFindingCounts_CountBySuppressed) UnmarshalJSON

func (a *TypesFindingCounts_CountBySuppressed) UnmarshalJSON(b []byte) error

Override default JSON handling for TypesFindingCounts_CountBySuppressed to handle AdditionalProperties

type TypesFindingCounts_CountKeyOrderAsc

type TypesFindingCounts_CountKeyOrderAsc struct {
	// Severity FindingCounts has a deterministic ordering for severity counts.
	Severity             []string            `json:"severity"`
	AdditionalProperties map[string][]string `json:"-"`
}

TypesFindingCounts_CountKeyOrderAsc Ordering hint for the grouping keys in count_by.

Record key is a well-known grouping of the resource object, matched with count_by.

Record values are arrays of known possible values for the group keys in ascending order, from lowest to highest. Values other than those enumerated must be tolerated; their ordering is unspecified with respect to enumerated values.

func (TypesFindingCounts_CountKeyOrderAsc) Get

func (a TypesFindingCounts_CountKeyOrderAsc) Get(fieldName string) (value []string, found bool)

Getter for additional properties for TypesFindingCounts_CountKeyOrderAsc. Returns the specified element and whether it was found

func (TypesFindingCounts_CountKeyOrderAsc) MarshalJSON

func (a TypesFindingCounts_CountKeyOrderAsc) MarshalJSON() ([]byte, error)

Override default JSON handling for TypesFindingCounts_CountKeyOrderAsc to handle AdditionalProperties

func (*TypesFindingCounts_CountKeyOrderAsc) Set

func (a *TypesFindingCounts_CountKeyOrderAsc) Set(fieldName string, value []string)

Setter for additional properties for TypesFindingCounts_CountKeyOrderAsc

func (*TypesFindingCounts_CountKeyOrderAsc) UnmarshalJSON

func (a *TypesFindingCounts_CountKeyOrderAsc) UnmarshalJSON(b []byte) error

Override default JSON handling for TypesFindingCounts_CountKeyOrderAsc to handle AdditionalProperties

type TypesFindingMessage

type TypesFindingMessage struct {
	// Arguments Arguments to the finding rule.
	//
	// Mapped from `sarif.Runs.Results.Message.Arguments`.
	Arguments []string `json:"arguments"`

	// Header Short text description of finding rule.
	//
	// Could be sourced from `sarif.Runs.Tool.Driver.Rules.ShortDescription.Text`.
	Header string `json:"header"`

	// Markdown Markdown description of the finding rule.
	//
	// Mapped from `sarif.Runs.Results.Message.Markdown`.
	Markdown string `json:"markdown"`

	// Text Full text description of the finding rule.
	//
	// Mapped from `sarif.Runs.Results.Message.Text`.
	Text string `json:"text"`
}

TypesFindingMessage defines model for types.FindingMessage.

type TypesFindingNumericalRating

type TypesFindingNumericalRating struct {
	Factors []RiskFactors `json:"factors"`
	Score   int           `json:"score"`
}

TypesFindingNumericalRating defines model for types.FindingNumericalRating.

type TypesFindingRating

type TypesFindingRating struct {
	// Justification Optional reason for rating the vulnerability like this
	Justification *string                      `json:"justification,omitempty"`
	Priority      *TypesFindingNumericalRating `json:"priority,omitempty"`
	Risk          *TypesFindingNumericalRating `json:"risk,omitempty"`

	// Severity A value which may be modified by enrichment stages.
	Severity struct {
		// OriginalValue Original value, if modified.
		OriginalValue *TypesFindingRatingSeverityOriginalValue `json:"original_value,omitempty"`

		// Reason Reason for the modification, if modified.
		Reason *TypesFindingRatingSeverityReason `json:"reason,omitempty"`

		// Value Current value.
		Value TypesFindingRatingSeverityValue `json:"value"`
	} `json:"severity"`
	SeverityMethod TypesFindingRatingSeverityMethod `json:"severity_method"`
}

TypesFindingRating The severity and risk rating of the vulnerability

func CreateFindingRating

func CreateFindingRating(res sarif.Result) *TypesFindingRating

type TypesFindingRatingSeverityMethod

type TypesFindingRatingSeverityMethod string

TypesFindingRatingSeverityMethod defines model for TypesFindingRating.SeverityMethod.

const (
	TypesFindingRatingSeverityMethodCVSSv2  TypesFindingRatingSeverityMethod = "CVSSv2"
	TypesFindingRatingSeverityMethodCVSSv3  TypesFindingRatingSeverityMethod = "CVSSv3"
	TypesFindingRatingSeverityMethodCVSSv31 TypesFindingRatingSeverityMethod = "CVSSv31"
	TypesFindingRatingSeverityMethodCVSSv4  TypesFindingRatingSeverityMethod = "CVSSv4"
	TypesFindingRatingSeverityMethodOWASP   TypesFindingRatingSeverityMethod = "OWASP"
	TypesFindingRatingSeverityMethodOther   TypesFindingRatingSeverityMethod = "other"
)

Defines values for TypesFindingRatingSeverityMethod.

type TypesFindingRatingSeverityOriginalValue

type TypesFindingRatingSeverityOriginalValue string

TypesFindingRatingSeverityOriginalValue Original value, if modified.

const (
	TypesFindingRatingSeverityOriginalValueCritical TypesFindingRatingSeverityOriginalValue = "critical"
	TypesFindingRatingSeverityOriginalValueHigh     TypesFindingRatingSeverityOriginalValue = "high"
	TypesFindingRatingSeverityOriginalValueInfo     TypesFindingRatingSeverityOriginalValue = "info"
	TypesFindingRatingSeverityOriginalValueLow      TypesFindingRatingSeverityOriginalValue = "low"
	TypesFindingRatingSeverityOriginalValueMedium   TypesFindingRatingSeverityOriginalValue = "medium"
	TypesFindingRatingSeverityOriginalValueNone     TypesFindingRatingSeverityOriginalValue = "none"
)

Defines values for TypesFindingRatingSeverityOriginalValue.

type TypesFindingRatingSeverityReason

type TypesFindingRatingSeverityReason string

TypesFindingRatingSeverityReason Reason for the modification, if modified.

const (
	TypesFindingRatingSeverityReasonManual TypesFindingRatingSeverityReason = "manual"
	TypesFindingRatingSeverityReasonOther  TypesFindingRatingSeverityReason = "other"
	TypesFindingRatingSeverityReasonPolicy TypesFindingRatingSeverityReason = "policy"
)

Defines values for TypesFindingRatingSeverityReason.

type TypesFindingRatingSeverityValue

type TypesFindingRatingSeverityValue string

TypesFindingRatingSeverityValue Current value.

Defines values for TypesFindingRatingSeverityValue.

type TypesFindingRelationships

type TypesFindingRelationships struct {
	// Autofixes Relate to autofixes for the finding, if available.
	Autofixes *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"autofixes,omitempty"`

	// Explanation Relate to a human-readable webpage that explains the finding, if available.
	Explanation *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"explanation,omitempty"`

	// FixDetails Relate to fix information for the finding, if available.
	FixDetails *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"fix_details,omitempty"`

	// PolicyModifications Policy modifications applied to this finding, if available.
	PolicyModifications *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"policy_modifications,omitempty"`

	// RawDetails Relate to the raw scan outputs. May be SARIF, CycloneDX+VEX or other
	// scan-specific formats.
	//
	// The relationship link should point to the resource URL where the raw scan
	// output can be retrieved.
	//
	// The link MAY include a URL fragment to locate the finding's position within
	// the document object.
	//
	// For JSON-based MIME types, this fragment MUST be a JSON Pointer.
	// For XML-based MIME types, this fragment MUST be an XPath expression.
	//
	// If the fragment is specified, the fragment form MUST be compatible with all
	// of the content types advertised. For example, the link MUST NOT provide a JSON
	// Pointer fragment if an XML media type is advertised.
	RawDetails *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink                `json:"links"`
		Meta  TypesFindingRelationships_RawDetails_Meta `json:"meta"`
	} `json:"raw_details,omitempty"`

	// Remediations Relate to remediations for the finding, if available.
	Remediations *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"remediations,omitempty"`

	// SastRuleDetails Relate to details about the rule which was violated in a SAST finding.
	SastRuleDetails *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"sast_rule_details,omitempty"`

	// ScaVulnDetails Relate to details about the component vulnerability discovered in the SCA
	// finding.
	ScaVulnDetails *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"sca_vuln_details,omitempty"`
}

TypesFindingRelationships Resources which may relate to a Finding.

type TypesFindingRelationships_RawDetails_Meta

type TypesFindingRelationships_RawDetails_Meta struct {
	// ContentTypes Content MIME types which can be used in the Accept header when requesting the
	// related raw data.
	//
	// This property must not be empty, making explicit what type of content
	// the API client will be receiving in the raw details resource response.
	ContentTypes         []string               `json:"content_types"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

TypesFindingRelationships_RawDetails_Meta defines model for TypesFindingRelationships.RawDetails.Meta.

func (TypesFindingRelationships_RawDetails_Meta) Get

func (a TypesFindingRelationships_RawDetails_Meta) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for TypesFindingRelationships_RawDetails_Meta. Returns the specified element and whether it was found

func (TypesFindingRelationships_RawDetails_Meta) MarshalJSON

Override default JSON handling for TypesFindingRelationships_RawDetails_Meta to handle AdditionalProperties

func (*TypesFindingRelationships_RawDetails_Meta) Set

func (a *TypesFindingRelationships_RawDetails_Meta) Set(fieldName string, value interface{})

Setter for additional properties for TypesFindingRelationships_RawDetails_Meta

func (*TypesFindingRelationships_RawDetails_Meta) UnmarshalJSON

Override default JSON handling for TypesFindingRelationships_RawDetails_Meta to handle AdditionalProperties

type TypesFindingResource

type TypesFindingResource struct {
	// Attributes A Finding entity with a common format for all types of security scans. Notably, this is a sub-resource of a Test.
	Attributes TypesFindingAttributes `json:"attributes"`

	// Id Unique identity of this Finding instance.
	Id openapi_types.UUID `json:"id"`

	// Relationships Resources which may relate to a Finding.
	Relationships TypesFindingRelationships `json:"relationships"`
	Type          TypesFindingResourceType  `json:"type"`
}

TypesFindingResource FindingResource models a JSON API Finding resource.

type TypesFindingResourceType

type TypesFindingResourceType string

TypesFindingResourceType defines model for TypesFindingResource.Type.

const (
	Findings TypesFindingResourceType = "findings"
)

Defines values for TypesFindingResourceType.

type TypesFindingsSummary

type TypesFindingsSummary struct {
	Artifacts int                `json:"artifacts"`
	Counts    TypesFindingCounts `json:"counts"`
	Coverage  []TypesCoverage    `json:"coverage"`
	Path      string             `json:"path"`
	Type      string             `json:"type"`
}

TypesFindingsSummary Summary statistics about a Test's Findings.

type TypesGitCommit

type TypesGitCommit = string

TypesGitCommit Git commit SHA.

type TypesGitSCMInput

type TypesGitSCMInput struct {
	// Spec Git SCM import specification, which defines how to import content from a Git
	// SCM repository location into a workspace for testing, or a set of workspaces
	// for differential testing.
	Spec TypesGitScmImportSpec `json:"spec"`
	Type TypesGitSCMInputType  `json:"type"`
}

TypesGitSCMInput Test input obtained from a Git SCM.

type TypesGitSCMInputType

type TypesGitSCMInputType string

TypesGitSCMInputType defines model for TypesGitSCMInput.Type.

const (
	GitScm TypesGitSCMInputType = "git-scm"
)

Defines values for TypesGitSCMInputType.

type TypesGitScmImportSpec

type TypesGitScmImportSpec struct {
	// Base base is optional. If provided, it is used in supplying differential test data.
	Base *TypesGitCommit `json:"base,omitempty"`

	// Branch branch is optional. If not provided, the default branch is used.
	Branch *string `json:"branch,omitempty"`

	// Exclude Components that should be excluded when importing the SCM contents into a Workspace.
	Exclude *[]ExcludeRule `json:"exclude,omitempty"`

	// RemoteUrl Git SCM repository URL.
	RemoteUrl string `json:"remote_url"`

	// Target target is optional. If not provided the current HEAD of the selected branch is used.
	//
	// If target is provided and branch is not, no branch metadata is associated with the test.
	// If target is provided and branch is, but target is not an ancestor of branch, the wrong
	// branch will be associated with a test. It is the caller's responsibility to ensure this is correct.
	Target *TypesGitCommit `json:"target,omitempty"`
}

TypesGitScmImportSpec Git SCM import specification, which defines how to import content from a Git SCM repository location into a workspace for testing, or a set of workspaces for differential testing.

type TypesIdentityFingerprint

type TypesIdentityFingerprint struct {
	Scheme TypesIdentityFingerprintScheme `json:"scheme"`
	Value  string                         `json:"value"`
}

TypesIdentityFingerprint defines model for types.IdentityFingerprint.

type TypesIdentityFingerprintScheme

type TypesIdentityFingerprintScheme string

TypesIdentityFingerprintScheme defines model for TypesIdentityFingerprint.Scheme.

const (
	Identity TypesIdentityFingerprintScheme = "identity"
)

Defines values for TypesIdentityFingerprintScheme.

type TypesLegacyDeepcodeBundleAddress

type TypesLegacyDeepcodeBundleAddress struct {
	// BundleId Legacy Deepcode bundle ID is a sha256 sum (64 hex digits).
	BundleId string                                 `json:"bundle_id"`
	Scheme   TypesLegacyDeepcodeBundleAddressScheme `json:"scheme"`
}

TypesLegacyDeepcodeBundleAddress Legacy Deepcode API bundle.

This is provided provisionally for compatibility purposes.

type TypesLegacyDeepcodeBundleAddressScheme

type TypesLegacyDeepcodeBundleAddressScheme string

TypesLegacyDeepcodeBundleAddressScheme defines model for TypesLegacyDeepcodeBundleAddress.Scheme.

const (
	DeepcodeBundle TypesLegacyDeepcodeBundleAddressScheme = "deepcode-bundle"
)

Defines values for TypesLegacyDeepcodeBundleAddressScheme.

type TypesLine

type TypesLine struct {
	Line       string `json:"line"`
	LineChange string `json:"lineChange"`
	LineNumber int    `json:"lineNumber"`
}

TypesLine defines model for types.Line.

func CreateLines

func CreateLines(fix sarif.ExampleCommitFix) []TypesLine

CreateLines creates a slice of lines from the provided lines

type TypesOrgIdParam

type TypesOrgIdParam = openapi_types.UUID

TypesOrgIdParam defines model for types.OrgIdParam.

type TypesOtherObjectExcludeRule

type TypesOtherObjectExcludeRule struct {
	Type                 TypesOtherObjectExcludeRuleType `json:"type"`
	AdditionalProperties map[string]interface{}          `json:"-"`
}

TypesOtherObjectExcludeRule OtherObjectExcludeRule is a placeholder expansion value, for when types of exclusion rules were used in testing that are not present in the called version of the API.

func (TypesOtherObjectExcludeRule) Get

func (a TypesOtherObjectExcludeRule) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for TypesOtherObjectExcludeRule. Returns the specified element and whether it was found

func (TypesOtherObjectExcludeRule) MarshalJSON

func (a TypesOtherObjectExcludeRule) MarshalJSON() ([]byte, error)

Override default JSON handling for TypesOtherObjectExcludeRule to handle AdditionalProperties

func (*TypesOtherObjectExcludeRule) Set

func (a *TypesOtherObjectExcludeRule) Set(fieldName string, value interface{})

Setter for additional properties for TypesOtherObjectExcludeRule

func (*TypesOtherObjectExcludeRule) UnmarshalJSON

func (a *TypesOtherObjectExcludeRule) UnmarshalJSON(b []byte) error

Override default JSON handling for TypesOtherObjectExcludeRule to handle AdditionalProperties

type TypesOtherObjectExcludeRuleType

type TypesOtherObjectExcludeRuleType string

TypesOtherObjectExcludeRuleType defines model for TypesOtherObjectExcludeRule.Type.

const (
	TypesOtherObjectExcludeRuleTypeOther TypesOtherObjectExcludeRuleType = "other"
)

Defines values for TypesOtherObjectExcludeRuleType.

type TypesPackageObject

type TypesPackageObject struct {
	// Meta Free-form metadata about this package.
	Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`

	// Name Package name, possibly with a namespace prefix.
	Name string `json:"name"`

	// Root Package management system root location.
	//
	// If set, isolates the package to a private ecosystem repository.
	//
	// Defaults to "the canonical public ecosystem repository root" for the package ecosystem type.
	Root *string `json:"root,omitempty"`

	// Subpath Sub-package qualifier, if applicable.
	Subpath *string `json:"subpath,omitempty"`

	// Type Package management system or ecosystem type.
	Type string `json:"type"`

	// Version Package version. One would hope this is semver but this generally depends
	// on the ecosystem and its package standards and requirements.
	Version string `json:"version"`
}

TypesPackageObject PackageObject represents a decomposed Package URL, enriched with a resolved package repository root location. This disambiguates public packages from private packages in security SCA and remediation.

type TypesPackageURL

type TypesPackageURL = string

TypesPackageURL Package information represented in Package URL (pURL) form.

type TypesPolicyv1

type TypesPolicyv1 struct {
	// OriginalLevel The original severity generated by the code scanner before any policy modifications.
	OriginalLevel    *string `json:"originalLevel,omitempty"`
	OriginalSeverity *string `json:"originalSeverity,omitempty"`
	Severity         *string `json:"severity,omitempty"`
}

TypesPolicyv1 defines model for types.Policyv1.

type TypesReferenceId

type TypesReferenceId struct {
	Identifier string `json:"identifier"`
	Index      int    `json:"index"`
}

TypesReferenceId defines model for types.ReferenceId.

type TypesRules

type TypesRules struct {
	DefaultConfiguration struct {
		Level string `json:"level"`
	} `json:"defaultConfiguration"`
	Help struct {
		Markdown string `json:"markdown"`
		Text     string `json:"text"`
	} `json:"help"`
	Id         string `json:"id"`
	Name       string `json:"name"`
	Properties struct {
		Categories                []string                `json:"categories"`
		Cwe                       []string                `json:"cwe"`
		ExampleCommitDescriptions []string                `json:"exampleCommitDescriptions"`
		ExampleCommitFixes        []TypesExampleCommitFix `json:"exampleCommitFixes"`
		Precision                 string                  `json:"precision"`
		RepoDatasetSize           int                     `json:"repoDatasetSize"`
		Tags                      []string                `json:"tags"`
	} `json:"properties"`
	ShortDescription struct {
		Text string `json:"text"`
	} `json:"shortDescription"`
}

TypesRules Based on Sarif rules

func NewTypesRules

func NewTypesRules(id, name, shortDescriptionText, level, helpMarkdown, helpText string, opts ...TypesRulesOption) TypesRules

NewTypesRules creates a new TypesRules with the provided options

type TypesRulesOption

type TypesRulesOption func(*TypesRules)

TypesRulesOption defines a type for functional options to customize TypesRules

func WithCategories

func WithCategories(categories []string) TypesRulesOption

WithCategories sets the Categories field

func WithCwe

func WithCwe(cwe []string) TypesRulesOption

WithCwe sets the Cwe field

func WithExampleCommitDescriptions

func WithExampleCommitDescriptions(descriptions []string) TypesRulesOption

WithExampleCommitDescriptions sets the ExampleCommitDescriptions field

func WithExampleCommitFixes

func WithExampleCommitFixes(fixes []TypesExampleCommitFix) TypesRulesOption

WithExampleCommitFixes sets the ExampleCommitFixes field

func WithPrecision

func WithPrecision(precision string) TypesRulesOption

WithPrecision sets the Precision field

func WithRepoDatasetSize

func WithRepoDatasetSize(size int) TypesRulesOption

WithRepoDatasetSize sets the RepoDatasetSize field

func WithTags

func WithTags(tags []string) TypesRulesOption

WithTags sets the Tags field

type TypesScaProblemFingerprint

type TypesScaProblemFingerprint struct {
	Scheme TypesScaProblemFingerprintScheme `json:"scheme"`
	Value  string                           `json:"value"`
}

TypesScaProblemFingerprint defines model for types.ScaProblemFingerprint.

type TypesScaProblemFingerprintScheme

type TypesScaProblemFingerprintScheme string

TypesScaProblemFingerprintScheme defines model for TypesScaProblemFingerprint.Scheme.

const (
	ScaProblem TypesScaProblemFingerprintScheme = "sca-problem"
)

Defines values for TypesScaProblemFingerprintScheme.

type TypesScanType

type TypesScanType string

TypesScanType Security scan type. The scan type determines what types of attributes one might expect to find in the finding.

const (
	TypesScanTypeOther TypesScanType = "other"
	TypesScanTypeSast  TypesScanType = "sast"
	TypesScanTypeSca   TypesScanType = "sca"
)

Defines values for TypesScanType.

type TypesSuggestedOther

type TypesSuggestedOther struct {
	Type                 TypesSuggestedOtherType `json:"type"`
	AdditionalProperties map[string]interface{}  `json:"-"`
}

TypesSuggestedOther SuggestedOther that aren't yet defined in this API version.

func (TypesSuggestedOther) Get

func (a TypesSuggestedOther) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for TypesSuggestedOther. Returns the specified element and whether it was found

func (TypesSuggestedOther) MarshalJSON

func (a TypesSuggestedOther) MarshalJSON() ([]byte, error)

Override default JSON handling for TypesSuggestedOther to handle AdditionalProperties

func (*TypesSuggestedOther) Set

func (a *TypesSuggestedOther) Set(fieldName string, value interface{})

Setter for additional properties for TypesSuggestedOther

func (*TypesSuggestedOther) UnmarshalJSON

func (a *TypesSuggestedOther) UnmarshalJSON(b []byte) error

Override default JSON handling for TypesSuggestedOther to handle AdditionalProperties

type TypesSuggestedOtherType

type TypesSuggestedOtherType string

TypesSuggestedOtherType defines model for TypesSuggestedOther.Type.

const (
	TypesSuggestedOtherTypeOther TypesSuggestedOtherType = "other"
)

Defines values for TypesSuggestedOtherType.

type TypesSuggestedPackageUpgrade

type TypesSuggestedPackageUpgrade struct {
	// CurrentPackage Affected package.
	CurrentPackage Package                          `json:"current_package"`
	Type           TypesSuggestedPackageUpgradeType `json:"type"`

	// UpgradeConflicts Indicate whether the upgrade version is known to conflict with other
	// dependencies on the same package.
	//
	// If false, the upgrade does not conflict and should be applicable.
	//
	// If null or missing, conflict status is unknown or was not calculated;
	// applying the upgrade could fail.
	UpgradeConflicts *TypesSuggestedPackageUpgradeUpgradeConflicts `json:"upgrade_conflicts"`

	// UpgradePackage Upgrade package in which the vulnerability is no longer present.
	//
	// If unset, no upgrade version is available.
	UpgradePackage *Package `json:"upgrade_package,omitempty"`
}

TypesSuggestedPackageUpgrade SuggestedPackageUpgrade provides some basic information on how to mitigate an SCA finding in a managed package ecosystem with an upgrade.

The upgrade does not take into account other dependency paths to the affected package which may have conflicting constraints. The upgrade version may introduce other vulnerabilities. This is the main difference between a suggestion and a remediation.

For a comprehensive mitigation with satisfiability and security guarantees, the remediation relation should be used.

If conflicts are known to exist this may be reported, but the absense of this flag should not be taken as a guarantee conflicts will not be encountered. It only means the conflict status is unknown.

type TypesSuggestedPackageUpgradeType

type TypesSuggestedPackageUpgradeType string

TypesSuggestedPackageUpgradeType defines model for TypesSuggestedPackageUpgrade.Type.

const (
	PackageUpgrade TypesSuggestedPackageUpgradeType = "package-upgrade"
)

Defines values for TypesSuggestedPackageUpgradeType.

type TypesSuggestedPackageUpgradeUpgradeConflicts

type TypesSuggestedPackageUpgradeUpgradeConflicts bool

TypesSuggestedPackageUpgradeUpgradeConflicts Indicate whether the upgrade version is known to conflict with other dependencies on the same package.

If false, the upgrade does not conflict and should be applicable.

If null or missing, conflict status is unknown or was not calculated; applying the upgrade could fail.

Defines values for TypesSuggestedPackageUpgradeUpgradeConflicts.

type TypesSuppression

type TypesSuppression struct {
	// Details Suppression meta data
	Details       *TypesSuppressionDetails `json:"details,omitempty"`
	Id            *string                  `json:"id,omitempty"`
	Justification *string                  `json:"justification,omitempty"`
	Status        TypesSuppressionStatus   `json:"status"`
}

TypesSuppression Reasons for why a Finding can be suppressed from a Test result. This MAY NOT be required at all, given the presentation

type TypesSuppressionDetails

type TypesSuppressionDetails struct {
	Category   string  `json:"category"`
	Expiration *string `json:"expiration,omitempty"`

	// IgnoredBy User definition
	IgnoredBy TypesUser `json:"ignoredBy"`
	IgnoredOn string    `json:"ignoredOn"`
}

TypesSuppressionDetails Suppression meta data

type TypesSuppressionStatus

type TypesSuppressionStatus string

TypesSuppressionStatus defines model for TypesSuppression.Status.

const (
	Accepted    TypesSuppressionStatus = "accepted"
	Rejected    TypesSuppressionStatus = "rejected"
	UnderReview TypesSuppressionStatus = "underReview"
)

Defines values for TypesSuppressionStatus.

type TypesTestContext

type TypesTestContext struct {
	// GitScmBranch Git SCM branch associated with the content, if known.
	//
	// This allows providing the Git SCM branch as context in cases where the input
	// is not directly imported from a Git SCM repository.
	//
	// For example, a developer working in an IDE on a feature branch.
	GitScmBranch *string `json:"git_scm_branch,omitempty"`

	// GitScmUrl Git SCM URL associated with the content, if known.
	//
	// This allows providing the Git SCM URL as context in cases where the input
	// is not directly imported from a Git SCM repository.
	//
	// For example, a developer working in an IDE on source code which was cloned
	// from, and will be proposed for merging back into, an SCM repository.
	GitScmUrl *string `json:"git_scm_url,omitempty"`

	// SdlcStage Indicate at which point in the SDLC lifecycle the test was executed.
	// `other` is returned if the test was created with a newer version of
	// the API including a new SDLC stage, not supported in the version of
	// the API used for retrieval.
	SdlcStage TypesTestContextSdlcStage `json:"sdlc_stage"`
}

TypesTestContext TestContext identifies the context in which this Test occurs.

type TypesTestContextSdlcStage

type TypesTestContextSdlcStage string

TypesTestContextSdlcStage Indicate at which point in the SDLC lifecycle the test was executed. `other` is returned if the test was created with a newer version of the API including a new SDLC stage, not supported in the version of the API used for retrieval.

const (
	TypesTestContextSdlcStageCicd      TypesTestContextSdlcStage = "cicd"
	TypesTestContextSdlcStageDev       TypesTestContextSdlcStage = "dev"
	TypesTestContextSdlcStageOther     TypesTestContextSdlcStage = "other"
	TypesTestContextSdlcStagePrcheck   TypesTestContextSdlcStage = "prcheck"
	TypesTestContextSdlcStageRecurring TypesTestContextSdlcStage = "recurring"
)

Defines values for TypesTestContextSdlcStage.

type TypesTestError

type TypesTestError struct {
	// Code Error code, references Snyk error catalog.
	Code string `json:"code"`

	// Links Links to error detail information.
	Links *IoSnykApiCommonErrorLink `json:"links,omitempty"`

	// Meta Free-form metadata associated with the error.
	Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`

	// Reason Descriptive reason for the error.
	Reason *string `json:"reason,omitempty"`
}

TypesTestError An error that occurred during a Test.

type TypesTestExecStatus

type TypesTestExecStatus string

TypesTestExecStatus defines model for types.TestExecStatus.

const (
	Done    TypesTestExecStatus = "done"
	Pending TypesTestExecStatus = "pending"
	Running TypesTestExecStatus = "running"
)

Defines values for TypesTestExecStatus.

type TypesTestIdParam

type TypesTestIdParam = openapi_types.UUID

TypesTestIdParam defines model for types.TestIdParam.

type TypesTestOptions

type TypesTestOptions struct {
	// Exclude Files from which findings should be excluded and removed from
	// results.
	//
	// This is different from FindingAttributes.suppressions; the exclude is an
	// up-front declaration that findings in the excluded files are
	// immaterial to the test result (pass/fail), and should not be reported at all.
	//
	// Excluded files might still be used to link other files/findings though. For
	// example, a SAST (source-to-sink) or SCA analysis (transitive dependency
	// chain) might transit an excluded file, enabling discovery in a
	// non-excluded file.
	Exclude *[]ExcludeRule `json:"exclude,omitempty"`
}

TypesTestOptions TestOptions defines options which determine how the Test is conducted. In includes the fields used in create test options, but in a backwards compatible manner.

type TypesTestOutcome

type TypesTestOutcome struct {
	Reason *TypesTestOutcomeReason `json:"reason,omitempty"`
	Result TypesTestOutcomeResult  `json:"result"`
}

TypesTestOutcome The outcome of a Test; pass or fail. It is possible for the Test to show failure before the overall status has completed.

type TypesTestOutcomeReason

type TypesTestOutcomeReason string

TypesTestOutcomeReason defines model for TypesTestOutcome.Reason.

const (
	TypesTestOutcomeReasonOther        TypesTestOutcomeReason = "other"
	TypesTestOutcomeReasonPolicyBreach TypesTestOutcomeReason = "policy_breach"
	TypesTestOutcomeReasonTimeout      TypesTestOutcomeReason = "timeout"
)

Defines values for TypesTestOutcomeReason.

type TypesTestOutcomeResult

type TypesTestOutcomeResult string

TypesTestOutcomeResult defines model for TypesTestOutcome.Result.

const (
	Fail TypesTestOutcomeResult = "fail"
	Pass TypesTestOutcomeResult = "pass"
)

Defines values for TypesTestOutcomeResult.

type TypesTestRelationships

type TypesTestRelationships struct {
	// Findings Relationship link to the findings collection for this test.
	Findings struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"findings"`

	// Logs Relate to application-facing logs produced by the test.
	Logs *struct {
		Data *struct {
			Id   openapi_types.UUID `json:"id"`
			Type string             `json:"type"`
		} `json:"data,omitempty"`
		Links IoSnykApiCommonRelatedLink `json:"links"`

		// Meta Free-form object that may contain non-standard information.
		Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
	} `json:"logs,omitempty"`
}

TypesTestRelationships Resources related to a test.

type TypesTestResource

type TypesTestResource struct {
	// Attributes Summary-level attributes of a test.
	Attributes struct {
		// Context Test context; pertinent information important to associate with the outcome
		// of the test and its further processing, but is not directly used in the
		// test.
		//
		// These are worth modeling with a concrete type, rather than as generic
		// free-form metadata to communicate to consumers of the test what values are
		// available.
		Context *TypesTestContext `json:"context,omitempty"`

		// Options TestOptions are arguments which were used to configure the test and determine the
		// behavior of how it is conducted.
		//
		// Options are optional when creating a test and may be derived from other
		// sources, such as a test configuration policy if not specified. Provided
		// options may be merged with or overridden by such policy.
		//
		// In the requested Test resource, these options will reflect the effective
		// options resolved and applied to the execution of the test.
		Options *TypesTestOptions `json:"options,omitempty"`

		// Outcome Overall outcome of the security test: pass or fail.
		//
		// This outcome may indicate failure early even while the test is still
		// running to completion.
		Outcome TypesTestOutcome `json:"outcome"`

		// State State of the test, which should be polled to status "running" or "done"
		// before unmarshaling into this type.
		State TypesTestState `json:"state"`

		// Summary Summary of all the findings discovered by all the security scans conducted
		// for this test.
		Summary TypesFindingsSummary `json:"summary"`
	} `json:"attributes"`

	// Id Test resource ID. A unique ID assigned to each created test.
	Id openapi_types.UUID `json:"id"`

	// Relationships Resources related to a test.
	Relationships TypesTestRelationships `json:"relationships"`

	// Type Test resource type.
	Type TypesTestResourceType `json:"type"`
}

TypesTestResource TestResource models a JSON API Test resource.

type TypesTestResourceType

type TypesTestResourceType string

TypesTestResourceType Test resource type.

const (
	Tests TypesTestResourceType = "tests"
)

Defines values for TypesTestResourceType.

type TypesTestState

type TypesTestState struct {
	// Errors Errors that occurred during the test execution.
	Errors *TypesTestError `json:"errors,omitempty"`

	// Status Test execution status.
	Status TypesTestExecStatus `json:"status"`
}

TypesTestState The state of a Test execution. Does not include the pass or fail.

type TypesThreadFlow

type TypesThreadFlow struct {
	Locations []IoSnykReactiveFindingSourceLocation `json:"locations"`
}

TypesThreadFlow defines model for types.ThreadFlow.

type TypesUser

type TypesUser struct {
	Email string `json:"email"`
	Name  string `json:"name"`
}

TypesUser User definition

type TypesVulnerabilityFactRiskFactor

type TypesVulnerabilityFactRiskFactor struct {
	Factor TypesVulnerabilityFactRiskFactorFactor `json:"factor"`
	Name   string                                 `json:"name"`
	Value  bool                                   `json:"value"`
}

TypesVulnerabilityFactRiskFactor defines model for types.VulnerabilityFactRiskFactor.

type TypesVulnerabilityFactRiskFactorFactor

type TypesVulnerabilityFactRiskFactorFactor string

TypesVulnerabilityFactRiskFactorFactor defines model for TypesVulnerabilityFactRiskFactor.Factor.

const (
	VulnerabilityFact TypesVulnerabilityFactRiskFactorFactor = "vulnerability-fact"
)

Defines values for TypesVulnerabilityFactRiskFactorFactor.

type TypesVulnerabilityGenericFactor

type TypesVulnerabilityGenericFactor struct {
	Factor TypesVulnerabilityGenericFactorFactor `json:"factor"`
	Name   string                                `json:"name"`
	Value  bool                                  `json:"value"`
}

TypesVulnerabilityGenericFactor defines model for types.VulnerabilityGenericFactor.

type TypesVulnerabilityGenericFactorFactor

type TypesVulnerabilityGenericFactorFactor string

TypesVulnerabilityGenericFactorFactor defines model for TypesVulnerabilityGenericFactor.Factor.

const (
	VulnerabilityGenericFact TypesVulnerabilityGenericFactorFactor = "vulnerability-generic-fact"
)

Defines values for TypesVulnerabilityGenericFactorFactor.

type TypesVulnerabilityInstanceFactRiskFactor

type TypesVulnerabilityInstanceFactRiskFactor struct {
	Factor TypesVulnerabilityInstanceFactRiskFactorFactor `json:"factor"`
	Name   string                                         `json:"name"`
	Value  bool                                           `json:"value"`
}

TypesVulnerabilityInstanceFactRiskFactor defines model for types.VulnerabilityInstanceFactRiskFactor.

type TypesVulnerabilityInstanceFactRiskFactorFactor

type TypesVulnerabilityInstanceFactRiskFactorFactor string

TypesVulnerabilityInstanceFactRiskFactorFactor defines model for TypesVulnerabilityInstanceFactRiskFactor.Factor.

const (
	VulnerabilityInstanceFact TypesVulnerabilityInstanceFactRiskFactorFactor = "vulnerability-instance-fact"
)

Defines values for TypesVulnerabilityInstanceFactRiskFactorFactor.

type TypesWorkspaceV1Address

type TypesWorkspaceV1Address struct {
	Scheme TypesWorkspaceV1AddressScheme `json:"scheme"`

	// WorkspaceId Workspace v1 is a sha256 sum (64 hex digits).
	WorkspaceId string `json:"workspace_id"`
}

TypesWorkspaceV1Address Workspace v1 content storage address.

TODO: Update this as needed.

type TypesWorkspaceV1AddressScheme

type TypesWorkspaceV1AddressScheme string

TypesWorkspaceV1AddressScheme defines model for TypesWorkspaceV1Address.Scheme.

const (
	WorkspaceV1 TypesWorkspaceV1AddressScheme = "workspace-v1"
)

Defines values for TypesWorkspaceV1AddressScheme.

type UnionInterface

type UnionInterface interface {
	ValueByDiscriminator() (interface{}, error)
}

Jump to

Keyboard shortcuts

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