Documentation
¶
Overview ¶
Package testapi 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
- Variables
- func Jitter(d time.Duration) time.Duration
- func NewCreateTestRequestWithApplicationVndAPIPlusJSONBody(server string, orgId OrgIdParam, params *CreateTestParams, ...) (*http.Request, error)
- func NewCreateTestRequestWithBody(server string, orgId OrgIdParam, params *CreateTestParams, contentType string, ...) (*http.Request, error)
- func NewGetAPIVersionRequest(server string, version string) (*http.Request, error)
- func NewGetJobRequest(server string, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams) (*http.Request, error)
- func NewGetTestRequest(server string, orgId OrgIdParam, testId TestIdParam, params *GetTestParams) (*http.Request, error)
- func NewListAPIVersionsRequest(server string) (*http.Request, error)
- func NewListFindingsRequest(server string, orgId OrgIdParam, testId TestIdParam, ...) (*http.Request, error)
- type ActualVersion
- type Client
- func (c *Client) CreateTestWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, ...) (*http.Response, error)
- func (c *Client) CreateTestWithBody(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, ...) (*http.Response, error)
- func (c *Client) GetAPIVersion(ctx context.Context, version string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetJob(ctx context.Context, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams, ...) (*http.Response, error)
- func (c *Client) GetTest(ctx context.Context, orgId OrgIdParam, testId TestIdParam, ...) (*http.Response, error)
- func (c *Client) ListAPIVersions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListFindings(ctx context.Context, orgId OrgIdParam, testId TestIdParam, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, ...) (*CreateTestResponse, error)
- func (c *ClientWithResponses) CreateTestWithBodyWithResponse(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, ...) (*CreateTestResponse, error)
- func (c *ClientWithResponses) GetAPIVersionWithResponse(ctx context.Context, version string, reqEditors ...RequestEditorFn) (*GetAPIVersionResponse, error)
- func (c *ClientWithResponses) GetJobWithResponse(ctx context.Context, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams, ...) (*GetJobResponse, error)
- func (c *ClientWithResponses) GetTestWithResponse(ctx context.Context, orgId OrgIdParam, testId TestIdParam, ...) (*GetTestResponse, error)
- func (c *ClientWithResponses) ListAPIVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAPIVersionsResponse, error)
- func (c *ClientWithResponses) ListFindingsWithResponse(ctx context.Context, orgId OrgIdParam, testId TestIdParam, ...) (*ListFindingsResponse, error)
- type ClientWithResponsesInterface
- type ConfigOption
- func WithAPIVersion(v string) ConfigOption
- func WithCustomHTTPClient(doer HttpRequestDoer) ConfigOption
- func WithCustomRequestEditorFn(fn RequestEditorFn) ConfigOption
- func WithJitterFunc(fn func(time.Duration) time.Duration) ConfigOption
- func WithLogger(l *zerolog.Logger) ConfigOption
- func WithPollInterval(d time.Duration) ConfigOption
- func WithPollTimeout(d time.Duration) ConfigOption
- type CreateTest202DataType
- type CreateTestApplicationVndAPIPlusJSONRequestBody
- type CreateTestParams
- type CreateTestResponse
- type CreateTest_202_Links
- type CveProblem
- type CveProblemSource
- type CweProblem
- type CweProblemSource
- type DeepcodeBundleSubject
- type DeepcodeBundleSubjectType
- type DepGraphSubject
- type DepGraphSubjectCreate
- type DepGraphSubjectCreateType
- type DepGraphSubjectType
- type DependencyPathEvidence
- type DependencyPathEvidenceSource
- type Error
- type ErrorDocument
- type ErrorLink
- type Evidence
- func (t Evidence) AsDependencyPathEvidence() (DependencyPathEvidence, error)
- func (t Evidence) AsExecutionFlowEvidence() (ExecutionFlowEvidence, error)
- func (t Evidence) AsOtherEvidence() (OtherEvidence, error)
- func (t Evidence) AsReachabilityEvidence() (ReachabilityEvidence, error)
- func (t Evidence) Discriminator() (string, error)
- func (t *Evidence) FromDependencyPathEvidence(v DependencyPathEvidence) error
- func (t *Evidence) FromExecutionFlowEvidence(v ExecutionFlowEvidence) error
- func (t *Evidence) FromOtherEvidence(v OtherEvidence) error
- func (t *Evidence) FromReachabilityEvidence(v ReachabilityEvidence) error
- func (t Evidence) MarshalJSON() ([]byte, error)
- func (t *Evidence) MergeDependencyPathEvidence(v DependencyPathEvidence) error
- func (t *Evidence) MergeExecutionFlowEvidence(v ExecutionFlowEvidence) error
- func (t *Evidence) MergeOtherEvidence(v OtherEvidence) error
- func (t *Evidence) MergeReachabilityEvidence(v ReachabilityEvidence) error
- func (t *Evidence) UnmarshalJSON(b []byte) error
- func (t Evidence) ValueByDiscriminator() (interface{}, error)
- type ExecutionFlowEvidence
- type ExecutionFlowEvidenceSource
- type FileRegion
- type FindingAttributes
- type FindingData
- type FindingDataType
- type FindingLocation
- func (t FindingLocation) AsOtherLocation() (OtherLocation, error)
- func (t FindingLocation) AsPackageLocation() (PackageLocation, error)
- func (t FindingLocation) AsSourceLocation() (SourceLocation, error)
- func (t FindingLocation) Discriminator() (string, error)
- func (t *FindingLocation) FromOtherLocation(v OtherLocation) error
- func (t *FindingLocation) FromPackageLocation(v PackageLocation) error
- func (t *FindingLocation) FromSourceLocation(v SourceLocation) error
- func (t FindingLocation) MarshalJSON() ([]byte, error)
- func (t *FindingLocation) MergeOtherLocation(v OtherLocation) error
- func (t *FindingLocation) MergePackageLocation(v PackageLocation) error
- func (t *FindingLocation) MergeSourceLocation(v SourceLocation) error
- func (t *FindingLocation) UnmarshalJSON(b []byte) error
- func (t FindingLocation) ValueByDiscriminator() (interface{}, error)
- type FindingSummary
- type FindingType
- type GetAPIVersionResponse
- type GetJobParams
- type GetJobResponse
- type GetJob_200_Links
- type GetJob_303_Links
- type GetTestParams
- type GetTestResponse
- type GetTest_200_Links
- type GitUrlCoordinatesSubject
- type GitUrlCoordinatesSubjectType
- type GithubSecurityAdvisoryProblem
- type GithubSecurityAdvisoryProblemSource
- type HttpRequestDoer
- type IoSnykApiCommonError
- type IoSnykApiCommonErrorDocument
- type IoSnykApiCommonErrorLink
- func (a IoSnykApiCommonErrorLink) Get(fieldName string) (value IoSnykApiCommonLinkProperty, found bool)
- func (a IoSnykApiCommonErrorLink) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiCommonErrorLink) Set(fieldName string, value IoSnykApiCommonLinkProperty)
- func (a *IoSnykApiCommonErrorLink) UnmarshalJSON(b []byte) error
- type IoSnykApiCommonJsonApi
- type IoSnykApiCommonJsonApiVersion
- type IoSnykApiCommonLinkObject
- type IoSnykApiCommonLinkProperty
- func (t IoSnykApiCommonLinkProperty) AsIoSnykApiCommonLinkObject() (IoSnykApiCommonLinkObject, error)
- func (t IoSnykApiCommonLinkProperty) AsIoSnykApiCommonLinkString() (IoSnykApiCommonLinkString, error)
- func (t *IoSnykApiCommonLinkProperty) FromIoSnykApiCommonLinkObject(v IoSnykApiCommonLinkObject) error
- func (t *IoSnykApiCommonLinkProperty) FromIoSnykApiCommonLinkString(v IoSnykApiCommonLinkString) error
- func (t IoSnykApiCommonLinkProperty) MarshalJSON() ([]byte, error)
- func (t *IoSnykApiCommonLinkProperty) MergeIoSnykApiCommonLinkObject(v IoSnykApiCommonLinkObject) error
- func (t *IoSnykApiCommonLinkProperty) MergeIoSnykApiCommonLinkString(v IoSnykApiCommonLinkString) error
- func (t *IoSnykApiCommonLinkProperty) UnmarshalJSON(b []byte) error
- type IoSnykApiCommonLinkString
- type IoSnykApiCommonMeta
- type IoSnykApiCommonPaginatedLinks
- type IoSnykApiCommonRelatedLink
- type IoSnykApiRequestPaginatedRequestEndingBefore
- type IoSnykApiRequestPaginatedRequestLimit
- type IoSnykApiRequestPaginatedRequestStartingAfter
- type IoSnykApiRequestSnykApiRequestInteractionId
- type IoSnykApiRequestSnykApiRequestRequestId
- type IoSnykApiRequestSnykApiRequestVersion
- type IoSnykApiV1testdepgraphRequestDepGraph
- func (a IoSnykApiV1testdepgraphRequestDepGraph) Get(fieldName string) (value interface{}, found bool)
- func (a IoSnykApiV1testdepgraphRequestDepGraph) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiV1testdepgraphRequestDepGraph) Set(fieldName string, value interface{})
- func (a *IoSnykApiV1testdepgraphRequestDepGraph) UnmarshalJSON(b []byte) error
- type IoSnykApiV1testdepgraphRequestGraph
- func (a IoSnykApiV1testdepgraphRequestGraph) Get(fieldName string) (value interface{}, found bool)
- func (a IoSnykApiV1testdepgraphRequestGraph) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiV1testdepgraphRequestGraph) Set(fieldName string, value interface{})
- func (a *IoSnykApiV1testdepgraphRequestGraph) UnmarshalJSON(b []byte) error
- type IoSnykApiV1testdepgraphRequestNode
- func (a IoSnykApiV1testdepgraphRequestNode) Get(fieldName string) (value interface{}, found bool)
- func (a IoSnykApiV1testdepgraphRequestNode) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiV1testdepgraphRequestNode) Set(fieldName string, value interface{})
- func (a *IoSnykApiV1testdepgraphRequestNode) UnmarshalJSON(b []byte) error
- type IoSnykApiV1testdepgraphRequestNodeRef
- func (a IoSnykApiV1testdepgraphRequestNodeRef) Get(fieldName string) (value interface{}, found bool)
- func (a IoSnykApiV1testdepgraphRequestNodeRef) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiV1testdepgraphRequestNodeRef) Set(fieldName string, value interface{})
- func (a *IoSnykApiV1testdepgraphRequestNodeRef) UnmarshalJSON(b []byte) error
- type IoSnykApiV1testdepgraphRequestPackage
- func (a IoSnykApiV1testdepgraphRequestPackage) Get(fieldName string) (value interface{}, found bool)
- func (a IoSnykApiV1testdepgraphRequestPackage) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiV1testdepgraphRequestPackage) Set(fieldName string, value interface{})
- func (a *IoSnykApiV1testdepgraphRequestPackage) UnmarshalJSON(b []byte) error
- type IoSnykApiV1testdepgraphRequestPackageInfo
- func (a IoSnykApiV1testdepgraphRequestPackageInfo) Get(fieldName string) (value interface{}, found bool)
- func (a IoSnykApiV1testdepgraphRequestPackageInfo) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiV1testdepgraphRequestPackageInfo) Set(fieldName string, value interface{})
- func (a *IoSnykApiV1testdepgraphRequestPackageInfo) UnmarshalJSON(b []byte) error
- type IoSnykApiV1testdepgraphRequestPackageManager
- func (a IoSnykApiV1testdepgraphRequestPackageManager) Get(fieldName string) (value interface{}, found bool)
- func (a IoSnykApiV1testdepgraphRequestPackageManager) MarshalJSON() ([]byte, error)
- func (a *IoSnykApiV1testdepgraphRequestPackageManager) Set(fieldName string, value interface{})
- func (a *IoSnykApiV1testdepgraphRequestPackageManager) UnmarshalJSON(b []byte) error
- type JobAttributes
- type JobData
- type JobDataType
- type JobIdParam
- type JobRelationshipField
- type JobRelationshipFieldDataType
- type JobRelationships
- type JsonApi
- type LinkProperty
- func (t LinkProperty) AsLinkProperty0() (LinkProperty0, error)
- func (t LinkProperty) AsLinkProperty1() (LinkProperty1, error)
- func (t *LinkProperty) FromLinkProperty0(v LinkProperty0) error
- func (t *LinkProperty) FromLinkProperty1(v LinkProperty1) error
- func (t LinkProperty) MarshalJSON() ([]byte, error)
- func (t *LinkProperty) MergeLinkProperty0(v LinkProperty0) error
- func (t *LinkProperty) MergeLinkProperty1(v LinkProperty1) error
- func (t *LinkProperty) UnmarshalJSON(b []byte) error
- type LinkProperty0
- type LinkProperty1
- type ListAPIVersionsResponse
- type ListFindingsParams
- type ListFindingsResponse
- type LocalPathLocator
- type LocalPathLocatorType
- type LocalPolicy
- type ManagedPolicyRef
- type Meta
- type N400
- type N401
- type N404
- type N500
- type OrgIdParam
- type OtherEvidence
- type OtherEvidenceSource
- type OtherLocation
- type OtherLocationType
- type OtherLocator
- type OtherLocatorType
- type OtherProblem
- type OtherProblemSource
- type OtherSubject
- type OtherSubjectType
- type Package
- type PackageLocation
- type PackageLocationType
- type PassFail
- type PolicyModification
- type PolicyRef
- func (t PolicyRef) AsManagedPolicyRef() (ManagedPolicyRef, error)
- func (t PolicyRef) AsPolicyRef0() (PolicyRef0, error)
- func (t *PolicyRef) FromManagedPolicyRef(v ManagedPolicyRef) error
- func (t *PolicyRef) FromPolicyRef0(v PolicyRef0) error
- func (t PolicyRef) MarshalJSON() ([]byte, error)
- func (t *PolicyRef) MergeManagedPolicyRef(v ManagedPolicyRef) error
- func (t *PolicyRef) MergePolicyRef0(v PolicyRef0) error
- func (t *PolicyRef) UnmarshalJSON(b []byte) error
- type PolicyRef0
- type PolicyRefSet
- type Problem
- func (t Problem) AsCveProblem() (CveProblem, error)
- func (t Problem) AsCweProblem() (CweProblem, error)
- func (t Problem) AsGithubSecurityAdvisoryProblem() (GithubSecurityAdvisoryProblem, error)
- func (t Problem) AsOtherProblem() (OtherProblem, error)
- func (t Problem) AsSnykCloudRuleProblem() (SnykCloudRuleProblem, error)
- func (t Problem) AsSnykCodeRuleProblem() (SnykCodeRuleProblem, error)
- func (t Problem) AsSnykLicenseProblem() (SnykLicenseProblem, error)
- func (t Problem) AsSnykVulnProblem() (SnykVulnProblem, error)
- func (t Problem) Discriminator() (string, error)
- func (t *Problem) FromCveProblem(v CveProblem) error
- func (t *Problem) FromCweProblem(v CweProblem) error
- func (t *Problem) FromGithubSecurityAdvisoryProblem(v GithubSecurityAdvisoryProblem) error
- func (t *Problem) FromOtherProblem(v OtherProblem) error
- func (t *Problem) FromSnykCloudRuleProblem(v SnykCloudRuleProblem) error
- func (t *Problem) FromSnykCodeRuleProblem(v SnykCodeRuleProblem) error
- func (t *Problem) FromSnykLicenseProblem(v SnykLicenseProblem) error
- func (t *Problem) FromSnykVulnProblem(v SnykVulnProblem) error
- func (t Problem) MarshalJSON() ([]byte, error)
- func (t *Problem) MergeCveProblem(v CveProblem) error
- func (t *Problem) MergeCweProblem(v CweProblem) error
- func (t *Problem) MergeGithubSecurityAdvisoryProblem(v GithubSecurityAdvisoryProblem) error
- func (t *Problem) MergeOtherProblem(v OtherProblem) error
- func (t *Problem) MergeSnykCloudRuleProblem(v SnykCloudRuleProblem) error
- func (t *Problem) MergeSnykCodeRuleProblem(v SnykCodeRuleProblem) error
- func (t *Problem) MergeSnykLicenseProblem(v SnykLicenseProblem) error
- func (t *Problem) MergeSnykVulnProblem(v SnykVulnProblem) error
- func (t *Problem) UnmarshalJSON(b []byte) error
- func (t Problem) ValueByDiscriminator() (interface{}, error)
- type ProjectEntityLocator
- type ProjectEntityLocatorType
- type ProjectNameLocator
- type ProjectNameLocatorType
- type QueryVersion
- type Rating
- type ReachabilityEvidence
- type ReachabilityEvidenceSource
- type ReachabilityType
- type ReachablePath
- type RequestEditorFn
- type Risk
- type RiskScore
- type SbomReachabilitySubject
- type SbomReachabilitySubjectType
- type SbomSubject
- type SbomSubjectType
- type ScmRepoLocator
- type ScmRepoLocatorType
- type Severity
- type SnykCloudRuleProblem
- type SnykCloudRuleProblemSource
- type SnykCodeRuleProblem
- type SnykCodeRuleProblemSource
- type SnykLicenseProblem
- type SnykLicenseProblemSource
- type SnykVulnProblem
- type SnykVulnProblemSource
- type SnykcoderuleConfiguration
- type SnykcoderuleExampleCommitChange
- type SnykcoderuleExampleCommitFix
- type SnykcoderuleMultiformatMessageString
- type SnykcoderuleProperties
- type SnykvulndbBuildPackageEcosystem
- type SnykvulndbBuildPackageEcosystemType
- type SnykvulndbCvssScore
- type SnykvulndbCvssSource
- type SnykvulndbCvssSourceType
- type SnykvulndbEpssDetails
- type SnykvulndbExploitDetails
- type SnykvulndbExploitMaturityLevel
- type SnykvulndbOsPackageEcosystem
- type SnykvulndbOsPackageEcosystemType
- type SnykvulndbOtherPackageEcosystem
- type SnykvulndbOtherPackageEcosystemType
- type SnykvulndbPackageEcosystem
- func (t SnykvulndbPackageEcosystem) AsSnykvulndbBuildPackageEcosystem() (SnykvulndbBuildPackageEcosystem, error)
- func (t SnykvulndbPackageEcosystem) AsSnykvulndbOsPackageEcosystem() (SnykvulndbOsPackageEcosystem, error)
- func (t SnykvulndbPackageEcosystem) AsSnykvulndbOtherPackageEcosystem() (SnykvulndbOtherPackageEcosystem, error)
- func (t SnykvulndbPackageEcosystem) Discriminator() (string, error)
- func (t *SnykvulndbPackageEcosystem) FromSnykvulndbBuildPackageEcosystem(v SnykvulndbBuildPackageEcosystem) error
- func (t *SnykvulndbPackageEcosystem) FromSnykvulndbOsPackageEcosystem(v SnykvulndbOsPackageEcosystem) error
- func (t *SnykvulndbPackageEcosystem) FromSnykvulndbOtherPackageEcosystem(v SnykvulndbOtherPackageEcosystem) error
- func (t SnykvulndbPackageEcosystem) MarshalJSON() ([]byte, error)
- func (t *SnykvulndbPackageEcosystem) MergeSnykvulndbBuildPackageEcosystem(v SnykvulndbBuildPackageEcosystem) error
- func (t *SnykvulndbPackageEcosystem) MergeSnykvulndbOsPackageEcosystem(v SnykvulndbOsPackageEcosystem) error
- func (t *SnykvulndbPackageEcosystem) MergeSnykvulndbOtherPackageEcosystem(v SnykvulndbOtherPackageEcosystem) error
- func (t *SnykvulndbPackageEcosystem) UnmarshalJSON(b []byte) error
- func (t SnykvulndbPackageEcosystem) ValueByDiscriminator() (interface{}, error)
- type SnykvulndbReferenceLinks
- type SnykvulndbVulnerableFunction
- type SnykvulndbVulnerableFunctionId
- type SourceLocation
- type SourceLocationType
- type StartTestParams
- type Suppression
- type SuppressionStatus
- type TestAttributes
- type TestAttributesCreate
- type TestClient
- type TestConfiguration
- type TestData
- type TestDataCreate
- type TestDataCreateType
- type TestDataType
- type TestExecutionStates
- type TestHandle
- type TestIdParam
- type TestOutcome
- type TestOutcomeReason
- type TestRequestBody
- type TestResult
- type TestState
- type TestSubject
- func (t TestSubject) AsDeepcodeBundleSubject() (DeepcodeBundleSubject, error)
- func (t TestSubject) AsDepGraphSubject() (DepGraphSubject, error)
- func (t TestSubject) AsGitUrlCoordinatesSubject() (GitUrlCoordinatesSubject, error)
- func (t TestSubject) AsOtherSubject() (OtherSubject, error)
- func (t TestSubject) AsSbomReachabilitySubject() (SbomReachabilitySubject, error)
- func (t TestSubject) AsSbomSubject() (SbomSubject, error)
- func (t TestSubject) Discriminator() (string, error)
- func (t *TestSubject) FromDeepcodeBundleSubject(v DeepcodeBundleSubject) error
- func (t *TestSubject) FromDepGraphSubject(v DepGraphSubject) error
- func (t *TestSubject) FromGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
- func (t *TestSubject) FromOtherSubject(v OtherSubject) error
- func (t *TestSubject) FromSbomReachabilitySubject(v SbomReachabilitySubject) error
- func (t *TestSubject) FromSbomSubject(v SbomSubject) error
- func (t TestSubject) MarshalJSON() ([]byte, error)
- func (t *TestSubject) MergeDeepcodeBundleSubject(v DeepcodeBundleSubject) error
- func (t *TestSubject) MergeDepGraphSubject(v DepGraphSubject) error
- func (t *TestSubject) MergeGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
- func (t *TestSubject) MergeOtherSubject(v OtherSubject) error
- func (t *TestSubject) MergeSbomReachabilitySubject(v SbomReachabilitySubject) error
- func (t *TestSubject) MergeSbomSubject(v SbomSubject) error
- func (t *TestSubject) UnmarshalJSON(b []byte) error
- func (t TestSubject) ValueByDiscriminator() (interface{}, error)
- type TestSubjectCreate
- func (t TestSubjectCreate) AsDeepcodeBundleSubject() (DeepcodeBundleSubject, error)
- func (t TestSubjectCreate) AsDepGraphSubjectCreate() (DepGraphSubjectCreate, error)
- func (t TestSubjectCreate) AsGitUrlCoordinatesSubject() (GitUrlCoordinatesSubject, error)
- func (t TestSubjectCreate) AsOtherSubject() (OtherSubject, error)
- func (t TestSubjectCreate) AsSbomReachabilitySubject() (SbomReachabilitySubject, error)
- func (t TestSubjectCreate) AsSbomSubject() (SbomSubject, error)
- func (t TestSubjectCreate) Discriminator() (string, error)
- func (t *TestSubjectCreate) FromDeepcodeBundleSubject(v DeepcodeBundleSubject) error
- func (t *TestSubjectCreate) FromDepGraphSubjectCreate(v DepGraphSubjectCreate) error
- func (t *TestSubjectCreate) FromGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
- func (t *TestSubjectCreate) FromOtherSubject(v OtherSubject) error
- func (t *TestSubjectCreate) FromSbomReachabilitySubject(v SbomReachabilitySubject) error
- func (t *TestSubjectCreate) FromSbomSubject(v SbomSubject) error
- func (t TestSubjectCreate) MarshalJSON() ([]byte, error)
- func (t *TestSubjectCreate) MergeDeepcodeBundleSubject(v DeepcodeBundleSubject) error
- func (t *TestSubjectCreate) MergeDepGraphSubjectCreate(v DepGraphSubjectCreate) error
- func (t *TestSubjectCreate) MergeGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
- func (t *TestSubjectCreate) MergeOtherSubject(v OtherSubject) error
- func (t *TestSubjectCreate) MergeSbomReachabilitySubject(v SbomReachabilitySubject) error
- func (t *TestSubjectCreate) MergeSbomSubject(v SbomSubject) error
- func (t *TestSubjectCreate) UnmarshalJSON(b []byte) error
- func (t TestSubjectCreate) ValueByDiscriminator() (interface{}, error)
- type TestSubjectLocator
- func (t TestSubjectLocator) AsLocalPathLocator() (LocalPathLocator, error)
- func (t TestSubjectLocator) AsOtherLocator() (OtherLocator, error)
- func (t TestSubjectLocator) AsProjectEntityLocator() (ProjectEntityLocator, error)
- func (t TestSubjectLocator) AsProjectNameLocator() (ProjectNameLocator, error)
- func (t TestSubjectLocator) AsScmRepoLocator() (ScmRepoLocator, error)
- func (t TestSubjectLocator) Discriminator() (string, error)
- func (t *TestSubjectLocator) FromLocalPathLocator(v LocalPathLocator) error
- func (t *TestSubjectLocator) FromOtherLocator(v OtherLocator) error
- func (t *TestSubjectLocator) FromProjectEntityLocator(v ProjectEntityLocator) error
- func (t *TestSubjectLocator) FromProjectNameLocator(v ProjectNameLocator) error
- func (t *TestSubjectLocator) FromScmRepoLocator(v ScmRepoLocator) error
- func (t TestSubjectLocator) MarshalJSON() ([]byte, error)
- func (t *TestSubjectLocator) MergeLocalPathLocator(v LocalPathLocator) error
- func (t *TestSubjectLocator) MergeOtherLocator(v OtherLocator) error
- func (t *TestSubjectLocator) MergeProjectEntityLocator(v ProjectEntityLocator) error
- func (t *TestSubjectLocator) MergeProjectNameLocator(v ProjectNameLocator) error
- func (t *TestSubjectLocator) MergeScmRepoLocator(v ScmRepoLocator) error
- func (t *TestSubjectLocator) UnmarshalJSON(b []byte) error
- func (t TestSubjectLocator) ValueByDiscriminator() (interface{}, error)
- type TimeoutSpec
- type Uuid
Constants ¶
const ( DefaultPollInterval = 2 * time.Second MinPollInterval = 1 * time.Second MaxFindingsPerPage = 100 DefaultAPIVersion = "2024-10-15" )
Variables ¶
var ( ErrInvalidStateForFindings = errors.New("cannot fetch findings: test ID or internal handle is missing") ErrFindingsFetchCanceled = errors.New("findings fetch operation was canceled") ErrFindingsPageRequest = errors.New("failed to request a page of findings") ErrFindingsPageResponse = errors.New("unexpected API response when fetching findings page") ErrFindingsPageData = errors.New("invalid data in findings page API response") ErrFindingsNextPageCursor = errors.New("failed to determine next findings page cursor from API response") )
Predefined errors for findings operations
Functions ¶
func NewCreateTestRequestWithApplicationVndAPIPlusJSONBody ¶
func NewCreateTestRequestWithApplicationVndAPIPlusJSONBody(server string, orgId OrgIdParam, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
NewCreateTestRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateTest builder with application/vnd.api+json body
func NewCreateTestRequestWithBody ¶
func NewCreateTestRequestWithBody(server string, orgId OrgIdParam, params *CreateTestParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateTestRequestWithBody generates requests for CreateTest with any type of body
func NewGetAPIVersionRequest ¶
NewGetAPIVersionRequest generates requests for GetAPIVersion
func NewGetJobRequest ¶
func NewGetJobRequest(server string, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams) (*http.Request, error)
NewGetJobRequest generates requests for GetJob
func NewGetTestRequest ¶
func NewGetTestRequest(server string, orgId OrgIdParam, testId TestIdParam, params *GetTestParams) (*http.Request, error)
NewGetTestRequest generates requests for GetTest
func NewListAPIVersionsRequest ¶
NewListAPIVersionsRequest generates requests for ListAPIVersions
func NewListFindingsRequest ¶
func NewListFindingsRequest(server string, orgId OrgIdParam, testId TestIdParam, params *ListFindingsParams) (*http.Request, error)
NewListFindingsRequest generates requests for ListFindings
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateTestWithApplicationVndAPIPlusJSONBody ¶
func (c *Client) CreateTestWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateTestWithBody ¶
func (c *Client) CreateTestWithBody(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetAPIVersion ¶
func (*Client) GetJob ¶
func (c *Client) GetJob(ctx context.Context, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetTest ¶
func (c *Client) GetTest(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *GetTestParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListAPIVersions ¶
func (*Client) ListFindings ¶
func (c *Client) ListFindings(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *ListFindingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListAPIVersions request
ListAPIVersions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAPIVersion request
GetAPIVersion(ctx context.Context, version string, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetJob request
GetJob(ctx context.Context, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateTestWithBody request with any body
CreateTestWithBody(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateTestWithApplicationVndAPIPlusJSONBody(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTest request
GetTest(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *GetTestParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListFindings request
ListFindings(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *ListFindingsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestResponse, error)
func (*ClientWithResponses) CreateTestWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateTestWithBodyWithResponse(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestResponse, error)
CreateTestWithBodyWithResponse request with arbitrary body returning *CreateTestResponse
func (*ClientWithResponses) GetAPIVersionWithResponse ¶
func (c *ClientWithResponses) GetAPIVersionWithResponse(ctx context.Context, version string, reqEditors ...RequestEditorFn) (*GetAPIVersionResponse, error)
GetAPIVersionWithResponse request returning *GetAPIVersionResponse
func (*ClientWithResponses) GetJobWithResponse ¶
func (c *ClientWithResponses) GetJobWithResponse(ctx context.Context, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams, reqEditors ...RequestEditorFn) (*GetJobResponse, error)
GetJobWithResponse request returning *GetJobResponse
func (*ClientWithResponses) GetTestWithResponse ¶
func (c *ClientWithResponses) GetTestWithResponse(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *GetTestParams, reqEditors ...RequestEditorFn) (*GetTestResponse, error)
GetTestWithResponse request returning *GetTestResponse
func (*ClientWithResponses) ListAPIVersionsWithResponse ¶
func (c *ClientWithResponses) ListAPIVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAPIVersionsResponse, error)
ListAPIVersionsWithResponse request returning *ListAPIVersionsResponse
func (*ClientWithResponses) ListFindingsWithResponse ¶
func (c *ClientWithResponses) ListFindingsWithResponse(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *ListFindingsParams, reqEditors ...RequestEditorFn) (*ListFindingsResponse, error)
ListFindingsWithResponse request returning *ListFindingsResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListAPIVersionsWithResponse request
ListAPIVersionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAPIVersionsResponse, error)
// GetAPIVersionWithResponse request
GetAPIVersionWithResponse(ctx context.Context, version string, reqEditors ...RequestEditorFn) (*GetAPIVersionResponse, error)
// GetJobWithResponse request
GetJobWithResponse(ctx context.Context, orgId OrgIdParam, jobId JobIdParam, params *GetJobParams, reqEditors ...RequestEditorFn) (*GetJobResponse, error)
// CreateTestWithBodyWithResponse request with any body
CreateTestWithBodyWithResponse(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTestResponse, error)
CreateTestWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, orgId OrgIdParam, params *CreateTestParams, body CreateTestApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTestResponse, error)
// GetTestWithResponse request
GetTestWithResponse(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *GetTestParams, reqEditors ...RequestEditorFn) (*GetTestResponse, error)
// ListFindingsWithResponse request
ListFindingsWithResponse(ctx context.Context, orgId OrgIdParam, testId TestIdParam, params *ListFindingsParams, reqEditors ...RequestEditorFn) (*ListFindingsResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ConfigOption ¶
type ConfigOption func(c *config)
ConfigOption allows setting custom parameters during construction
func WithAPIVersion ¶
func WithAPIVersion(v string) ConfigOption
WithAPIVersion sets the API version for the test client.
func WithCustomHTTPClient ¶
func WithCustomHTTPClient(doer HttpRequestDoer) ConfigOption
WithCustomHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithCustomRequestEditorFn ¶
func WithCustomRequestEditorFn(fn RequestEditorFn) ConfigOption
WithCustomRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithJitterFunc ¶
func WithJitterFunc(fn func(time.Duration) time.Duration) ConfigOption
WithJitterFunc allows setting a custom jitter function for polling.
func WithLogger ¶
func WithLogger(l *zerolog.Logger) ConfigOption
WithLogger sets the logger for the test client.
func WithPollInterval ¶
func WithPollInterval(d time.Duration) ConfigOption
WithPollInterval sets the poll interval for the test client. Defaults to 2 seconds if unset or <= 0. Minimum interval is 1 second.
func WithPollTimeout ¶
func WithPollTimeout(d time.Duration) ConfigOption
WithPollTimeout sets the maximum total time for polling.
type CreateTest202DataType ¶
type CreateTest202DataType string
type CreateTestApplicationVndAPIPlusJSONRequestBody ¶
type CreateTestApplicationVndAPIPlusJSONRequestBody = TestRequestBody
CreateTestApplicationVndAPIPlusJSONRequestBody defines body for CreateTest for application/vnd.api+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 CreateTestResponse ¶
type CreateTestResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON202 *struct {
Data struct {
// Attributes JobAttributes represents the attributes of a Job resource
Attributes JobAttributes `json:"attributes"`
Id openapi_types.UUID `json:"id"`
Type CreateTest202DataType `json:"type"`
} `json:"data"`
Jsonapi IoSnykApiCommonJsonApi `json:"jsonapi"`
Links CreateTest_202_Links `json:"links"`
// Meta Free-form object that may contain non-standard information.
Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
}
ApplicationvndApiJSON400 *IoSnykApiCommonErrorDocument
}
func ParseCreateTestResponse ¶
func ParseCreateTestResponse(rsp *http.Response) (*CreateTestResponse, error)
ParseCreateTestResponse parses an HTTP response from a CreateTestWithResponse call
func (CreateTestResponse) Status ¶
func (r CreateTestResponse) Status() string
Status returns HTTPResponse.Status
func (CreateTestResponse) StatusCode ¶
func (r CreateTestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateTest_202_Links ¶
type CreateTest_202_Links struct {
Related *IoSnykApiCommonLinkProperty `json:"related,omitempty"`
Self *IoSnykApiCommonLinkProperty `json:"self,omitempty"`
AdditionalProperties map[string]IoSnykApiCommonLinkProperty `json:"-"`
}
type CveProblem ¶
type CveProblem struct {
Id string `json:"id"`
Source CveProblemSource `json:"source"`
}
CveProblem CVE designation according to the public Common Vulnerability Exposure database.
type CveProblemSource ¶
type CveProblemSource string
CveProblemSource defines model for CveProblem.Source.
const (
Cve CveProblemSource = "cve"
)
Defines values for CveProblemSource.
type CweProblem ¶
type CweProblem struct {
Id string `json:"id"`
Source CweProblemSource `json:"source"`
}
CweProblem CWE classification according to MITRE's Common Weakness Enumeration (CWE) database.
type CweProblemSource ¶
type CweProblemSource string
CweProblemSource defines model for CweProblem.Source.
const (
Cwe CweProblemSource = "cwe"
)
Defines values for CweProblemSource.
type DeepcodeBundleSubject ¶
type DeepcodeBundleSubject struct {
// BundleId Deepcode Bundle ID. These IDs are sha256 digests (32 bytes or 64 hex digits).
BundleId string `json:"bundle_id"`
// Locator Locate local paths from which the source code bundle was derived.
Locator LocalPathLocator `json:"locator"`
Type DeepcodeBundleSubjectType `json:"type"`
}
DeepcodeBundleSubject Test subject representing source code uploaded to Snyk using DeepCode bundle APIs.
type DeepcodeBundleSubjectType ¶
type DeepcodeBundleSubjectType string
DeepcodeBundleSubjectType defines model for DeepcodeBundleSubject.Type.
const (
DeepcodeBundle DeepcodeBundleSubjectType = "deepcode_bundle"
)
Defines values for DeepcodeBundleSubjectType.
type DepGraphSubject ¶
type DepGraphSubject struct {
// Locator Source file(s) from which the dependency graph was derived.
//
// For some managed package ecosystems (examples: Maven, Yarn workspaces),
// Snyk might derive a dependency graph from several files.
Locator LocalPathLocator `json:"locator"`
Type DepGraphSubjectType `json:"type"`
}
DepGraphSubject Test subject representing a Snyk dependency graph (a legacy SBOM format).
type DepGraphSubjectCreate ¶
type DepGraphSubjectCreate struct {
// DepGraph When creating a test, provide the dep-graph contents inline to the request.
//
// This attribute is only available when creating a new Test.
DepGraph IoSnykApiV1testdepgraphRequestDepGraph `json:"dep_graph"`
// Locator Source file(s) from which the dependency graph was derived.
//
// For some managed package ecosystems (examples: Maven, Yarn workspaces),
// Snyk might derive a dependency graph from several files.
Locator LocalPathLocator `json:"locator"`
Type DepGraphSubjectCreateType `json:"type"`
}
DepGraphSubjectCreate Test subject representing a Snyk dependency graph (a legacy SBOM format).
type DepGraphSubjectCreateType ¶
type DepGraphSubjectCreateType string
DepGraphSubjectCreateType defines model for DepGraphSubjectCreate.Type.
const (
DepGraphSubjectCreateTypeDepGraph DepGraphSubjectCreateType = "dep_graph"
)
Defines values for DepGraphSubjectCreateType.
type DepGraphSubjectType ¶
type DepGraphSubjectType string
DepGraphSubjectType defines model for DepGraphSubject.Type.
const (
DepGraphSubjectTypeDepGraph DepGraphSubjectType = "dep_graph"
)
Defines values for DepGraphSubjectType.
type DependencyPathEvidence ¶
type DependencyPathEvidence struct {
// Path Series of component identifiers starting from the top-level component tested,
// and ending in the vulnerable software component.
//
// The identifiers are domain-specific and determined by the test subject.
Path []Package `json:"path"`
Source DependencyPathEvidenceSource `json:"source"`
}
DependencyPathEvidence Dependency path to a software component within an SBOM dependency graph.
Finding types: SCA
type DependencyPathEvidenceSource ¶
type DependencyPathEvidenceSource string
DependencyPathEvidenceSource defines model for DependencyPathEvidence.Source.
const (
DependencyPath DependencyPathEvidenceSource = "dependency_path"
)
Defines values for DependencyPathEvidenceSource.
type Error ¶
type Error 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 *ErrorLink `json:"links,omitempty"`
Meta *map[string]interface{} `json:"meta,omitempty"`
Source *struct {
// Parameter A string indicating which URI query parameter caused the error.
Parameter *string `json:"parameter,omitempty"`
// Pointer A JSON Pointer [RFC6901] to the associated entity in the request document.
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"`
}
Error defines model for Error.
type ErrorDocument ¶
ErrorDocument defines model for ErrorDocument.
type ErrorLink ¶
type ErrorLink struct {
About *LinkProperty `json:"about,omitempty"`
}
ErrorLink A link that leads to further details about this particular occurrance of the problem.
type Evidence ¶
type Evidence struct {
// contains filtered or unexported fields
}
Evidence Supporting evidence for (rather than representative of) the finding in other security domains and systems, lacking a well-known identifier.
More detailed attributes may also be included inline, especially when this information is not yet generally available in a well-known public APIs.
Examples include: - Detailed enumeration of dependency paths - Execution flows leading to a code rule violation
func (Evidence) AsDependencyPathEvidence ¶
func (t Evidence) AsDependencyPathEvidence() (DependencyPathEvidence, error)
AsDependencyPathEvidence returns the union data inside the Evidence as a DependencyPathEvidence
func (Evidence) AsExecutionFlowEvidence ¶
func (t Evidence) AsExecutionFlowEvidence() (ExecutionFlowEvidence, error)
AsExecutionFlowEvidence returns the union data inside the Evidence as a ExecutionFlowEvidence
func (Evidence) AsOtherEvidence ¶
func (t Evidence) AsOtherEvidence() (OtherEvidence, error)
AsOtherEvidence returns the union data inside the Evidence as a OtherEvidence
func (Evidence) AsReachabilityEvidence ¶
func (t Evidence) AsReachabilityEvidence() (ReachabilityEvidence, error)
AsReachabilityEvidence returns the union data inside the Evidence as a ReachabilityEvidence
func (Evidence) Discriminator ¶
func (*Evidence) FromDependencyPathEvidence ¶
func (t *Evidence) FromDependencyPathEvidence(v DependencyPathEvidence) error
FromDependencyPathEvidence overwrites any union data inside the Evidence as the provided DependencyPathEvidence
func (*Evidence) FromExecutionFlowEvidence ¶
func (t *Evidence) FromExecutionFlowEvidence(v ExecutionFlowEvidence) error
FromExecutionFlowEvidence overwrites any union data inside the Evidence as the provided ExecutionFlowEvidence
func (*Evidence) FromOtherEvidence ¶
func (t *Evidence) FromOtherEvidence(v OtherEvidence) error
FromOtherEvidence overwrites any union data inside the Evidence as the provided OtherEvidence
func (*Evidence) FromReachabilityEvidence ¶
func (t *Evidence) FromReachabilityEvidence(v ReachabilityEvidence) error
FromReachabilityEvidence overwrites any union data inside the Evidence as the provided ReachabilityEvidence
func (Evidence) MarshalJSON ¶
func (*Evidence) MergeDependencyPathEvidence ¶
func (t *Evidence) MergeDependencyPathEvidence(v DependencyPathEvidence) error
MergeDependencyPathEvidence performs a merge with any union data inside the Evidence, using the provided DependencyPathEvidence
func (*Evidence) MergeExecutionFlowEvidence ¶
func (t *Evidence) MergeExecutionFlowEvidence(v ExecutionFlowEvidence) error
MergeExecutionFlowEvidence performs a merge with any union data inside the Evidence, using the provided ExecutionFlowEvidence
func (*Evidence) MergeOtherEvidence ¶
func (t *Evidence) MergeOtherEvidence(v OtherEvidence) error
MergeOtherEvidence performs a merge with any union data inside the Evidence, using the provided OtherEvidence
func (*Evidence) MergeReachabilityEvidence ¶
func (t *Evidence) MergeReachabilityEvidence(v ReachabilityEvidence) error
MergeReachabilityEvidence performs a merge with any union data inside the Evidence, using the provided ReachabilityEvidence
func (*Evidence) UnmarshalJSON ¶
func (Evidence) ValueByDiscriminator ¶
type ExecutionFlowEvidence ¶
type ExecutionFlowEvidence struct {
// Flow Sequence of locations within this flow of execution.
//
// For example, a sequence of locations connecting the "source" location
// where input data is obtained, to a "sink" location where it is used.
Flow []FileRegion `json:"flow"`
Source ExecutionFlowEvidenceSource `json:"source"`
}
ExecutionFlowEvidence Indicate a program flow of execution as additional evidence for the finding.
type ExecutionFlowEvidenceSource ¶
type ExecutionFlowEvidenceSource string
ExecutionFlowEvidenceSource defines model for ExecutionFlowEvidence.Source.
const (
ExecutionFlow ExecutionFlowEvidenceSource = "execution_flow"
)
Defines values for ExecutionFlowEvidenceSource.
type FileRegion ¶
type FileRegion struct {
// FilePath File path for the code snippet.
FilePath string `json:"file_path"`
// FromColumn Column on which the snippet starts.
FromColumn *int `json:"from_column,omitempty"`
// FromLine Line in the file where the code snippet starts.
FromLine int `json:"from_line"`
// ToColumn Column at which the code snippet ends.
ToColumn *int `json:"to_column,omitempty"`
// ToLine Line on which the code snippet ends.
ToLine *int `json:"to_line,omitempty"`
}
FileRegion FileRegion models a location where vulnerable code is found.
type FindingAttributes ¶
type FindingAttributes struct {
// CauseOfFailure Did this finding cause the test outcome to fail?
CauseOfFailure bool `json:"cause_of_failure"`
// Description A longer human-readable text description for this finding.
Description string `json:"description"`
// Evidence Supporting evidence for (rather than representative of) the finding in
// other security domains and systems, lacking a well-known identifier.
Evidence []Evidence `json:"evidence"`
// FindingType Type of finding.
FindingType FindingType `json:"finding_type"`
// Key An opaque key used for aggregating the finding across multiple test
// executions operating on the same or originating Asset.
//
// Findings within a Test execution are aggregated by this key.
Key string `json:"key"`
// Locations Locations in the Asset's contents where the finding may be found.
Locations []FindingLocation `json:"locations"`
// PolicyModifications Attributes which have been modified by policy decisions.
PolicyModifications *[]PolicyModification `json:"policy_modifications,omitempty"`
// Problems Problems are representative of the finding in other security domains and
// systems with a well-known identifier.
Problems []Problem `json:"problems"`
// Rating Qualitative ratings on a finding.
Rating Rating `json:"rating"`
// Risk Qualitative risk analysis on a finding.
Risk Risk `json:"risk"`
// Suppression Indication of whether a finding is suppressed by a policy decision.
Suppression *Suppression `json:"suppression,omitempty"`
// Title A human-readable title for this finding.
Title string `json:"title"`
}
FindingAttributes FindingAttributes represent the attributes of a Finding resource.
type FindingData ¶
type FindingData struct {
Attributes *FindingAttributes `json:"attributes,omitempty"`
Id *openapi_types.UUID `json:"id,omitempty"`
// Links Links to external resources outside this API.
//
// Because these are not REST API resources, they are expressed here as links,
// rather than as relationships.
Links *struct {
// SnykAdvisory Link to Snyk's vulnerability advisory for more information on the
// finding, if applicable.
SnykAdvisory *IoSnykApiCommonLinkProperty `json:"snyk_advisory,omitempty"`
// SnykLearn Link to a Snyk Learn lesson relevant to the finding, if applicable.
SnykLearn *IoSnykApiCommonLinkProperty `json:"snyk_learn,omitempty"`
} `json:"links,omitempty"`
Relationships *struct {
// Asset Originating asset in which this finding was discovered.
Asset *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:"asset,omitempty"`
// Org Snyk organization scope in which the finding was discovered.
Org *struct {
Data *struct {
Id openapi_types.UUID `json:"id"`
Type string `json:"type"`
} `json:"data,omitempty"`
} `json:"org,omitempty"`
// Policy Relate to the policy or policies applied to this finding.
Policy *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,omitempty"`
// Test Test in which this finding was discovered.
Test *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:"test,omitempty"`
} `json:"relationships,omitempty"`
Type *FindingDataType `json:"type,omitempty"`
}
FindingData FindingData represents a Finding resource object.
type FindingDataType ¶
type FindingDataType string
FindingDataType defines model for FindingData.Type.
const (
Findings FindingDataType = "findings"
)
Defines values for FindingDataType.
type FindingLocation ¶
type FindingLocation struct {
// contains filtered or unexported fields
}
FindingLocation Location within an Subject's contents where the finding was discovered.
func (FindingLocation) AsOtherLocation ¶
func (t FindingLocation) AsOtherLocation() (OtherLocation, error)
AsOtherLocation returns the union data inside the FindingLocation as a OtherLocation
func (FindingLocation) AsPackageLocation ¶
func (t FindingLocation) AsPackageLocation() (PackageLocation, error)
AsPackageLocation returns the union data inside the FindingLocation as a PackageLocation
func (FindingLocation) AsSourceLocation ¶
func (t FindingLocation) AsSourceLocation() (SourceLocation, error)
AsSourceLocation returns the union data inside the FindingLocation as a SourceLocation
func (FindingLocation) Discriminator ¶
func (t FindingLocation) Discriminator() (string, error)
func (*FindingLocation) FromOtherLocation ¶
func (t *FindingLocation) FromOtherLocation(v OtherLocation) error
FromOtherLocation overwrites any union data inside the FindingLocation as the provided OtherLocation
func (*FindingLocation) FromPackageLocation ¶
func (t *FindingLocation) FromPackageLocation(v PackageLocation) error
FromPackageLocation overwrites any union data inside the FindingLocation as the provided PackageLocation
func (*FindingLocation) FromSourceLocation ¶
func (t *FindingLocation) FromSourceLocation(v SourceLocation) error
FromSourceLocation overwrites any union data inside the FindingLocation as the provided SourceLocation
func (FindingLocation) MarshalJSON ¶
func (t FindingLocation) MarshalJSON() ([]byte, error)
func (*FindingLocation) MergeOtherLocation ¶
func (t *FindingLocation) MergeOtherLocation(v OtherLocation) error
MergeOtherLocation performs a merge with any union data inside the FindingLocation, using the provided OtherLocation
func (*FindingLocation) MergePackageLocation ¶
func (t *FindingLocation) MergePackageLocation(v PackageLocation) error
MergePackageLocation performs a merge with any union data inside the FindingLocation, using the provided PackageLocation
func (*FindingLocation) MergeSourceLocation ¶
func (t *FindingLocation) MergeSourceLocation(v SourceLocation) error
MergeSourceLocation performs a merge with any union data inside the FindingLocation, using the provided SourceLocation
func (*FindingLocation) UnmarshalJSON ¶
func (t *FindingLocation) UnmarshalJSON(b []byte) error
func (FindingLocation) ValueByDiscriminator ¶
func (t FindingLocation) ValueByDiscriminator() (interface{}, error)
type FindingSummary ¶
type FindingSummary struct {
// Count Total count of findings.
Count uint32 `json:"count"`
// CountBy Counts of findings grouped by various finding attributes.
//
// The outer record is keyed by finding attribute name. The value is a record
// keyed by distinct values of this attribute, whose value is the number of
// findings with a distinct value.
CountBy *map[string]map[string]uint32 `json:"count_by,omitempty"`
}
FindingSummary Summary of findings found by the Test.
type FindingType ¶
type FindingType string
FindingType Type of Finding which was discovered.
const ( FindingTypeDast FindingType = "dast" FindingTypeOther FindingType = "other" FindingTypeSast FindingType = "sast" FindingTypeSca FindingType = "sca" )
Defines values for FindingType.
type GetAPIVersionResponse ¶
type GetAPIVersionResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
ApplicationvndApiJSON400 *N400
ApplicationvndApiJSON401 *N401
ApplicationvndApiJSON404 *N404
ApplicationvndApiJSON500 *N500
}
func ParseGetAPIVersionResponse ¶
func ParseGetAPIVersionResponse(rsp *http.Response) (*GetAPIVersionResponse, error)
ParseGetAPIVersionResponse parses an HTTP response from a GetAPIVersionWithResponse call
func (GetAPIVersionResponse) Status ¶
func (r GetAPIVersionResponse) Status() string
Status returns HTTPResponse.Status
func (GetAPIVersionResponse) StatusCode ¶
func (r GetAPIVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetJobParams ¶
type GetJobParams 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"`
}
GetJobParams defines parameters for GetJob.
type GetJobResponse ¶
type GetJobResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *struct {
// Data JobData represents a Job resource object.
Data JobData `json:"data"`
Jsonapi IoSnykApiCommonJsonApi `json:"jsonapi"`
Links GetJob_200_Links `json:"links"`
// Meta Free-form object that may contain non-standard information.
Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
}
ApplicationvndApiJSON303 *struct {
// Data JobData represents a Job resource object.
Data JobData `json:"data"`
Jsonapi IoSnykApiCommonJsonApi `json:"jsonapi"`
Links GetJob_303_Links `json:"links"`
// Meta Free-form object that may contain non-standard information.
Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
}
ApplicationvndApiJSON400 *IoSnykApiCommonErrorDocument
}
func ParseGetJobResponse ¶
func ParseGetJobResponse(rsp *http.Response) (*GetJobResponse, error)
ParseGetJobResponse parses an HTTP response from a GetJobWithResponse call
func (GetJobResponse) Status ¶
func (r GetJobResponse) Status() string
Status returns HTTPResponse.Status
func (GetJobResponse) StatusCode ¶
func (r GetJobResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetJob_200_Links ¶
type GetJob_200_Links struct {
Related *IoSnykApiCommonLinkProperty `json:"related,omitempty"`
Self *IoSnykApiCommonLinkProperty `json:"self,omitempty"`
AdditionalProperties map[string]IoSnykApiCommonLinkProperty `json:"-"`
}
type GetJob_303_Links ¶
type GetJob_303_Links struct {
Related *IoSnykApiCommonLinkProperty `json:"related,omitempty"`
Self *IoSnykApiCommonLinkProperty `json:"self,omitempty"`
AdditionalProperties map[string]IoSnykApiCommonLinkProperty `json:"-"`
}
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 GetTestResponse ¶
type GetTestResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *struct {
// Data TestData represents a Test resource object.
Data TestData `json:"data"`
Jsonapi IoSnykApiCommonJsonApi `json:"jsonapi"`
Links GetTest_200_Links `json:"links"`
// Meta Free-form object that may contain non-standard information.
Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
}
ApplicationvndApiJSON400 *IoSnykApiCommonErrorDocument
}
func ParseGetTestResponse ¶
func ParseGetTestResponse(rsp *http.Response) (*GetTestResponse, error)
ParseGetTestResponse parses an HTTP response from a GetTestWithResponse call
func (GetTestResponse) Status ¶
func (r GetTestResponse) Status() string
Status returns HTTPResponse.Status
func (GetTestResponse) StatusCode ¶
func (r GetTestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTest_200_Links ¶
type GetTest_200_Links struct {
Related *IoSnykApiCommonLinkProperty `json:"related,omitempty"`
Self *IoSnykApiCommonLinkProperty `json:"self,omitempty"`
AdditionalProperties map[string]IoSnykApiCommonLinkProperty `json:"-"`
}
type GitUrlCoordinatesSubject ¶
type GitUrlCoordinatesSubject struct {
// CommitId Commit ID of the Git commit from which content will be retrieved for the
// test.
CommitId string `json:"commit_id"`
// IntegrationId Integration used to access the Git SCM repository in order to retrieve its source contents.
IntegrationId openapi_types.UUID `json:"integration_id"`
// Locator Locate the SCM repository from which content will be retrieved for the
// test.
Locator ScmRepoLocator `json:"locator"`
Type GitUrlCoordinatesSubjectType `json:"type"`
}
GitUrlCoordinatesSubject Test subject representing a source tree located in a Git repository that has a Snyk SCM integration.
type GitUrlCoordinatesSubjectType ¶
type GitUrlCoordinatesSubjectType string
GitUrlCoordinatesSubjectType defines model for GitUrlCoordinatesSubject.Type.
const (
GitUrlCoordinates GitUrlCoordinatesSubjectType = "git_url_coordinates"
)
Defines values for GitUrlCoordinatesSubjectType.
type GithubSecurityAdvisoryProblem ¶
type GithubSecurityAdvisoryProblem struct {
Id string `json:"id"`
Source GithubSecurityAdvisoryProblemSource `json:"source"`
}
GithubSecurityAdvisoryProblem Github Security Advisory associated with this finding.
type GithubSecurityAdvisoryProblemSource ¶
type GithubSecurityAdvisoryProblemSource string
GithubSecurityAdvisoryProblemSource defines model for GithubSecurityAdvisoryProblem.Source.
const (
Ghsa GithubSecurityAdvisoryProblemSource = "ghsa"
)
Defines values for GithubSecurityAdvisoryProblemSource.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
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 ¶
type IoSnykApiCommonErrorLink struct {
About *IoSnykApiCommonLinkProperty `json:"about,omitempty"`
AdditionalProperties map[string]IoSnykApiCommonLinkProperty `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 IoSnykApiCommonLinkProperty, 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 IoSnykApiCommonLinkProperty)
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 IoSnykApiCommonLinkProperty ¶
type IoSnykApiCommonLinkProperty struct {
// contains filtered or unexported fields
}
IoSnykApiCommonLinkProperty defines model for io.snyk.api.common.LinkProperty.
func (IoSnykApiCommonLinkProperty) AsIoSnykApiCommonLinkObject ¶
func (t IoSnykApiCommonLinkProperty) AsIoSnykApiCommonLinkObject() (IoSnykApiCommonLinkObject, error)
AsIoSnykApiCommonLinkObject returns the union data inside the IoSnykApiCommonLinkProperty as a IoSnykApiCommonLinkObject
func (IoSnykApiCommonLinkProperty) AsIoSnykApiCommonLinkString ¶
func (t IoSnykApiCommonLinkProperty) AsIoSnykApiCommonLinkString() (IoSnykApiCommonLinkString, error)
AsIoSnykApiCommonLinkString returns the union data inside the IoSnykApiCommonLinkProperty as a IoSnykApiCommonLinkString
func (*IoSnykApiCommonLinkProperty) FromIoSnykApiCommonLinkObject ¶
func (t *IoSnykApiCommonLinkProperty) FromIoSnykApiCommonLinkObject(v IoSnykApiCommonLinkObject) error
FromIoSnykApiCommonLinkObject overwrites any union data inside the IoSnykApiCommonLinkProperty as the provided IoSnykApiCommonLinkObject
func (*IoSnykApiCommonLinkProperty) FromIoSnykApiCommonLinkString ¶
func (t *IoSnykApiCommonLinkProperty) FromIoSnykApiCommonLinkString(v IoSnykApiCommonLinkString) error
FromIoSnykApiCommonLinkString overwrites any union data inside the IoSnykApiCommonLinkProperty as the provided IoSnykApiCommonLinkString
func (IoSnykApiCommonLinkProperty) MarshalJSON ¶
func (t IoSnykApiCommonLinkProperty) MarshalJSON() ([]byte, error)
func (*IoSnykApiCommonLinkProperty) MergeIoSnykApiCommonLinkObject ¶
func (t *IoSnykApiCommonLinkProperty) MergeIoSnykApiCommonLinkObject(v IoSnykApiCommonLinkObject) error
MergeIoSnykApiCommonLinkObject performs a merge with any union data inside the IoSnykApiCommonLinkProperty, using the provided IoSnykApiCommonLinkObject
func (*IoSnykApiCommonLinkProperty) MergeIoSnykApiCommonLinkString ¶
func (t *IoSnykApiCommonLinkProperty) MergeIoSnykApiCommonLinkString(v IoSnykApiCommonLinkString) error
MergeIoSnykApiCommonLinkString performs a merge with any union data inside the IoSnykApiCommonLinkProperty, using the provided IoSnykApiCommonLinkString
func (*IoSnykApiCommonLinkProperty) UnmarshalJSON ¶
func (t *IoSnykApiCommonLinkProperty) UnmarshalJSON(b []byte) error
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 ¶
type IoSnykApiCommonPaginatedLinks struct {
First *IoSnykApiCommonLinkProperty `json:"first,omitempty"`
Last *IoSnykApiCommonLinkProperty `json:"last,omitempty"`
Next *IoSnykApiCommonLinkProperty `json:"next,omitempty"`
Prev *IoSnykApiCommonLinkProperty `json:"prev,omitempty"`
Self *IoSnykApiCommonLinkProperty `json:"self,omitempty"`
}
IoSnykApiCommonPaginatedLinks defines model for io.snyk.api.common.PaginatedLinks.
type IoSnykApiCommonRelatedLink ¶
type IoSnykApiCommonRelatedLink struct {
Related *IoSnykApiCommonLinkProperty `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.interaction_id.
type IoSnykApiRequestSnykApiRequestRequestId ¶
type IoSnykApiRequestSnykApiRequestRequestId = openapi_types.UUID
IoSnykApiRequestSnykApiRequestRequestId defines model for io.snyk.api.request.SnykApiRequest.request_id.
type IoSnykApiRequestSnykApiRequestVersion ¶
type IoSnykApiRequestSnykApiRequestVersion = string
IoSnykApiRequestSnykApiRequestVersion defines model for io.snyk.api.request.SnykApiRequest.version.
type IoSnykApiV1testdepgraphRequestDepGraph ¶
type IoSnykApiV1testdepgraphRequestDepGraph struct {
Graph IoSnykApiV1testdepgraphRequestGraph `json:"graph"`
PkgManager IoSnykApiV1testdepgraphRequestPackageManager `json:"pkgManager"`
Pkgs []IoSnykApiV1testdepgraphRequestPackage `json:"pkgs"`
SchemaVersion string `json:"schemaVersion"`
AdditionalProperties map[string]interface{} `json:"-"`
}
IoSnykApiV1testdepgraphRequestDepGraph defines model for io.snyk.api.v1testdepgraph.request.DepGraph.
func (IoSnykApiV1testdepgraphRequestDepGraph) Get ¶
func (a IoSnykApiV1testdepgraphRequestDepGraph) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for IoSnykApiV1testdepgraphRequestDepGraph. Returns the specified element and whether it was found
func (IoSnykApiV1testdepgraphRequestDepGraph) MarshalJSON ¶
func (a IoSnykApiV1testdepgraphRequestDepGraph) MarshalJSON() ([]byte, error)
Override default JSON handling for IoSnykApiV1testdepgraphRequestDepGraph to handle AdditionalProperties
func (*IoSnykApiV1testdepgraphRequestDepGraph) Set ¶
func (a *IoSnykApiV1testdepgraphRequestDepGraph) Set(fieldName string, value interface{})
Setter for additional properties for IoSnykApiV1testdepgraphRequestDepGraph
func (*IoSnykApiV1testdepgraphRequestDepGraph) UnmarshalJSON ¶
func (a *IoSnykApiV1testdepgraphRequestDepGraph) UnmarshalJSON(b []byte) error
Override default JSON handling for IoSnykApiV1testdepgraphRequestDepGraph to handle AdditionalProperties
type IoSnykApiV1testdepgraphRequestGraph ¶
type IoSnykApiV1testdepgraphRequestGraph struct {
Nodes []IoSnykApiV1testdepgraphRequestNode `json:"nodes"`
RootNodeId string `json:"rootNodeId"`
AdditionalProperties map[string]interface{} `json:"-"`
}
IoSnykApiV1testdepgraphRequestGraph defines model for io.snyk.api.v1testdepgraph.request.Graph.
func (IoSnykApiV1testdepgraphRequestGraph) Get ¶
func (a IoSnykApiV1testdepgraphRequestGraph) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for IoSnykApiV1testdepgraphRequestGraph. Returns the specified element and whether it was found
func (IoSnykApiV1testdepgraphRequestGraph) MarshalJSON ¶
func (a IoSnykApiV1testdepgraphRequestGraph) MarshalJSON() ([]byte, error)
Override default JSON handling for IoSnykApiV1testdepgraphRequestGraph to handle AdditionalProperties
func (*IoSnykApiV1testdepgraphRequestGraph) Set ¶
func (a *IoSnykApiV1testdepgraphRequestGraph) Set(fieldName string, value interface{})
Setter for additional properties for IoSnykApiV1testdepgraphRequestGraph
func (*IoSnykApiV1testdepgraphRequestGraph) UnmarshalJSON ¶
func (a *IoSnykApiV1testdepgraphRequestGraph) UnmarshalJSON(b []byte) error
Override default JSON handling for IoSnykApiV1testdepgraphRequestGraph to handle AdditionalProperties
type IoSnykApiV1testdepgraphRequestNode ¶
type IoSnykApiV1testdepgraphRequestNode struct {
Deps []IoSnykApiV1testdepgraphRequestNodeRef `json:"deps"`
NodeId string `json:"nodeId"`
PkgId string `json:"pkgId"`
AdditionalProperties map[string]interface{} `json:"-"`
}
IoSnykApiV1testdepgraphRequestNode defines model for io.snyk.api.v1testdepgraph.request.Node.
func (IoSnykApiV1testdepgraphRequestNode) Get ¶
func (a IoSnykApiV1testdepgraphRequestNode) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for IoSnykApiV1testdepgraphRequestNode. Returns the specified element and whether it was found
func (IoSnykApiV1testdepgraphRequestNode) MarshalJSON ¶
func (a IoSnykApiV1testdepgraphRequestNode) MarshalJSON() ([]byte, error)
Override default JSON handling for IoSnykApiV1testdepgraphRequestNode to handle AdditionalProperties
func (*IoSnykApiV1testdepgraphRequestNode) Set ¶
func (a *IoSnykApiV1testdepgraphRequestNode) Set(fieldName string, value interface{})
Setter for additional properties for IoSnykApiV1testdepgraphRequestNode
func (*IoSnykApiV1testdepgraphRequestNode) UnmarshalJSON ¶
func (a *IoSnykApiV1testdepgraphRequestNode) UnmarshalJSON(b []byte) error
Override default JSON handling for IoSnykApiV1testdepgraphRequestNode to handle AdditionalProperties
type IoSnykApiV1testdepgraphRequestNodeRef ¶
type IoSnykApiV1testdepgraphRequestNodeRef struct {
NodeId string `json:"nodeId"`
AdditionalProperties map[string]interface{} `json:"-"`
}
IoSnykApiV1testdepgraphRequestNodeRef defines model for io.snyk.api.v1testdepgraph.request.NodeRef.
func (IoSnykApiV1testdepgraphRequestNodeRef) Get ¶
func (a IoSnykApiV1testdepgraphRequestNodeRef) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for IoSnykApiV1testdepgraphRequestNodeRef. Returns the specified element and whether it was found
func (IoSnykApiV1testdepgraphRequestNodeRef) MarshalJSON ¶
func (a IoSnykApiV1testdepgraphRequestNodeRef) MarshalJSON() ([]byte, error)
Override default JSON handling for IoSnykApiV1testdepgraphRequestNodeRef to handle AdditionalProperties
func (*IoSnykApiV1testdepgraphRequestNodeRef) Set ¶
func (a *IoSnykApiV1testdepgraphRequestNodeRef) Set(fieldName string, value interface{})
Setter for additional properties for IoSnykApiV1testdepgraphRequestNodeRef
func (*IoSnykApiV1testdepgraphRequestNodeRef) UnmarshalJSON ¶
func (a *IoSnykApiV1testdepgraphRequestNodeRef) UnmarshalJSON(b []byte) error
Override default JSON handling for IoSnykApiV1testdepgraphRequestNodeRef to handle AdditionalProperties
type IoSnykApiV1testdepgraphRequestPackage ¶
type IoSnykApiV1testdepgraphRequestPackage struct {
Id string `json:"id"`
Info IoSnykApiV1testdepgraphRequestPackageInfo `json:"info"`
AdditionalProperties map[string]interface{} `json:"-"`
}
IoSnykApiV1testdepgraphRequestPackage defines model for io.snyk.api.v1testdepgraph.request.Package.
func (IoSnykApiV1testdepgraphRequestPackage) Get ¶
func (a IoSnykApiV1testdepgraphRequestPackage) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for IoSnykApiV1testdepgraphRequestPackage. Returns the specified element and whether it was found
func (IoSnykApiV1testdepgraphRequestPackage) MarshalJSON ¶
func (a IoSnykApiV1testdepgraphRequestPackage) MarshalJSON() ([]byte, error)
Override default JSON handling for IoSnykApiV1testdepgraphRequestPackage to handle AdditionalProperties
func (*IoSnykApiV1testdepgraphRequestPackage) Set ¶
func (a *IoSnykApiV1testdepgraphRequestPackage) Set(fieldName string, value interface{})
Setter for additional properties for IoSnykApiV1testdepgraphRequestPackage
func (*IoSnykApiV1testdepgraphRequestPackage) UnmarshalJSON ¶
func (a *IoSnykApiV1testdepgraphRequestPackage) UnmarshalJSON(b []byte) error
Override default JSON handling for IoSnykApiV1testdepgraphRequestPackage to handle AdditionalProperties
type IoSnykApiV1testdepgraphRequestPackageInfo ¶
type IoSnykApiV1testdepgraphRequestPackageInfo struct {
Name string `json:"name"`
Version string `json:"version"`
AdditionalProperties map[string]interface{} `json:"-"`
}
IoSnykApiV1testdepgraphRequestPackageInfo defines model for io.snyk.api.v1testdepgraph.request.PackageInfo.
func (IoSnykApiV1testdepgraphRequestPackageInfo) Get ¶
func (a IoSnykApiV1testdepgraphRequestPackageInfo) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for IoSnykApiV1testdepgraphRequestPackageInfo. Returns the specified element and whether it was found
func (IoSnykApiV1testdepgraphRequestPackageInfo) MarshalJSON ¶
func (a IoSnykApiV1testdepgraphRequestPackageInfo) MarshalJSON() ([]byte, error)
Override default JSON handling for IoSnykApiV1testdepgraphRequestPackageInfo to handle AdditionalProperties
func (*IoSnykApiV1testdepgraphRequestPackageInfo) Set ¶
func (a *IoSnykApiV1testdepgraphRequestPackageInfo) Set(fieldName string, value interface{})
Setter for additional properties for IoSnykApiV1testdepgraphRequestPackageInfo
func (*IoSnykApiV1testdepgraphRequestPackageInfo) UnmarshalJSON ¶
func (a *IoSnykApiV1testdepgraphRequestPackageInfo) UnmarshalJSON(b []byte) error
Override default JSON handling for IoSnykApiV1testdepgraphRequestPackageInfo to handle AdditionalProperties
type IoSnykApiV1testdepgraphRequestPackageManager ¶
type IoSnykApiV1testdepgraphRequestPackageManager struct {
Name string `json:"name"`
AdditionalProperties map[string]interface{} `json:"-"`
}
IoSnykApiV1testdepgraphRequestPackageManager defines model for io.snyk.api.v1testdepgraph.request.PackageManager.
func (IoSnykApiV1testdepgraphRequestPackageManager) Get ¶
func (a IoSnykApiV1testdepgraphRequestPackageManager) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for IoSnykApiV1testdepgraphRequestPackageManager. Returns the specified element and whether it was found
func (IoSnykApiV1testdepgraphRequestPackageManager) MarshalJSON ¶
func (a IoSnykApiV1testdepgraphRequestPackageManager) MarshalJSON() ([]byte, error)
Override default JSON handling for IoSnykApiV1testdepgraphRequestPackageManager to handle AdditionalProperties
func (*IoSnykApiV1testdepgraphRequestPackageManager) Set ¶
func (a *IoSnykApiV1testdepgraphRequestPackageManager) Set(fieldName string, value interface{})
Setter for additional properties for IoSnykApiV1testdepgraphRequestPackageManager
func (*IoSnykApiV1testdepgraphRequestPackageManager) UnmarshalJSON ¶
func (a *IoSnykApiV1testdepgraphRequestPackageManager) UnmarshalJSON(b []byte) error
Override default JSON handling for IoSnykApiV1testdepgraphRequestPackageManager to handle AdditionalProperties
type JobAttributes ¶
type JobAttributes struct {
// CreatedAt Creation time of the job resource
CreatedAt time.Time `json:"created_at"`
// Status State of the test, whether it is pending, running, complete or errored.
Status TestExecutionStates `json:"status"`
}
JobAttributes JobAttributes represents the attributes of a Job resource
type JobData ¶
type JobData struct {
// Attributes JobAttributes represents the attributes of a Job resource
Attributes JobAttributes `json:"attributes"`
Id openapi_types.UUID `json:"id"`
Relationships *JobRelationships `json:"relationships,omitempty"`
Type JobDataType `json:"type"`
}
JobData JobData represents a Job resource object.
type JobDataType ¶
type JobDataType string
JobDataType defines model for JobData.Type.
const (
TestJobs JobDataType = "test_jobs"
)
Defines values for JobDataType.
type JobRelationshipField ¶
type JobRelationshipField struct {
Data struct {
Id openapi_types.UUID `json:"id"`
Type JobRelationshipFieldDataType `json:"type"`
} `json:"data"`
}
JobRelationshipField defines model for JobRelationshipField.
type JobRelationshipFieldDataType ¶
type JobRelationshipFieldDataType string
JobRelationshipFieldDataType defines model for JobRelationshipField.Data.Type.
const (
JobRelationshipFieldDataTypeTests JobRelationshipFieldDataType = "tests"
)
Defines values for JobRelationshipFieldDataType.
type JobRelationships ¶
type JobRelationships struct {
Test JobRelationshipField `json:"test"`
}
JobRelationships defines model for JobRelationships.
type JsonApi ¶
type JsonApi struct {
// Version Version of the JSON API specification this server supports.
Version string `json:"version"`
}
JsonApi defines model for JsonApi.
type LinkProperty ¶
type LinkProperty struct {
// contains filtered or unexported fields
}
LinkProperty defines model for LinkProperty.
func (LinkProperty) AsLinkProperty0 ¶
func (t LinkProperty) AsLinkProperty0() (LinkProperty0, error)
AsLinkProperty0 returns the union data inside the LinkProperty as a LinkProperty0
func (LinkProperty) AsLinkProperty1 ¶
func (t LinkProperty) AsLinkProperty1() (LinkProperty1, error)
AsLinkProperty1 returns the union data inside the LinkProperty as a LinkProperty1
func (*LinkProperty) FromLinkProperty0 ¶
func (t *LinkProperty) FromLinkProperty0(v LinkProperty0) error
FromLinkProperty0 overwrites any union data inside the LinkProperty as the provided LinkProperty0
func (*LinkProperty) FromLinkProperty1 ¶
func (t *LinkProperty) FromLinkProperty1(v LinkProperty1) error
FromLinkProperty1 overwrites any union data inside the LinkProperty as the provided LinkProperty1
func (LinkProperty) MarshalJSON ¶
func (t LinkProperty) MarshalJSON() ([]byte, error)
func (*LinkProperty) MergeLinkProperty0 ¶
func (t *LinkProperty) MergeLinkProperty0(v LinkProperty0) error
MergeLinkProperty0 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty0
func (*LinkProperty) MergeLinkProperty1 ¶
func (t *LinkProperty) MergeLinkProperty1(v LinkProperty1) error
MergeLinkProperty1 performs a merge with any union data inside the LinkProperty, using the provided LinkProperty1
func (*LinkProperty) UnmarshalJSON ¶
func (t *LinkProperty) UnmarshalJSON(b []byte) error
type LinkProperty1 ¶
type LinkProperty1 struct {
// Href A string containing the link’s URL.
Href string `json:"href"`
// Meta Free-form object that may contain non-standard information.
Meta *Meta `json:"meta,omitempty"`
}
LinkProperty1 defines model for .
type ListAPIVersionsResponse ¶
type ListAPIVersionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]string
ApplicationvndApiJSON400 *N400
ApplicationvndApiJSON401 *N401
ApplicationvndApiJSON404 *N404
ApplicationvndApiJSON500 *N500
}
func ParseListAPIVersionsResponse ¶
func ParseListAPIVersionsResponse(rsp *http.Response) (*ListAPIVersionsResponse, error)
ParseListAPIVersionsResponse parses an HTTP response from a ListAPIVersionsWithResponse call
func (ListAPIVersionsResponse) Status ¶
func (r ListAPIVersionsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAPIVersionsResponse) StatusCode ¶
func (r ListAPIVersionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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 ListFindingsResponse ¶
type ListFindingsResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationvndApiJSON200 *struct {
Data []FindingData `json:"data"`
Jsonapi IoSnykApiCommonJsonApi `json:"jsonapi"`
Links IoSnykApiCommonPaginatedLinks `json:"links"`
// Meta Free-form object that may contain non-standard information.
Meta *IoSnykApiCommonMeta `json:"meta,omitempty"`
}
ApplicationvndApiJSON400 *IoSnykApiCommonErrorDocument
}
func ParseListFindingsResponse ¶
func ParseListFindingsResponse(rsp *http.Response) (*ListFindingsResponse, error)
ParseListFindingsResponse parses an HTTP response from a ListFindingsWithResponse call
func (ListFindingsResponse) Status ¶
func (r ListFindingsResponse) Status() string
Status returns HTTPResponse.Status
func (ListFindingsResponse) StatusCode ¶
func (r ListFindingsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type LocalPathLocator ¶
type LocalPathLocator struct {
// Paths Local file paths.
Paths []string `json:"paths"`
Type LocalPathLocatorType `json:"type"`
}
LocalPathLocator LocalPathLocator locates a test subject by local file paths, relative to the working copy top-level directory of the source code.
type LocalPathLocatorType ¶
type LocalPathLocatorType string
LocalPathLocatorType defines model for LocalPathLocator.Type.
const (
LocalPath LocalPathLocatorType = "local_path"
)
Defines values for LocalPathLocatorType.
type LocalPolicy ¶
type LocalPolicy struct {
// FailOnUpgradable Use to fail a test when there is at least one vulnerable finding that can be fixed by upgrading the version of the related
// dependency. E.g. bumping lodash from 1.1.1 to 1.1.2.
FailOnUpgradable *bool `json:"fail_on_upgradable,omitempty"`
// RiskScoreThreshold Findings of equal or greater risk score will fail the test.
RiskScoreThreshold *uint16 `json:"risk_score_threshold,omitempty"`
// SeverityThreshold Findings of equal or greater severity will fail the test.
SeverityThreshold *Severity `json:"severity_threshold,omitempty"`
// SuppressPendingIgnores Suppress ignores pending approval, so that they do not fail the test. If
// allowed by administrators, this might be set in developer workflows in
// order to unblock local development while an ignore is pending approval.
SuppressPendingIgnores bool `json:"suppress_pending_ignores"`
}
LocalPolicy Locally configured policy options for determining outcome of this specific test.
type ManagedPolicyRef ¶
type ManagedPolicyRef struct {
Id Uuid `json:"id"`
}
ManagedPolicyRef Reference to a managed policy.
type Meta ¶
type Meta map[string]interface{}
Meta Free-form object that may contain non-standard information.
type OtherEvidence ¶
type OtherEvidence struct {
Source OtherEvidenceSource `json:"source"`
}
OtherEvidence Evidence which this API version is not capable of expressing.
More information may be available in a newer version of this API.
type OtherEvidenceSource ¶
type OtherEvidenceSource string
OtherEvidenceSource defines model for OtherEvidence.Source.
const (
OtherEvidenceSourceOther OtherEvidenceSource = "other"
)
Defines values for OtherEvidenceSource.
type OtherLocation ¶
type OtherLocation struct {
Type OtherLocationType `json:"type"`
}
OtherLocation Finding locations which this API version is not capable of expressing.
This location may be available in a newer version of this API.
type OtherLocationType ¶
type OtherLocationType string
OtherLocationType defines model for OtherLocation.Type.
const (
OtherLocationTypeOther OtherLocationType = "other"
)
Defines values for OtherLocationType.
type OtherLocator ¶
type OtherLocator struct {
Type OtherLocatorType `json:"type"`
}
OtherLocator OtherLocator represents any locator that this version of the API is not capable of expressing.
type OtherLocatorType ¶
type OtherLocatorType string
OtherLocatorType defines model for OtherLocator.Type.
const (
OtherLocatorTypeOther OtherLocatorType = "other"
)
Defines values for OtherLocatorType.
type OtherProblem ¶
type OtherProblem struct {
Source OtherProblemSource `json:"source"`
}
OtherProblem Problem which this API version is not capable of expressing.
This problem may be available in a newer version of this API.
type OtherProblemSource ¶
type OtherProblemSource string
OtherProblemSource defines model for OtherProblem.Source.
const (
OtherProblemSourceOther OtherProblemSource = "other"
)
Defines values for OtherProblemSource.
type OtherSubject ¶
type OtherSubject struct {
Type OtherSubjectType `json:"type"`
}
OtherSubject OtherSubject represents any subject that this version of the API is not capable of expressing.
type OtherSubjectType ¶
type OtherSubjectType string
OtherSubjectType defines model for OtherSubject.Type.
const (
OtherSubjectTypeOther OtherSubjectType = "other"
)
Defines values for OtherSubjectType.
type Package ¶
type Package struct {
// Name Name is the name of the package.
Name string `json:"name"`
// Version Version is the version of the named package.
Version string `json:"version"`
}
Package Dependency models a package dependency.
type PackageLocation ¶
type PackageLocation struct {
// Package Dependency models a package dependency.
Package Package `json:"package"`
Type PackageLocationType `json:"type"`
}
PackageLocation Package dependency version.
Finding type: SCA
type PackageLocationType ¶
type PackageLocationType string
PackageLocationType defines model for PackageLocation.Type.
const (
PackageLocationTypePackage PackageLocationType = "package"
)
Defines values for PackageLocationType.
type PolicyModification ¶
type PolicyModification struct {
// Pointer A JSON Pointer (RFC 6901) reference to the modified value, relative to
// the top-level attributes of the same Finding.
Pointer string `json:"pointer"`
// Policy Policy which modified the finding, if available.
Policy *PolicyRef `json:"policy,omitempty"`
// Prior The prior value at the referenced pointer.
Prior *interface{} `json:"prior,omitempty"`
// Reason A human-readable explanation for why the value was modified.
Reason string `json:"reason"`
}
PolicyModification Prior attribute values and the reason they were modified.
type PolicyRef ¶
type PolicyRef struct {
// contains filtered or unexported fields
}
PolicyRef Reference to a single policy.
func (PolicyRef) AsManagedPolicyRef ¶
func (t PolicyRef) AsManagedPolicyRef() (ManagedPolicyRef, error)
AsManagedPolicyRef returns the union data inside the PolicyRef as a ManagedPolicyRef
func (PolicyRef) AsPolicyRef0 ¶
func (t PolicyRef) AsPolicyRef0() (PolicyRef0, error)
AsPolicyRef0 returns the union data inside the PolicyRef as a PolicyRef0
func (*PolicyRef) FromManagedPolicyRef ¶
func (t *PolicyRef) FromManagedPolicyRef(v ManagedPolicyRef) error
FromManagedPolicyRef overwrites any union data inside the PolicyRef as the provided ManagedPolicyRef
func (*PolicyRef) FromPolicyRef0 ¶
func (t *PolicyRef) FromPolicyRef0(v PolicyRef0) error
FromPolicyRef0 overwrites any union data inside the PolicyRef as the provided PolicyRef0
func (PolicyRef) MarshalJSON ¶
func (*PolicyRef) MergeManagedPolicyRef ¶
func (t *PolicyRef) MergeManagedPolicyRef(v ManagedPolicyRef) error
MergeManagedPolicyRef performs a merge with any union data inside the PolicyRef, using the provided ManagedPolicyRef
func (*PolicyRef) MergePolicyRef0 ¶
func (t *PolicyRef) MergePolicyRef0(v PolicyRef0) error
MergePolicyRef0 performs a merge with any union data inside the PolicyRef, using the provided PolicyRef0
func (*PolicyRef) UnmarshalJSON ¶
type PolicyRef0 ¶
type PolicyRef0 string
PolicyRef0 defines model for PolicyRef.0.
const (
PolicyRef0LocalPolicy PolicyRef0 = "local_policy"
)
Defines values for PolicyRef0.
type PolicyRefSet ¶
type PolicyRefSet struct {
Ids []Uuid `json:"ids"`
LocalPolicy *bool `json:"local_policy,omitempty"`
}
PolicyRefSet A set of local and/or managed policies.
type Problem ¶
type Problem struct {
// contains filtered or unexported fields
}
Problem Problems are representative of the finding in other security domains and systems with a well-known identifier.
More detailed attributes for the problem may be included, especially when this information is not yet readily available in a relatable public API.
Problems are defined in industry standard taxonomies such as: - MITRE's Common Weakness Enumeration (CWE) - Common Vulnerability Exposures (CVE)
Snyk systems also define problems, such as: - Code SAST rules - VulnDB vulnerabilities - Software licenses
func (Problem) AsCveProblem ¶
func (t Problem) AsCveProblem() (CveProblem, error)
AsCveProblem returns the union data inside the Problem as a CveProblem
func (Problem) AsCweProblem ¶
func (t Problem) AsCweProblem() (CweProblem, error)
AsCweProblem returns the union data inside the Problem as a CweProblem
func (Problem) AsGithubSecurityAdvisoryProblem ¶
func (t Problem) AsGithubSecurityAdvisoryProblem() (GithubSecurityAdvisoryProblem, error)
AsGithubSecurityAdvisoryProblem returns the union data inside the Problem as a GithubSecurityAdvisoryProblem
func (Problem) AsOtherProblem ¶
func (t Problem) AsOtherProblem() (OtherProblem, error)
AsOtherProblem returns the union data inside the Problem as a OtherProblem
func (Problem) AsSnykCloudRuleProblem ¶
func (t Problem) AsSnykCloudRuleProblem() (SnykCloudRuleProblem, error)
AsSnykCloudRuleProblem returns the union data inside the Problem as a SnykCloudRuleProblem
func (Problem) AsSnykCodeRuleProblem ¶
func (t Problem) AsSnykCodeRuleProblem() (SnykCodeRuleProblem, error)
AsSnykCodeRuleProblem returns the union data inside the Problem as a SnykCodeRuleProblem
func (Problem) AsSnykLicenseProblem ¶
func (t Problem) AsSnykLicenseProblem() (SnykLicenseProblem, error)
AsSnykLicenseProblem returns the union data inside the Problem as a SnykLicenseProblem
func (Problem) AsSnykVulnProblem ¶
func (t Problem) AsSnykVulnProblem() (SnykVulnProblem, error)
AsSnykVulnProblem returns the union data inside the Problem as a SnykVulnProblem
func (Problem) Discriminator ¶
func (*Problem) FromCveProblem ¶
func (t *Problem) FromCveProblem(v CveProblem) error
FromCveProblem overwrites any union data inside the Problem as the provided CveProblem
func (*Problem) FromCweProblem ¶
func (t *Problem) FromCweProblem(v CweProblem) error
FromCweProblem overwrites any union data inside the Problem as the provided CweProblem
func (*Problem) FromGithubSecurityAdvisoryProblem ¶
func (t *Problem) FromGithubSecurityAdvisoryProblem(v GithubSecurityAdvisoryProblem) error
FromGithubSecurityAdvisoryProblem overwrites any union data inside the Problem as the provided GithubSecurityAdvisoryProblem
func (*Problem) FromOtherProblem ¶
func (t *Problem) FromOtherProblem(v OtherProblem) error
FromOtherProblem overwrites any union data inside the Problem as the provided OtherProblem
func (*Problem) FromSnykCloudRuleProblem ¶
func (t *Problem) FromSnykCloudRuleProblem(v SnykCloudRuleProblem) error
FromSnykCloudRuleProblem overwrites any union data inside the Problem as the provided SnykCloudRuleProblem
func (*Problem) FromSnykCodeRuleProblem ¶
func (t *Problem) FromSnykCodeRuleProblem(v SnykCodeRuleProblem) error
FromSnykCodeRuleProblem overwrites any union data inside the Problem as the provided SnykCodeRuleProblem
func (*Problem) FromSnykLicenseProblem ¶
func (t *Problem) FromSnykLicenseProblem(v SnykLicenseProblem) error
FromSnykLicenseProblem overwrites any union data inside the Problem as the provided SnykLicenseProblem
func (*Problem) FromSnykVulnProblem ¶
func (t *Problem) FromSnykVulnProblem(v SnykVulnProblem) error
FromSnykVulnProblem overwrites any union data inside the Problem as the provided SnykVulnProblem
func (Problem) MarshalJSON ¶
func (*Problem) MergeCveProblem ¶
func (t *Problem) MergeCveProblem(v CveProblem) error
MergeCveProblem performs a merge with any union data inside the Problem, using the provided CveProblem
func (*Problem) MergeCweProblem ¶
func (t *Problem) MergeCweProblem(v CweProblem) error
MergeCweProblem performs a merge with any union data inside the Problem, using the provided CweProblem
func (*Problem) MergeGithubSecurityAdvisoryProblem ¶
func (t *Problem) MergeGithubSecurityAdvisoryProblem(v GithubSecurityAdvisoryProblem) error
MergeGithubSecurityAdvisoryProblem performs a merge with any union data inside the Problem, using the provided GithubSecurityAdvisoryProblem
func (*Problem) MergeOtherProblem ¶
func (t *Problem) MergeOtherProblem(v OtherProblem) error
MergeOtherProblem performs a merge with any union data inside the Problem, using the provided OtherProblem
func (*Problem) MergeSnykCloudRuleProblem ¶
func (t *Problem) MergeSnykCloudRuleProblem(v SnykCloudRuleProblem) error
MergeSnykCloudRuleProblem performs a merge with any union data inside the Problem, using the provided SnykCloudRuleProblem
func (*Problem) MergeSnykCodeRuleProblem ¶
func (t *Problem) MergeSnykCodeRuleProblem(v SnykCodeRuleProblem) error
MergeSnykCodeRuleProblem performs a merge with any union data inside the Problem, using the provided SnykCodeRuleProblem
func (*Problem) MergeSnykLicenseProblem ¶
func (t *Problem) MergeSnykLicenseProblem(v SnykLicenseProblem) error
MergeSnykLicenseProblem performs a merge with any union data inside the Problem, using the provided SnykLicenseProblem
func (*Problem) MergeSnykVulnProblem ¶
func (t *Problem) MergeSnykVulnProblem(v SnykVulnProblem) error
MergeSnykVulnProblem performs a merge with any union data inside the Problem, using the provided SnykVulnProblem
func (*Problem) UnmarshalJSON ¶
func (Problem) ValueByDiscriminator ¶
type ProjectEntityLocator ¶
type ProjectEntityLocator struct {
// ProjectId Public ID of the Snyk Project.
ProjectId openapi_types.UUID `json:"project_id"`
Type ProjectEntityLocatorType `json:"type"`
}
ProjectEntityLocator ProjectEntityLocator locates a Snyk Project by its public ID.
type ProjectEntityLocatorType ¶
type ProjectEntityLocatorType string
ProjectEntityLocatorType defines model for ProjectEntityLocator.Type.
const (
ProjectEntity ProjectEntityLocatorType = "project_entity"
)
Defines values for ProjectEntityLocatorType.
type ProjectNameLocator ¶
type ProjectNameLocator struct {
// ProjectName Name of the Snyk Project.
ProjectName string `json:"project_name"`
// TargetReference Target reference which differentiates this project, for example, with a
// branch name or version. Projects having the same reference can be grouped
// based on that reference.
TargetReference *string `json:"target_reference,omitempty"`
Type ProjectNameLocatorType `json:"type"`
}
ProjectNameLocator ProjectNameLocator locates a Snyk Project by its name.
type ProjectNameLocatorType ¶
type ProjectNameLocatorType string
ProjectNameLocatorType defines model for ProjectNameLocator.Type.
const (
ProjectName ProjectNameLocatorType = "project_name"
)
Defines values for ProjectNameLocatorType.
type Rating ¶
type Rating struct {
// Severity Severity level of the finding.
Severity Severity `json:"severity"`
}
Rating Rating represents qualitative metrics on a finding.
type ReachabilityEvidence ¶
type ReachabilityEvidence struct {
// Paths Sequence of locations within this flow of execution.
//
// For example, a sequence of locations connecting the "source" location
// where input data is obtained, to a "sink" location where it is used.
Paths *[]ReachablePath `json:"paths,omitempty"`
// Reachability Reachability enum for reachability signal.
Reachability ReachabilityType `json:"reachability"`
Source ReachabilityEvidenceSource `json:"source"`
}
ReachabilityEvidence Indicate the reachability signals as additional evidence for the finding.
type ReachabilityEvidenceSource ¶
type ReachabilityEvidenceSource string
ReachabilityEvidenceSource defines model for ReachabilityEvidence.Source.
const (
Reachability ReachabilityEvidenceSource = "reachability"
)
Defines values for ReachabilityEvidenceSource.
type ReachabilityType ¶
type ReachabilityType string
ReachabilityType Reachability enum for reachability signal.
const ( ReachabilityTypeFunction ReachabilityType = "function" ReachabilityTypeNoInfo ReachabilityType = "no_info" ReachabilityTypeNone ReachabilityType = "none" ReachabilityTypeNotApplicable ReachabilityType = "not_applicable" )
Defines values for ReachabilityType.
type ReachablePath ¶
type ReachablePath struct {
// CallPaths Paths in code bundle that call the vulnerable function.
CallPaths []string `json:"call_paths"`
// FunctionName Vulnerable function name.
FunctionName string `json:"function_name"`
// Location Location in a file where the vulnerability can be found.
Location *FileRegion `json:"location,omitempty"`
}
ReachablePath ReachablePath represents the paths to a vulnerable function.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Risk ¶
type Risk struct {
// RiskScore Risk score assessment for the finding.
RiskScore *RiskScore `json:"risk_score,omitempty"`
}
Risk Risk represents Snyk's risk assessment of a finding.
type RiskScore ¶
type RiskScore struct {
Value uint16 `json:"value"`
}
RiskScore Risk score assigns a numeric metric based on various attributes of the finding and the risk context in which it was discovered.
type SbomReachabilitySubject ¶
type SbomReachabilitySubject struct {
// CodeBundleId Source code to inspect for the reach of the vulnerable dependencies.
CodeBundleId string `json:"code_bundle_id"`
// Locator Locate the local paths from which the SBOM and source code were derived.
Locator LocalPathLocator `json:"locator"`
// SbomBundleId The SBOM to test for vulnerable dependencies.
SbomBundleId string `json:"sbom_bundle_id"`
Type SbomReachabilitySubjectType `json:"type"`
}
SbomReachabilitySubject Test subject for SBOM test with reachability analysis.
type SbomReachabilitySubjectType ¶
type SbomReachabilitySubjectType string
SbomReachabilitySubjectType defines model for SbomReachabilitySubject.Type.
const (
SbomReachability SbomReachabilitySubjectType = "sbom_reachability"
)
Defines values for SbomReachabilitySubjectType.
type SbomSubject ¶
type SbomSubject struct {
// Locator Locate the local paths from which the SBOM and source code were derived.
Locator LocalPathLocator `json:"locator"`
// SbomBundleId The SBOM to test for vulnerable dependencies.
SbomBundleId string `json:"sbom_bundle_id"`
Type SbomSubjectType `json:"type"`
}
SbomSubject Test subject for SBOM test with reachability analysis.
type SbomSubjectType ¶
type SbomSubjectType string
SbomSubjectType defines model for SbomSubject.Type.
const (
Sbom SbomSubjectType = "sbom"
)
Defines values for SbomSubjectType.
type ScmRepoLocator ¶
type ScmRepoLocator struct {
// BranchName Branch name, if known and applicable to locating the test subject.
//
// If not specified, the branch name can be assumed to be the "default
// integration branch" of the repository.
BranchName *string `json:"branch_name,omitempty"`
Type ScmRepoLocatorType `json:"type"`
// Url URL of the SCM repository.
Url string `json:"url"`
}
ScmRepoLocator ScmRepoLocator locates a test subject by SCM repository coordinates.
type ScmRepoLocatorType ¶
type ScmRepoLocatorType string
ScmRepoLocatorType defines model for ScmRepoLocator.Type.
const (
ScmRepo ScmRepoLocatorType = "scm_repo"
)
Defines values for ScmRepoLocatorType.
type Severity ¶
type Severity string
Severity Indicate the severity of a finding discovered by a Test.
type SnykCloudRuleProblem ¶
type SnykCloudRuleProblem struct {
Id string `json:"id"`
Source SnykCloudRuleProblemSource `json:"source"`
}
SnykCloudRuleProblem Configuration policy violation from Snyk's Cloud Rules Database.
type SnykCloudRuleProblemSource ¶
type SnykCloudRuleProblemSource string
SnykCloudRuleProblemSource defines model for SnykCloudRuleProblem.Source.
const (
SnykCloudRule SnykCloudRuleProblemSource = "snyk_cloud_rule"
)
Defines values for SnykCloudRuleProblemSource.
type SnykCodeRuleProblem ¶
type SnykCodeRuleProblem struct {
// DefaultConfiguration Snyk Code rule configuration options.
DefaultConfiguration SnykcoderuleConfiguration `json:"default_configuration"`
// Help Represent a message string in multiple formats: plain text or markdown.
Help SnykcoderuleMultiformatMessageString `json:"help"`
Id string `json:"id"`
Name string `json:"name"`
// Properties Additional properties of a Snyk Code rule. Represented in SARIF as free-form
// metadata, but Snyk Code scanner outputs prescribe a specific structure for
// this content.
Properties SnykcoderuleProperties `json:"properties"`
// ShortDescription Represent a message string in multiple formats: plain text or markdown.
ShortDescription SnykcoderuleMultiformatMessageString `json:"short_description"`
Source SnykCodeRuleProblemSource `json:"source"`
}
SnykCodeRuleProblem Static code analysis rule, from the standard Snyk Code rule set.
type SnykCodeRuleProblemSource ¶
type SnykCodeRuleProblemSource string
SnykCodeRuleProblemSource defines model for SnykCodeRuleProblem.Source.
const (
SnykCodeRule SnykCodeRuleProblemSource = "snyk_code_rule"
)
Defines values for SnykCodeRuleProblemSource.
type SnykLicenseProblem ¶
type SnykLicenseProblem struct {
// AffectedHashRanges Range of commit hashes known to be affected by this problem.
//
// Generally used with package ecosystems which use Git SCM repositories for
// distribution.
AffectedHashRanges *[]string `json:"affected_hash_ranges,omitempty"`
// AffectedHashes List of specific commit hashes known to be affected by this problem.
AffectedHashes *[]string `json:"affected_hashes,omitempty"`
// AffectedVersions All the package versions which are affected by this problem. Expect this to
// be smaller than 0 ([,0] or <0.0.0 ) for vulnerabilities that have been
// revoked. Per ecosystem, the official package version guidelines are
// being used.
AffectedVersions *[]string `json:"affected_versions,omitempty"`
// CreatedAt Timestamp indicating when the problem was orginally created.
CreatedAt time.Time `json:"created_at"`
// Ecosystem Package ecosystem in which the package is distributed.
//
// This applies to private packages distributed with ecosystem tooling as well
// as those publicly distributed.
Ecosystem SnykvulndbPackageEcosystem `json:"ecosystem"`
Id string `json:"id"`
// License Software license identifier.
License string `json:"license"`
// PackageName Package name.
PackageName string `json:"package_name"`
// PackageVersion Package version.
PackageVersion string `json:"package_version"`
// PublishedAt Timestamp indicating when the problem was published.
PublishedAt time.Time `json:"published_at"`
// Severity The Snyk curated or recommended vulnerability severity for the problem.
Severity Severity `json:"severity"`
Source SnykLicenseProblemSource `json:"source"`
}
SnykLicenseProblem License from Snyk's Vulnerability Database.
A software license can be considered a problem when policy designates it as a business risk.
type SnykLicenseProblemSource ¶
type SnykLicenseProblemSource string
SnykLicenseProblemSource defines model for SnykLicenseProblem.Source.
const (
SnykLicense SnykLicenseProblemSource = "snyk_license"
)
Defines values for SnykLicenseProblemSource.
type SnykVulnProblem ¶
type SnykVulnProblem struct {
// AffectedHashRanges Range of commit hashes known to be affected by this problem.
//
// Generally used with package ecosystems which use Git SCM repositories for
// distribution.
AffectedHashRanges *[]string `json:"affected_hash_ranges,omitempty"`
// AffectedHashes List of specific commit hashes known to be affected by this problem.
AffectedHashes *[]string `json:"affected_hashes,omitempty"`
// AffectedVersions All the package versions which are affected by this problem. Expect this to
// be smaller than 0 ([,0] or <0.0.0 ) for vulnerabilities that have been
// revoked. Per ecosystem, the official package version guidelines are
// being used.
AffectedVersions *[]string `json:"affected_versions,omitempty"`
// CreatedAt Timestamp indicating when the problem was orginally created.
CreatedAt time.Time `json:"created_at"`
// Credits Discoverer / Reporter of the vulnerability.
Credits []string `json:"credits"`
// CvssBaseScore The Snyk curated or recommended CVSS score, in the highest CVSS version
// supported and available for the issue, computed based on the Base Score
// of the cvss_vector field.
CvssBaseScore SnykvulndbCvssScore `json:"cvss_base_score"`
// CvssSources All CVSS vector information (Base), with corresponding sources, scores
// and severities applying to the same vulnerability. The data is sourced
// from external security vendors (e.g. NVD), as well as assigned by Snyk.
//
// The “type” key indicates whether this is the “primary” (recommended) CVSS
// to use, or “secondary” (provided as additional information).
//
// Information might be partial and will be updated upon evaluation by
// external sources.
CvssSources []SnykvulndbCvssSource `json:"cvss_sources"`
// CvssVector The primary CVSS Base vector, either Snyk curated or from the recommended
// source, in v3.0, v3.1 or v4.0 CVSS versions. Might include exploit
// values where applicable.
CvssVector string `json:"cvss_vector"`
// DisclosedAt Timestamp of when the vulnerability was first made publicly available
// (either known to us or as appears in the vulnerability source)
DisclosedAt time.Time `json:"disclosed_at"`
// Ecosystem Package ecosystem in which the package is distributed.
//
// This applies to private packages distributed with ecosystem tooling as well
// as those publicly distributed.
Ecosystem SnykvulndbPackageEcosystem `json:"ecosystem"`
// EpssDetails EPSS details - see note on model definition.
EpssDetails *SnykvulndbEpssDetails `json:"epss_details,omitempty"`
// ExploitDetails Details about the maturity of exploits for this vulnerability.
ExploitDetails SnykvulndbExploitDetails `json:"exploit_details"`
Id string `json:"id"`
// InitiallyFixedInVersions This indicates the earliest version that is vulnerability-free. As this
// might be a backported fix, this does not mean that newer versions aren’t
// vulnerable. vulnerable_versions should also be used to determine whether
// a given version is vulnerable.
InitiallyFixedInVersions []string `json:"initially_fixed_in_versions"`
// IsFixable Is there a fixed version published to the relevant package manager
// repository- i.e., a newer version without this specific vulnerability
IsFixable bool `json:"is_fixable"`
// IsMalicious Indicate if the vulnerability is known to mark a malicious package.
IsMalicious bool `json:"is_malicious"`
// IsSocialMediaTrending This boolean field is true when increased activity is detected related to
// this vulnerability. The "trending" determination is based on social media
// activity, using Snyk models which are tuned to detect an increased chance
// of near-future exploitation.
IsSocialMediaTrending bool `json:"is_social_media_trending"`
// ModifiedAt Timestamp indicating when the vulnerability was last modified (anything
// from typo to version change). When the vulnerability is first added, this
// field and published will be (almost) identical.
ModifiedAt time.Time `json:"modified_at"`
// PackageName Package name.
PackageName string `json:"package_name"`
// PackagePopularityRank Percentile rank indicating the package's prevalence across Snyk-monitored projects.
// A higher rank signifies the package is used in a larger percentage of projects.
PackagePopularityRank *float32 `json:"package_popularity_rank,omitempty"`
// PackageRepositoryUrl Link to the package repository containing the vulnerable package.
PackageRepositoryUrl *string `json:"package_repository_url,omitempty"`
// PackageVersion Package version.
PackageVersion string `json:"package_version"`
// PublishedAt Timestamp indicating when the problem was published.
PublishedAt time.Time `json:"published_at"`
// References Links to external websites related to the vulnerability. Links also
// include a user-facing curated title.
References []SnykvulndbReferenceLinks `json:"references"`
// Severity The Snyk curated or recommended vulnerability severity for the problem.
Severity Severity `json:"severity"`
Source SnykVulnProblemSource `json:"source"`
// VendorSeverity The assigned severity/impact/urgency rating by the distros teams for the
// specific vulnerability package and release of the operating system (if available).
VendorSeverity *string `json:"vendor_severity,omitempty"`
// VulnerableFunctions Known vulnerable functions in software packages.
VulnerableFunctions *map[string]SnykvulndbVulnerableFunction `json:"vulnerable_functions,omitempty"`
}
SnykVulnProblem Vulnerability from Snyk's Vulnerability Database.
type SnykVulnProblemSource ¶
type SnykVulnProblemSource string
SnykVulnProblemSource defines model for SnykVulnProblem.Source.
const (
SnykVuln SnykVulnProblemSource = "snyk_vuln"
)
Defines values for SnykVulnProblemSource.
type SnykcoderuleConfiguration ¶
type SnykcoderuleConfiguration struct {
// Severity Severity to apply when the rule matches.
Severity Severity `json:"severity"`
}
SnykcoderuleConfiguration Snyk Code rule configuration options.
type SnykcoderuleExampleCommitChange ¶
type SnykcoderuleExampleCommitChange struct {
Line string `json:"line"`
LineChange string `json:"line_change"`
LineNumber uint32 `json:"line_number"`
}
SnykcoderuleExampleCommitChange Source line content, line number, and unified diff indicating the changes in the fix.
type SnykcoderuleExampleCommitFix ¶
type SnykcoderuleExampleCommitFix struct {
// CommitUrl Commit URL identifying a specific commit within a public open-source SCM repo.
CommitUrl string `json:"commit_url"`
// Lines Lines containing an example of the Snyk Code rule with an example fix.
Lines []SnykcoderuleExampleCommitChange `json:"lines"`
}
SnykcoderuleExampleCommitFix An example of fixing this rule in a public open-source code.
type SnykcoderuleMultiformatMessageString ¶
type SnykcoderuleMultiformatMessageString struct {
Markdown *string `json:"markdown,omitempty"`
Text *string `json:"text,omitempty"`
}
SnykcoderuleMultiformatMessageString Represent a message string in multiple formats: plain text or markdown.
type SnykcoderuleProperties ¶
type SnykcoderuleProperties struct {
// Categories Categories applied to the rule.
Categories []string `json:"categories"`
// Cwe List of CWE (Common Weakness Enumeration) identifiers corresponding to this rule.
Cwe []string `json:"cwe"`
// ExampleCommitDescriptions Descriptions of the fix examples.
ExampleCommitDescriptions []string `json:"example_commit_descriptions"`
// ExampleCommitFixes Examples of fixing this rule in public open-source code.
ExampleCommitFixes []SnykcoderuleExampleCommitFix `json:"example_commit_fixes"`
// Precision A qualitative description of the rule's precision.
Precision string `json:"precision"`
RepoDatasetSize uint32 `json:"repo_dataset_size"`
// Tags Tags applied to the rule.
Tags []string `json:"tags"`
}
SnykcoderuleProperties Additional properties of a Snyk Code rule. Represented in SARIF as free-form metadata, but Snyk Code scanner outputs prescribe a specific structure for this content.
type SnykvulndbBuildPackageEcosystem ¶
type SnykvulndbBuildPackageEcosystem struct {
Language string `json:"language"`
PackageManager string `json:"package_manager"`
Type SnykvulndbBuildPackageEcosystemType `json:"type"`
}
SnykvulndbBuildPackageEcosystem Software packages supporting the application build process.
These are generally development libraries, which may be distributed in source or compiled form, used during the application build process by various programming language toolchains.
Examples include, but are not limited to: Javascript NPM, Java Maven, Python pip, etc.
type SnykvulndbBuildPackageEcosystemType ¶
type SnykvulndbBuildPackageEcosystemType string
SnykvulndbBuildPackageEcosystemType defines model for SnykvulndbBuildPackageEcosystem.Type.
const (
Build SnykvulndbBuildPackageEcosystemType = "build"
)
Defines values for SnykvulndbBuildPackageEcosystemType.
type SnykvulndbCvssScore ¶
type SnykvulndbCvssScore = float32
SnykvulndbCvssScore defines model for snykvulndb.CvssScore.
type SnykvulndbCvssSource ¶
type SnykvulndbCvssSource struct {
// Assigner Entity providing the CVSS information.
Assigner string `json:"assigner"`
// BaseScore Base CVSS score.
BaseScore SnykvulndbCvssScore `json:"base_score"`
// CvssVersion CVSS version.
CvssVersion string `json:"cvss_version"`
// ModifiedAt When the CVSS scoring was last modified.
ModifiedAt time.Time `json:"modified_at"`
// Severity Severity based on the CVSS rating scale (see SnykVulnAttributes.severity).
Severity Severity `json:"severity"`
// Type Designation of whether the CVSS score is primary (recommended assessment)
// or secondary (supplemental information).
Type SnykvulndbCvssSourceType `json:"type"`
// Vector The CVSS vector string.
Vector string `json:"vector"`
}
SnykvulndbCvssSource CVSS vector information with provenance indicating the source of the scoring.
type SnykvulndbCvssSourceType ¶
type SnykvulndbCvssSourceType string
SnykvulndbCvssSourceType Indicate whether the CVSS source is primary (recommended) or secondary (provided as supplemental information).
const ( SnykvulndbCvssSourceTypeOther SnykvulndbCvssSourceType = "other" SnykvulndbCvssSourceTypePrimary SnykvulndbCvssSourceType = "primary" SnykvulndbCvssSourceTypeSecondary SnykvulndbCvssSourceType = "secondary" )
Defines values for SnykvulndbCvssSourceType.
type SnykvulndbEpssDetails ¶
type SnykvulndbEpssDetails struct {
// ModelVersion The version of the EPSS model we use.
ModelVersion string `json:"model_version"`
// Percentile The percentile of the EPSS of a vulnerability relative to all other vulnerabilities.
// In value range 0 - 1 with 5 fixed digits.
Percentile string `json:"percentile"`
// Probability The probability of the vulnerability to be exploited.
// In value range 0 - 1 with 5 fixed digits.
Probability string `json:"probability"`
}
SnykvulndbEpssDetails Exploit Prediction Scoring System (EPSS), which predicts the likelihood (probability) of the vulnerability to be exploited, and the percentile of the EPSS of a vulnerability relative to all other vulnerabilities. We are using the latest model. https://www.first.org/epss/model
type SnykvulndbExploitDetails ¶
type SnykvulndbExploitDetails struct {
// MaturityLevels Exploit maturity representation in CVSS version formats.
MaturityLevels []SnykvulndbExploitMaturityLevel `json:"maturity_levels"`
// Sources Sources of the exploitation maturity assessment.
Sources []string `json:"sources"`
}
SnykvulndbExploitDetails Details about the exploitability of a vulnerability.
type SnykvulndbExploitMaturityLevel ¶
type SnykvulndbExploitMaturityLevel struct {
// Format Format of the maturity level.
Format string `json:"format"`
// Level Maturity level in the given format.
Level string `json:"level"`
// Type Designation of whether the maturity information is primary (recommended
// assessment) or secondary (supplemental information) in nature.
Type SnykvulndbCvssSourceType `json:"type"`
}
SnykvulndbExploitMaturityLevel Represents exploit maturity.
type SnykvulndbOsPackageEcosystem ¶
type SnykvulndbOsPackageEcosystem struct {
// Distribution Distribution name providing the package.
Distribution string `json:"distribution"`
// OsName Name of the operating system.
OsName string `json:"os_name"`
// Release Release version of the operating system distribution.
//
// Note that for Linux distributions this is the release version (typically a
// semver or date-derived number), rather than the codename for the release.
Release string `json:"release"`
Type SnykvulndbOsPackageEcosystemType `json:"type"`
}
SnykvulndbOsPackageEcosystem Software packages supporting operating system software installation and upgrades.
These are generally software packages containing runtime libraries and applications which are installed as part of an operating system software distribution.
type SnykvulndbOsPackageEcosystemType ¶
type SnykvulndbOsPackageEcosystemType string
SnykvulndbOsPackageEcosystemType defines model for SnykvulndbOsPackageEcosystem.Type.
const (
Os SnykvulndbOsPackageEcosystemType = "os"
)
Defines values for SnykvulndbOsPackageEcosystemType.
type SnykvulndbOtherPackageEcosystem ¶
type SnykvulndbOtherPackageEcosystem struct {
Type SnykvulndbOtherPackageEcosystemType `json:"type"`
}
SnykvulndbOtherPackageEcosystem Package ecosystem which this API version is not capable of expressing.
More information may be available in a newer version of this API.
type SnykvulndbOtherPackageEcosystemType ¶
type SnykvulndbOtherPackageEcosystemType string
SnykvulndbOtherPackageEcosystemType defines model for SnykvulndbOtherPackageEcosystem.Type.
const (
SnykvulndbOtherPackageEcosystemTypeOther SnykvulndbOtherPackageEcosystemType = "other"
)
Defines values for SnykvulndbOtherPackageEcosystemType.
type SnykvulndbPackageEcosystem ¶
type SnykvulndbPackageEcosystem struct {
// contains filtered or unexported fields
}
SnykvulndbPackageEcosystem Describe a software package ecosystem.
func (SnykvulndbPackageEcosystem) AsSnykvulndbBuildPackageEcosystem ¶
func (t SnykvulndbPackageEcosystem) AsSnykvulndbBuildPackageEcosystem() (SnykvulndbBuildPackageEcosystem, error)
AsSnykvulndbBuildPackageEcosystem returns the union data inside the SnykvulndbPackageEcosystem as a SnykvulndbBuildPackageEcosystem
func (SnykvulndbPackageEcosystem) AsSnykvulndbOsPackageEcosystem ¶
func (t SnykvulndbPackageEcosystem) AsSnykvulndbOsPackageEcosystem() (SnykvulndbOsPackageEcosystem, error)
AsSnykvulndbOsPackageEcosystem returns the union data inside the SnykvulndbPackageEcosystem as a SnykvulndbOsPackageEcosystem
func (SnykvulndbPackageEcosystem) AsSnykvulndbOtherPackageEcosystem ¶
func (t SnykvulndbPackageEcosystem) AsSnykvulndbOtherPackageEcosystem() (SnykvulndbOtherPackageEcosystem, error)
AsSnykvulndbOtherPackageEcosystem returns the union data inside the SnykvulndbPackageEcosystem as a SnykvulndbOtherPackageEcosystem
func (SnykvulndbPackageEcosystem) Discriminator ¶
func (t SnykvulndbPackageEcosystem) Discriminator() (string, error)
func (*SnykvulndbPackageEcosystem) FromSnykvulndbBuildPackageEcosystem ¶
func (t *SnykvulndbPackageEcosystem) FromSnykvulndbBuildPackageEcosystem(v SnykvulndbBuildPackageEcosystem) error
FromSnykvulndbBuildPackageEcosystem overwrites any union data inside the SnykvulndbPackageEcosystem as the provided SnykvulndbBuildPackageEcosystem
func (*SnykvulndbPackageEcosystem) FromSnykvulndbOsPackageEcosystem ¶
func (t *SnykvulndbPackageEcosystem) FromSnykvulndbOsPackageEcosystem(v SnykvulndbOsPackageEcosystem) error
FromSnykvulndbOsPackageEcosystem overwrites any union data inside the SnykvulndbPackageEcosystem as the provided SnykvulndbOsPackageEcosystem
func (*SnykvulndbPackageEcosystem) FromSnykvulndbOtherPackageEcosystem ¶
func (t *SnykvulndbPackageEcosystem) FromSnykvulndbOtherPackageEcosystem(v SnykvulndbOtherPackageEcosystem) error
FromSnykvulndbOtherPackageEcosystem overwrites any union data inside the SnykvulndbPackageEcosystem as the provided SnykvulndbOtherPackageEcosystem
func (SnykvulndbPackageEcosystem) MarshalJSON ¶
func (t SnykvulndbPackageEcosystem) MarshalJSON() ([]byte, error)
func (*SnykvulndbPackageEcosystem) MergeSnykvulndbBuildPackageEcosystem ¶
func (t *SnykvulndbPackageEcosystem) MergeSnykvulndbBuildPackageEcosystem(v SnykvulndbBuildPackageEcosystem) error
MergeSnykvulndbBuildPackageEcosystem performs a merge with any union data inside the SnykvulndbPackageEcosystem, using the provided SnykvulndbBuildPackageEcosystem
func (*SnykvulndbPackageEcosystem) MergeSnykvulndbOsPackageEcosystem ¶
func (t *SnykvulndbPackageEcosystem) MergeSnykvulndbOsPackageEcosystem(v SnykvulndbOsPackageEcosystem) error
MergeSnykvulndbOsPackageEcosystem performs a merge with any union data inside the SnykvulndbPackageEcosystem, using the provided SnykvulndbOsPackageEcosystem
func (*SnykvulndbPackageEcosystem) MergeSnykvulndbOtherPackageEcosystem ¶
func (t *SnykvulndbPackageEcosystem) MergeSnykvulndbOtherPackageEcosystem(v SnykvulndbOtherPackageEcosystem) error
MergeSnykvulndbOtherPackageEcosystem performs a merge with any union data inside the SnykvulndbPackageEcosystem, using the provided SnykvulndbOtherPackageEcosystem
func (*SnykvulndbPackageEcosystem) UnmarshalJSON ¶
func (t *SnykvulndbPackageEcosystem) UnmarshalJSON(b []byte) error
func (SnykvulndbPackageEcosystem) ValueByDiscriminator ¶
func (t SnykvulndbPackageEcosystem) ValueByDiscriminator() (interface{}, error)
type SnykvulndbReferenceLinks ¶
type SnykvulndbReferenceLinks struct {
// Title User-facing title of the link.
Title string `json:"title"`
// Url External link where more information about the vulnerability can be found.
Url string `json:"url"`
}
SnykvulndbReferenceLinks Represent links to external sources of vulnerability information.
type SnykvulndbVulnerableFunction ¶
type SnykvulndbVulnerableFunction struct {
// FunctionId Vulnerable function.
FunctionId SnykvulndbVulnerableFunctionId `json:"function_id"`
// Versions Package versions in which the function is vulnerable.
Versions []string `json:"versions"`
}
SnykvulndbVulnerableFunction Information about a function known to be vulnerable in a software package.
type SnykvulndbVulnerableFunctionId ¶
type SnykvulndbVulnerableFunctionId struct {
// ClassName Class containing the function.
ClassName *string `json:"class_name,omitempty"`
// FunctionName Vulnerable function name.
FunctionName string `json:"function_name"`
}
SnykvulndbVulnerableFunctionId Identify a vulnerable function in a software package.
type SourceLocation ¶
type SourceLocation struct {
// FilePath File path for the code snippet.
FilePath string `json:"file_path"`
// FromColumn Column on which the snippet starts.
FromColumn *int `json:"from_column,omitempty"`
// FromLine Line in the file where the code snippet starts.
FromLine int `json:"from_line"`
// ToColumn Column at which the code snippet ends.
ToColumn *int `json:"to_column,omitempty"`
// ToLine Line on which the code snippet ends.
ToLine *int `json:"to_line,omitempty"`
Type SourceLocationType `json:"type"`
}
SourceLocation Source file location.
Finding types: SCA, SAST
type SourceLocationType ¶
type SourceLocationType string
SourceLocationType defines model for SourceLocation.Type.
const (
Source SourceLocationType = "source"
)
Defines values for SourceLocationType.
type StartTestParams ¶
type StartTestParams struct {
OrgID string
Subject TestSubjectCreate
LocalPolicy *LocalPolicy
}
StartTestParams defines parameters for the high-level StartTest function.
type Suppression ¶
type Suppression struct {
// Justification Reason given for an ignore pending approval.
Justification *string `json:"justification,omitempty"`
// Policy Policy responsible for the state of suppression represented here, if available.
Policy *PolicyRef `json:"policy,omitempty"`
// Status Status of the suppression.
Status SuppressionStatus `json:"status"`
}
Suppression Details about a finding's suppression in test results.
Suppressed findings do not contribute to the test outcome, but they are still provided in the results.
type SuppressionStatus ¶
type SuppressionStatus string
SuppressionStatus Status of a suppression on a finding.
const ( SuppressionStatusIgnored SuppressionStatus = "ignored" SuppressionStatusOther SuppressionStatus = "other" SuppressionStatusPendingIgnoreApproval SuppressionStatus = "pending_ignore_approval" )
Defines values for SuppressionStatus.
type TestAttributes ¶
type TestAttributes struct {
// Config The test configuration. If not specified, caller accepts test configuration
// defaults within the calling scope (org, group or tenant settings, etc).
Config *TestConfiguration `json:"config,omitempty"`
// CreatedAt Creation time of the test resource.
CreatedAt *time.Time `json:"created_at,omitempty"`
// EffectiveSummary Summary of findings discovered by the test, effective to the outcome
// decision. This summary excludes findings suppressed by policy.
//
// This attribute is set when the test execution
// completes (state.execution == 'finished') successfully (without fatal errors
// blocking an outcome).
EffectiveSummary *FindingSummary `json:"effective_summary,omitempty"`
// Outcome The outcome of the test.
//
// This attribute is set when the test execution
// completes (state.execution == 'completed') successfully (without fatal errors
// blocking an outcome).
Outcome *TestOutcome `json:"outcome,omitempty"`
// RawSummary Summary of findings regardless of whether they are effective or not. This
// summary includes all findings, even those suppressed by policy.
//
// This attribute is set when the test execution
// completes (state.execution == 'finished') successfully (without fatal errors
// blocking an outcome).
RawSummary *FindingSummary `json:"raw_summary,omitempty"`
// State The state of the test's execution.
State *TestState `json:"state,omitempty"`
// Subject The subject of a test.
Subject TestSubject `json:"subject"`
// SubjectLocators Additional locators which may help locate the test subject across test workflows.
//
// Test subjects generally will have a primary locator. Additional locators
// may be provided to help link the test to existing projects and/or assets in
// the Snyk platform.
SubjectLocators *[]TestSubjectLocator `json:"subject_locators,omitempty"`
}
TestAttributes TestAttributes represents the attributes of a Test resource.
type TestAttributesCreate ¶
type TestAttributesCreate struct {
// Config The test configuration. If not specified, caller accepts test configuration
// defaults within the calling scope (org, group or tenant settings, etc).
Config *TestConfiguration `json:"config,omitempty"`
// Subject The subject of a test.
Subject TestSubjectCreate `json:"subject"`
// SubjectLocators Additional locators which may help locate the test subject across test workflows.
//
// Test subjects generally will have a primary locator. Additional locators
// may be provided to help link the test to existing projects and/or assets in
// the Snyk platform.
SubjectLocators *[]TestSubjectLocator `json:"subject_locators,omitempty"`
}
TestAttributesCreate TestAttributes represents the attributes of a Test resource.
type TestClient ¶
type TestClient interface {
StartTest(ctx context.Context, params StartTestParams) (TestHandle, error)
}
func NewTestClient ¶
func NewTestClient(serverBaseUrl string, options ...ConfigOption) (TestClient, error)
NewTestClient returns a new instance of the test client, configured with the provided options.
type TestConfiguration ¶
type TestConfiguration struct {
// LocalPolicy Inline configured policy options for determining outcome of this specific test.
//
// If centrally managed policies are in scope, inline policies are overridden
// by managed policies. Policy references explain which policies were
// effective for test evaluation.
LocalPolicy *LocalPolicy `json:"local_policy,omitempty"`
// PublishReport Publish findings into a report, viewable in the Snyk web UI.
PublishReport *bool `json:"publish_report,omitempty"`
// Timeout Maximum test time in seconds, after which execution will be cancelled and
// the test will fail with reason "timeout".
Timeout *TimeoutSpec `json:"timeout,omitempty"`
}
TestConfiguration Test configuration.
type TestData ¶
type TestData struct {
// Attributes TestAttributes represents the attributes of a Test resource.
Attributes TestAttributes `json:"attributes"`
Id *openapi_types.UUID `json:"id,omitempty"`
Links *struct {
// Findings Link to the findings discovered by the test, when it completes.
Findings *IoSnykApiCommonLinkProperty `json:"findings,omitempty"`
} `json:"links,omitempty"`
Type TestDataType `json:"type"`
}
TestData TestData represents a Test resource object.
type TestDataCreate ¶
type TestDataCreate struct {
// Attributes TestAttributes represents the attributes of a Test resource.
Attributes TestAttributesCreate `json:"attributes"`
Type TestDataCreateType `json:"type"`
}
TestDataCreate TestData represents a Test resource object.
type TestDataCreateType ¶
type TestDataCreateType string
TestDataCreateType defines model for TestDataCreate.Type.
const (
Tests TestDataCreateType = "tests"
)
Defines values for TestDataCreateType.
type TestDataType ¶
type TestDataType string
TestDataType defines model for TestData.Type.
const (
TestDataTypeTests TestDataType = "tests"
)
Defines values for TestDataType.
type TestExecutionStates ¶
type TestExecutionStates string
TestExecutionStates defines model for TestExecutionStates.
const ( Errored TestExecutionStates = "errored" Finished TestExecutionStates = "finished" Pending TestExecutionStates = "pending" Started TestExecutionStates = "started" )
Defines values for TestExecutionStates.
type TestHandle ¶
type TestHandle interface {
Wait(ctx context.Context) error
Done() <-chan struct{}
Result() TestResult
}
TestHandle allows for starting a test and waiting on its response
type TestOutcome ¶
type TestOutcome struct {
// BreachedPolicies Test-level policies which were breached in a failing outcome.
//
// This array may be truncated for a large number of policies.
BreachedPolicies *PolicyRefSet `json:"breached_policies,omitempty"`
// Reason Reason for the outcome, if applicable.
Reason *TestOutcomeReason `json:"reason,omitempty"`
// Result Whether the test passed or failed.
Result PassFail `json:"result"`
}
TestOutcome Outcome of a test; pass or fail.
type TestOutcomeReason ¶
type TestOutcomeReason string
TestOutcomeReason Reasons for the outcome.
const ( TestOutcomeReasonOther TestOutcomeReason = "other" TestOutcomeReasonPolicyBreach TestOutcomeReason = "policy_breach" TestOutcomeReasonTimeout TestOutcomeReason = "timeout" )
Defines values for TestOutcomeReason.
type TestRequestBody ¶
type TestRequestBody struct {
// Data TestData represents a Test resource object.
Data TestDataCreate `json:"data"`
}
TestRequestBody TestRequestBody represents the request body used when creating an Test.
type TestResult ¶
type TestResult interface {
GetTestID() *uuid.UUID
GetTestConfiguration() *TestConfiguration
GetCreatedAt() *time.Time
GetTestSubject() TestSubject
GetSubjectLocators() *[]TestSubjectLocator
GetExecutionState() TestExecutionStates
GetErrors() *[]IoSnykApiCommonError
GetWarnings() *[]IoSnykApiCommonError
GetPassFail() *PassFail
GetOutcomeReason() *TestOutcomeReason
GetBreachedPolicies() *PolicyRefSet
GetEffectiveSummary() *FindingSummary
GetRawSummary() *FindingSummary
Findings(ctx context.Context) (resultFindings []FindingData, complete bool, err error)
}
TestResult defines the contract for accessing test result information.
type TestState ¶
type TestState struct {
// Errors Errors which occurred during the execution of a test.
//
// If execution state is errored, at least one error will be
// indicated here.
Errors *[]IoSnykApiCommonError `json:"errors,omitempty"`
// Execution Current execution state of the test. This should be polled to completion
// ("completed" or "errored") when waiting for a test result.
//
// Completion is no guarantee of an outcome in the event of fatal errors.
Execution TestExecutionStates `json:"execution"`
// Warnings Non-fatal errors which occurred during the execution of a test.
//
// Execution state and warnings are not linked; any of passed/failed/
// errored tests can have warnings.
Warnings *[]IoSnykApiCommonError `json:"warnings,omitempty"`
}
TestState Test execution state information.
type TestSubject ¶
type TestSubject struct {
// contains filtered or unexported fields
}
TestSubject The subject of a test, which identifies the asset/project and content references necessary to conduct a security test.
func (TestSubject) AsDeepcodeBundleSubject ¶
func (t TestSubject) AsDeepcodeBundleSubject() (DeepcodeBundleSubject, error)
AsDeepcodeBundleSubject returns the union data inside the TestSubject as a DeepcodeBundleSubject
func (TestSubject) AsDepGraphSubject ¶
func (t TestSubject) AsDepGraphSubject() (DepGraphSubject, error)
AsDepGraphSubject returns the union data inside the TestSubject as a DepGraphSubject
func (TestSubject) AsGitUrlCoordinatesSubject ¶
func (t TestSubject) AsGitUrlCoordinatesSubject() (GitUrlCoordinatesSubject, error)
AsGitUrlCoordinatesSubject returns the union data inside the TestSubject as a GitUrlCoordinatesSubject
func (TestSubject) AsOtherSubject ¶
func (t TestSubject) AsOtherSubject() (OtherSubject, error)
AsOtherSubject returns the union data inside the TestSubject as a OtherSubject
func (TestSubject) AsSbomReachabilitySubject ¶
func (t TestSubject) AsSbomReachabilitySubject() (SbomReachabilitySubject, error)
AsSbomReachabilitySubject returns the union data inside the TestSubject as a SbomReachabilitySubject
func (TestSubject) AsSbomSubject ¶
func (t TestSubject) AsSbomSubject() (SbomSubject, error)
AsSbomSubject returns the union data inside the TestSubject as a SbomSubject
func (TestSubject) Discriminator ¶
func (t TestSubject) Discriminator() (string, error)
func (*TestSubject) FromDeepcodeBundleSubject ¶
func (t *TestSubject) FromDeepcodeBundleSubject(v DeepcodeBundleSubject) error
FromDeepcodeBundleSubject overwrites any union data inside the TestSubject as the provided DeepcodeBundleSubject
func (*TestSubject) FromDepGraphSubject ¶
func (t *TestSubject) FromDepGraphSubject(v DepGraphSubject) error
FromDepGraphSubject overwrites any union data inside the TestSubject as the provided DepGraphSubject
func (*TestSubject) FromGitUrlCoordinatesSubject ¶
func (t *TestSubject) FromGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
FromGitUrlCoordinatesSubject overwrites any union data inside the TestSubject as the provided GitUrlCoordinatesSubject
func (*TestSubject) FromOtherSubject ¶
func (t *TestSubject) FromOtherSubject(v OtherSubject) error
FromOtherSubject overwrites any union data inside the TestSubject as the provided OtherSubject
func (*TestSubject) FromSbomReachabilitySubject ¶
func (t *TestSubject) FromSbomReachabilitySubject(v SbomReachabilitySubject) error
FromSbomReachabilitySubject overwrites any union data inside the TestSubject as the provided SbomReachabilitySubject
func (*TestSubject) FromSbomSubject ¶
func (t *TestSubject) FromSbomSubject(v SbomSubject) error
FromSbomSubject overwrites any union data inside the TestSubject as the provided SbomSubject
func (TestSubject) MarshalJSON ¶
func (t TestSubject) MarshalJSON() ([]byte, error)
func (*TestSubject) MergeDeepcodeBundleSubject ¶
func (t *TestSubject) MergeDeepcodeBundleSubject(v DeepcodeBundleSubject) error
MergeDeepcodeBundleSubject performs a merge with any union data inside the TestSubject, using the provided DeepcodeBundleSubject
func (*TestSubject) MergeDepGraphSubject ¶
func (t *TestSubject) MergeDepGraphSubject(v DepGraphSubject) error
MergeDepGraphSubject performs a merge with any union data inside the TestSubject, using the provided DepGraphSubject
func (*TestSubject) MergeGitUrlCoordinatesSubject ¶
func (t *TestSubject) MergeGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
MergeGitUrlCoordinatesSubject performs a merge with any union data inside the TestSubject, using the provided GitUrlCoordinatesSubject
func (*TestSubject) MergeOtherSubject ¶
func (t *TestSubject) MergeOtherSubject(v OtherSubject) error
MergeOtherSubject performs a merge with any union data inside the TestSubject, using the provided OtherSubject
func (*TestSubject) MergeSbomReachabilitySubject ¶
func (t *TestSubject) MergeSbomReachabilitySubject(v SbomReachabilitySubject) error
MergeSbomReachabilitySubject performs a merge with any union data inside the TestSubject, using the provided SbomReachabilitySubject
func (*TestSubject) MergeSbomSubject ¶
func (t *TestSubject) MergeSbomSubject(v SbomSubject) error
MergeSbomSubject performs a merge with any union data inside the TestSubject, using the provided SbomSubject
func (*TestSubject) UnmarshalJSON ¶
func (t *TestSubject) UnmarshalJSON(b []byte) error
func (TestSubject) ValueByDiscriminator ¶
func (t TestSubject) ValueByDiscriminator() (interface{}, error)
type TestSubjectCreate ¶
type TestSubjectCreate struct {
// contains filtered or unexported fields
}
TestSubjectCreate The subject of a test, which identifies the asset/project and content references necessary to conduct a security test.
func (TestSubjectCreate) AsDeepcodeBundleSubject ¶
func (t TestSubjectCreate) AsDeepcodeBundleSubject() (DeepcodeBundleSubject, error)
AsDeepcodeBundleSubject returns the union data inside the TestSubjectCreate as a DeepcodeBundleSubject
func (TestSubjectCreate) AsDepGraphSubjectCreate ¶
func (t TestSubjectCreate) AsDepGraphSubjectCreate() (DepGraphSubjectCreate, error)
AsDepGraphSubjectCreate returns the union data inside the TestSubjectCreate as a DepGraphSubjectCreate
func (TestSubjectCreate) AsGitUrlCoordinatesSubject ¶
func (t TestSubjectCreate) AsGitUrlCoordinatesSubject() (GitUrlCoordinatesSubject, error)
AsGitUrlCoordinatesSubject returns the union data inside the TestSubjectCreate as a GitUrlCoordinatesSubject
func (TestSubjectCreate) AsOtherSubject ¶
func (t TestSubjectCreate) AsOtherSubject() (OtherSubject, error)
AsOtherSubject returns the union data inside the TestSubjectCreate as a OtherSubject
func (TestSubjectCreate) AsSbomReachabilitySubject ¶
func (t TestSubjectCreate) AsSbomReachabilitySubject() (SbomReachabilitySubject, error)
AsSbomReachabilitySubject returns the union data inside the TestSubjectCreate as a SbomReachabilitySubject
func (TestSubjectCreate) AsSbomSubject ¶
func (t TestSubjectCreate) AsSbomSubject() (SbomSubject, error)
AsSbomSubject returns the union data inside the TestSubjectCreate as a SbomSubject
func (TestSubjectCreate) Discriminator ¶
func (t TestSubjectCreate) Discriminator() (string, error)
func (*TestSubjectCreate) FromDeepcodeBundleSubject ¶
func (t *TestSubjectCreate) FromDeepcodeBundleSubject(v DeepcodeBundleSubject) error
FromDeepcodeBundleSubject overwrites any union data inside the TestSubjectCreate as the provided DeepcodeBundleSubject
func (*TestSubjectCreate) FromDepGraphSubjectCreate ¶
func (t *TestSubjectCreate) FromDepGraphSubjectCreate(v DepGraphSubjectCreate) error
FromDepGraphSubjectCreate overwrites any union data inside the TestSubjectCreate as the provided DepGraphSubjectCreate
func (*TestSubjectCreate) FromGitUrlCoordinatesSubject ¶
func (t *TestSubjectCreate) FromGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
FromGitUrlCoordinatesSubject overwrites any union data inside the TestSubjectCreate as the provided GitUrlCoordinatesSubject
func (*TestSubjectCreate) FromOtherSubject ¶
func (t *TestSubjectCreate) FromOtherSubject(v OtherSubject) error
FromOtherSubject overwrites any union data inside the TestSubjectCreate as the provided OtherSubject
func (*TestSubjectCreate) FromSbomReachabilitySubject ¶
func (t *TestSubjectCreate) FromSbomReachabilitySubject(v SbomReachabilitySubject) error
FromSbomReachabilitySubject overwrites any union data inside the TestSubjectCreate as the provided SbomReachabilitySubject
func (*TestSubjectCreate) FromSbomSubject ¶
func (t *TestSubjectCreate) FromSbomSubject(v SbomSubject) error
FromSbomSubject overwrites any union data inside the TestSubjectCreate as the provided SbomSubject
func (TestSubjectCreate) MarshalJSON ¶
func (t TestSubjectCreate) MarshalJSON() ([]byte, error)
func (*TestSubjectCreate) MergeDeepcodeBundleSubject ¶
func (t *TestSubjectCreate) MergeDeepcodeBundleSubject(v DeepcodeBundleSubject) error
MergeDeepcodeBundleSubject performs a merge with any union data inside the TestSubjectCreate, using the provided DeepcodeBundleSubject
func (*TestSubjectCreate) MergeDepGraphSubjectCreate ¶
func (t *TestSubjectCreate) MergeDepGraphSubjectCreate(v DepGraphSubjectCreate) error
MergeDepGraphSubjectCreate performs a merge with any union data inside the TestSubjectCreate, using the provided DepGraphSubjectCreate
func (*TestSubjectCreate) MergeGitUrlCoordinatesSubject ¶
func (t *TestSubjectCreate) MergeGitUrlCoordinatesSubject(v GitUrlCoordinatesSubject) error
MergeGitUrlCoordinatesSubject performs a merge with any union data inside the TestSubjectCreate, using the provided GitUrlCoordinatesSubject
func (*TestSubjectCreate) MergeOtherSubject ¶
func (t *TestSubjectCreate) MergeOtherSubject(v OtherSubject) error
MergeOtherSubject performs a merge with any union data inside the TestSubjectCreate, using the provided OtherSubject
func (*TestSubjectCreate) MergeSbomReachabilitySubject ¶
func (t *TestSubjectCreate) MergeSbomReachabilitySubject(v SbomReachabilitySubject) error
MergeSbomReachabilitySubject performs a merge with any union data inside the TestSubjectCreate, using the provided SbomReachabilitySubject
func (*TestSubjectCreate) MergeSbomSubject ¶
func (t *TestSubjectCreate) MergeSbomSubject(v SbomSubject) error
MergeSbomSubject performs a merge with any union data inside the TestSubjectCreate, using the provided SbomSubject
func (*TestSubjectCreate) UnmarshalJSON ¶
func (t *TestSubjectCreate) UnmarshalJSON(b []byte) error
func (TestSubjectCreate) ValueByDiscriminator ¶
func (t TestSubjectCreate) ValueByDiscriminator() (interface{}, error)
type TestSubjectLocator ¶
type TestSubjectLocator struct {
// contains filtered or unexported fields
}
TestSubjectLocator defines model for TestSubjectLocator.
func (TestSubjectLocator) AsLocalPathLocator ¶
func (t TestSubjectLocator) AsLocalPathLocator() (LocalPathLocator, error)
AsLocalPathLocator returns the union data inside the TestSubjectLocator as a LocalPathLocator
func (TestSubjectLocator) AsOtherLocator ¶
func (t TestSubjectLocator) AsOtherLocator() (OtherLocator, error)
AsOtherLocator returns the union data inside the TestSubjectLocator as a OtherLocator
func (TestSubjectLocator) AsProjectEntityLocator ¶
func (t TestSubjectLocator) AsProjectEntityLocator() (ProjectEntityLocator, error)
AsProjectEntityLocator returns the union data inside the TestSubjectLocator as a ProjectEntityLocator
func (TestSubjectLocator) AsProjectNameLocator ¶
func (t TestSubjectLocator) AsProjectNameLocator() (ProjectNameLocator, error)
AsProjectNameLocator returns the union data inside the TestSubjectLocator as a ProjectNameLocator
func (TestSubjectLocator) AsScmRepoLocator ¶
func (t TestSubjectLocator) AsScmRepoLocator() (ScmRepoLocator, error)
AsScmRepoLocator returns the union data inside the TestSubjectLocator as a ScmRepoLocator
func (TestSubjectLocator) Discriminator ¶
func (t TestSubjectLocator) Discriminator() (string, error)
func (*TestSubjectLocator) FromLocalPathLocator ¶
func (t *TestSubjectLocator) FromLocalPathLocator(v LocalPathLocator) error
FromLocalPathLocator overwrites any union data inside the TestSubjectLocator as the provided LocalPathLocator
func (*TestSubjectLocator) FromOtherLocator ¶
func (t *TestSubjectLocator) FromOtherLocator(v OtherLocator) error
FromOtherLocator overwrites any union data inside the TestSubjectLocator as the provided OtherLocator
func (*TestSubjectLocator) FromProjectEntityLocator ¶
func (t *TestSubjectLocator) FromProjectEntityLocator(v ProjectEntityLocator) error
FromProjectEntityLocator overwrites any union data inside the TestSubjectLocator as the provided ProjectEntityLocator
func (*TestSubjectLocator) FromProjectNameLocator ¶
func (t *TestSubjectLocator) FromProjectNameLocator(v ProjectNameLocator) error
FromProjectNameLocator overwrites any union data inside the TestSubjectLocator as the provided ProjectNameLocator
func (*TestSubjectLocator) FromScmRepoLocator ¶
func (t *TestSubjectLocator) FromScmRepoLocator(v ScmRepoLocator) error
FromScmRepoLocator overwrites any union data inside the TestSubjectLocator as the provided ScmRepoLocator
func (TestSubjectLocator) MarshalJSON ¶
func (t TestSubjectLocator) MarshalJSON() ([]byte, error)
func (*TestSubjectLocator) MergeLocalPathLocator ¶
func (t *TestSubjectLocator) MergeLocalPathLocator(v LocalPathLocator) error
MergeLocalPathLocator performs a merge with any union data inside the TestSubjectLocator, using the provided LocalPathLocator
func (*TestSubjectLocator) MergeOtherLocator ¶
func (t *TestSubjectLocator) MergeOtherLocator(v OtherLocator) error
MergeOtherLocator performs a merge with any union data inside the TestSubjectLocator, using the provided OtherLocator
func (*TestSubjectLocator) MergeProjectEntityLocator ¶
func (t *TestSubjectLocator) MergeProjectEntityLocator(v ProjectEntityLocator) error
MergeProjectEntityLocator performs a merge with any union data inside the TestSubjectLocator, using the provided ProjectEntityLocator
func (*TestSubjectLocator) MergeProjectNameLocator ¶
func (t *TestSubjectLocator) MergeProjectNameLocator(v ProjectNameLocator) error
MergeProjectNameLocator performs a merge with any union data inside the TestSubjectLocator, using the provided ProjectNameLocator
func (*TestSubjectLocator) MergeScmRepoLocator ¶
func (t *TestSubjectLocator) MergeScmRepoLocator(v ScmRepoLocator) error
MergeScmRepoLocator performs a merge with any union data inside the TestSubjectLocator, using the provided ScmRepoLocator
func (*TestSubjectLocator) UnmarshalJSON ¶
func (t *TestSubjectLocator) UnmarshalJSON(b []byte) error
func (TestSubjectLocator) ValueByDiscriminator ¶
func (t TestSubjectLocator) ValueByDiscriminator() (interface{}, error)
type TimeoutSpec ¶
type TimeoutSpec struct {
// Outcome Indicate whether a Test passes or fails.
Outcome PassFail `json:"outcome"`
Seconds uint32 `json:"seconds"`
}
TimeoutSpec Specification for a test timeout policy. If the test does not complete within the seconds specified, the test will instantly complete with the given outcome.