grafeas

package
v0.0.0-...-5cd06b7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API client for grafeas

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: version not set
  • Package version: 0.1.4
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./grafeas"

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
GrafeasV1Beta1Api BatchCreateNotes Post /v1beta1/{parent=projects/*}/notes:batchCreate Creates new notes in batch.
GrafeasV1Beta1Api BatchCreateOccurrences Post /v1beta1/{parent=projects/*}/occurrences:batchCreate Creates new occurrences in batch.
GrafeasV1Beta1Api CreateNote Post /v1beta1/{parent=projects/*}/notes Creates a new note.
GrafeasV1Beta1Api CreateOccurrence Post /v1beta1/{parent=projects/*}/occurrences Creates a new occurrence.
GrafeasV1Beta1Api DeleteNote Delete /v1beta1/{name=projects//notes/} Deletes the specified note.
GrafeasV1Beta1Api DeleteOccurrence Delete /v1beta1/{name=projects//occurrences/} Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.
GrafeasV1Beta1Api GetNote Get /v1beta1/{name=projects//notes/} Gets the specified note.
GrafeasV1Beta1Api GetOccurrence Get /v1beta1/{name=projects//occurrences/} Gets the specified occurrence.
GrafeasV1Beta1Api GetOccurrenceNote Get /v1beta1/{name=projects//occurrences/}/notes Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.
GrafeasV1Beta1Api GetVulnerabilityOccurrencesSummary Get /v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary Gets a summary of the number and severity of occurrences.
GrafeasV1Beta1Api ListNoteOccurrences Get /v1beta1/{name=projects//notes/}/occurrences Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.
GrafeasV1Beta1Api ListNotes Get /v1beta1/{parent=projects/*}/notes Lists notes for the specified project.
GrafeasV1Beta1Api ListOccurrences Get /v1beta1/{parent=projects/*}/occurrences Lists occurrences for the specified project.
GrafeasV1Beta1Api UpdateNote Patch /v1beta1/{name=projects//notes/} Updates the specified note.
GrafeasV1Beta1Api UpdateOccurrence Patch /v1beta1/{name=projects//occurrences/} Updates the specified occurrence.

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	GrafeasV1Beta1Api *GrafeasV1Beta1ApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the grafeas.proto API vversion not set In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AliasContextKind

type AliasContextKind string

AliasContextKind : The type of an alias. - KIND_UNSPECIFIED: Unknown. - FIXED: Git tag. - MOVABLE: Git branch. - OTHER: Used to specify non-standard aliases. For example, if a Git repo has a ref named \"refs/foo/bar\".

const (
	KIND_UNSPECIFIED_AliasContextKind AliasContextKind = "KIND_UNSPECIFIED"
	FIXED_AliasContextKind            AliasContextKind = "FIXED"
	MOVABLE_AliasContextKind          AliasContextKind = "MOVABLE"
	OTHER_AliasContextKind            AliasContextKind = "OTHER"
)

List of AliasContextKind

type AttestationAttestation

type AttestationAttestation struct {
	// A PGP signed attestation.
	PgpSignedAttestation *AttestationPgpSignedAttestation `json:"pgp_signed_attestation,omitempty"`
	// An attestation that supports multiple `Signature`s over the same attestation payload. The signatures (defined in common.proto) support a superset of public key types and IDs compared to PgpSignedAttestation.
	GenericSignedAttestation *AttestationGenericSignedAttestation `json:"generic_signed_attestation,omitempty"`
}

Occurrence that represents a single \"attestation\". The authenticity of an attestation can be verified using the attached signature. If the verifier trusts the public key of the signer, then verifying the signature is sufficient to establish trust. In this circumstance, the authority to which this attestation is attached is primarily useful for look-up (how to find this attestation if you already know the authority and artifact to be verified) and intent (which authority was this attestation intended to sign for).

type AttestationAuthority

type AttestationAuthority struct {
	// Hint hints at the purpose of the attestation authority.
	Hint *AuthorityHint `json:"hint,omitempty"`
}

Note kind that represents a logical attestation \"role\" or \"authority\". For example, an organization might have one `Authority` for \"QA\" and one for \"build\". This note is intended to act strictly as a grouping mechanism for the attached occurrences (Attestations). This grouping mechanism also provides a security boundary, since IAM ACLs gate the ability for a principle to attach an occurrence to a given note. It also provides a single point of lookup to find all attached attestation occurrences, even if they don't all live in the same project.

type AttestationGenericSignedAttestation

type AttestationGenericSignedAttestation struct {
	// Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema).
	ContentType *AttestationGenericSignedAttestationContentType `json:"content_type,omitempty"`
	// The serialized payload that is verified by one or more `signatures`. The encoding and semantic meaning of this payload must match what is set in `content_type`.
	SerializedPayload string `json:"serialized_payload,omitempty"`
	// One or more signatures over `serialized_payload`.  Verifier implementations should consider this attestation message verified if at least one `signature` verifies `serialized_payload`.  See `Signature` in common.proto for more details on signature structure and verification.
	Signatures []Grafeasv1beta1Signature `json:"signatures,omitempty"`
}

An attestation wrapper that uses the Grafeas `Signature` message. This attestation must define the `serialized_payload` that the `signatures` verify and any metadata necessary to interpret that plaintext. The signatures should always be over the `serialized_payload` bytestring.

type AttestationGenericSignedAttestationContentType

type AttestationGenericSignedAttestationContentType string

AttestationGenericSignedAttestationContentType : Type of the attestation plaintext that was signed. - CONTENT_TYPE_UNSPECIFIED: `ContentType` is not set. - SIMPLE_SIGNING_JSON: Atomic format attestation signature. See https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md The payload extracted in `plaintext` is a JSON blob conforming to the linked schema.

const (
	CONTENT_TYPE_UNSPECIFIED_AttestationGenericSignedAttestationContentType AttestationGenericSignedAttestationContentType = "CONTENT_TYPE_UNSPECIFIED"
	SIMPLE_SIGNING_JSON_AttestationGenericSignedAttestationContentType      AttestationGenericSignedAttestationContentType = "SIMPLE_SIGNING_JSON"
)

List of attestationGenericSignedAttestationContentType

type AttestationPgpSignedAttestation

type AttestationPgpSignedAttestation struct {
	// Required. The raw content of the signature, as output by GNU Privacy Guard (GPG) or equivalent. Since this message only supports attached signatures, the payload that was signed must be attached. While the signature format supported is dependent on the verification implementation, currently only ASCII-armored (`--armor` to gpg), non-clearsigned (`--sign` rather than `--clearsign` to gpg) are supported. Concretely, `gpg --sign --armor --output=signature.gpg payload.json` will create the signature content expected in this field in `signature.gpg` for the `payload.json` attestation payload.
	Signature string `json:"signature,omitempty"`
	// Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema).
	ContentType *AttestationPgpSignedAttestationContentType `json:"content_type,omitempty"`
	// The cryptographic fingerprint of the key used to generate the signature, as output by, e.g. `gpg --list-keys`. This should be the version 4, full 160-bit fingerprint, expressed as a 40 character hexidecimal string. See https://tools.ietf.org/html/rfc4880#section-12.2 for details. Implementations may choose to acknowledge \"LONG\", \"SHORT\", or other abbreviated key IDs, but only the full fingerprint is guaranteed to work. In gpg, the full fingerprint can be retrieved from the `fpr` field returned when calling --list-keys with --with-colons.  For example: “` gpg --with-colons --with-fingerprint --force-v4-certs \\     --list-keys attester@example.com tru::1:1513631572:0:3:1:5 pub:...<SNIP>... fpr:::::::::24FF6481B76AC91E66A00AC657A93A81EF3AE6FB: “` Above, the fingerprint is `24FF6481B76AC91E66A00AC657A93A81EF3AE6FB`.
	PgpKeyId string `json:"pgp_key_id,omitempty"`
}

An attestation wrapper with a PGP-compatible signature. This message only supports `ATTACHED` signatures, where the payload that is signed is included alongside the signature itself in the same file.

type AttestationPgpSignedAttestationContentType

type AttestationPgpSignedAttestationContentType string

AttestationPgpSignedAttestationContentType : Type (for example schema) of the attestation payload that was signed. - CONTENT_TYPE_UNSPECIFIED: `ContentType` is not set. - SIMPLE_SIGNING_JSON: Atomic format attestation signature. See https://github.com/containers/image/blob/8a5d2f82a6e3263290c8e0276c3e0f64e77723e7/docs/atomic-signature.md The payload extracted from `signature` is a JSON blob conforming to the linked schema.

const (
	CONTENT_TYPE_UNSPECIFIED_AttestationPgpSignedAttestationContentType AttestationPgpSignedAttestationContentType = "CONTENT_TYPE_UNSPECIFIED"
	SIMPLE_SIGNING_JSON_AttestationPgpSignedAttestationContentType      AttestationPgpSignedAttestationContentType = "SIMPLE_SIGNING_JSON"
)

List of attestationPgpSignedAttestationContentType

type AuthorityHint

type AuthorityHint struct {
	// Required. The human readable name of this attestation authority, for example \"qa\".
	HumanReadableName string `json:"humanReadableName,omitempty"`
}

This submessage provides human-readable hints about the purpose of the authority. Because the name of a note acts as its resource reference, it is important to disambiguate the canonical name of the Note (which might be a UUID for security purposes) from \"readable\" names more suitable for debug output. Note that these hints should not be used to look up authorities in security sensitive contexts, such as when looking up attestations to verify.

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BuildBuild

type BuildBuild struct {
	// Required. Immutable. Version of the builder which produced this build.
	BuilderVersion string `json:"builderVersion,omitempty"`
	// Signature of the build in occurrences pointing to this build note containing build details.
	Signature *BuildBuildSignature `json:"signature,omitempty"`
}

Note holding the version of the provider's builder and the signature of the provenance message in the build details occurrence.

type BuildBuildSignature

type BuildBuildSignature struct {
	// Public key of the builder which can be used to verify that the related findings are valid and unchanged. If `key_type` is empty, this defaults to PEM encoded public keys.  This field may be empty if `key_id` references an external key.  For Cloud Build based signatures, this is a PEM encoded public key. To verify the Cloud Build signature, place the contents of this field into a file (public.pem). The signature field is base64-decoded into its binary representation in signature.bin, and the provenance bytes from `BuildDetails` are base64-decoded into a binary representation in signed.bin. OpenSSL can then verify the signature: `openssl sha256 -verify public.pem -signature signature.bin signed.bin`
	PublicKey string `json:"publicKey,omitempty"`
	// Required. Signature of the related `BuildProvenance`. In JSON, this is base-64 encoded.
	Signature string `json:"signature,omitempty"`
	// An ID for the key used to sign. This could be either an ID for the key stored in `public_key` (such as the ID or fingerprint for a PGP key, or the CN for a cert), or a reference to an external key (such as a reference to a key in Cloud Key Management Service).
	KeyId string `json:"keyId,omitempty"`
	// The type of the key, either stored in `public_key` or referenced in `key_id`.
	KeyType *BuildSignatureKeyType `json:"keyType,omitempty"`
}

Message encapsulating the signature of the verified build.

type BuildSignatureKeyType

type BuildSignatureKeyType string

BuildSignatureKeyType : Public key formats. - KEY_TYPE_UNSPECIFIED: `KeyType` is not set. - PGP_ASCII_ARMORED: `PGP ASCII Armored` public key. - PKIX_PEM: `PKIX PEM` public key.

const (
	KEY_TYPE_UNSPECIFIED_BuildSignatureKeyType BuildSignatureKeyType = "KEY_TYPE_UNSPECIFIED"
	PGP_ASCII_ARMORED_BuildSignatureKeyType    BuildSignatureKeyType = "PGP_ASCII_ARMORED"
	PKIX_PEM_BuildSignatureKeyType             BuildSignatureKeyType = "PKIX_PEM"
)

List of BuildSignatureKeyType

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type CvsSv3AttackComplexity

type CvsSv3AttackComplexity string
const (
	UNSPECIFIED_CvsSv3AttackComplexity CvsSv3AttackComplexity = "ATTACK_COMPLEXITY_UNSPECIFIED"
	LOW_CvsSv3AttackComplexity         CvsSv3AttackComplexity = "ATTACK_COMPLEXITY_LOW"
	HIGH_CvsSv3AttackComplexity        CvsSv3AttackComplexity = "ATTACK_COMPLEXITY_HIGH"
)

List of CVSSv3AttackComplexity

type CvsSv3AttackVector

type CvsSv3AttackVector string
const (
	UNSPECIFIED_CvsSv3AttackVector CvsSv3AttackVector = "ATTACK_VECTOR_UNSPECIFIED"
	NETWORK_CvsSv3AttackVector     CvsSv3AttackVector = "ATTACK_VECTOR_NETWORK"
	ADJACENT_CvsSv3AttackVector    CvsSv3AttackVector = "ATTACK_VECTOR_ADJACENT"
	LOCAL_CvsSv3AttackVector       CvsSv3AttackVector = "ATTACK_VECTOR_LOCAL"
	PHYSICAL_CvsSv3AttackVector    CvsSv3AttackVector = "ATTACK_VECTOR_PHYSICAL"
)

List of CVSSv3AttackVector

type CvsSv3Impact

type CvsSv3Impact string
const (
	UNSPECIFIED_CvsSv3Impact CvsSv3Impact = "IMPACT_UNSPECIFIED"
	HIGH_CvsSv3Impact        CvsSv3Impact = "IMPACT_HIGH"
	LOW_CvsSv3Impact         CvsSv3Impact = "IMPACT_LOW"
	NONE_CvsSv3Impact        CvsSv3Impact = "IMPACT_NONE"
)

List of CVSSv3Impact

type CvsSv3PrivilegesRequired

type CvsSv3PrivilegesRequired string
const (
	UNSPECIFIED_CvsSv3PrivilegesRequired CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_UNSPECIFIED"
	NONE_CvsSv3PrivilegesRequired        CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_NONE"
	LOW_CvsSv3PrivilegesRequired         CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_LOW"
	HIGH_CvsSv3PrivilegesRequired        CvsSv3PrivilegesRequired = "PRIVILEGES_REQUIRED_HIGH"
)

List of CVSSv3PrivilegesRequired

type CvsSv3Scope

type CvsSv3Scope string
const (
	UNSPECIFIED_CvsSv3Scope CvsSv3Scope = "SCOPE_UNSPECIFIED"
	UNCHANGED_CvsSv3Scope   CvsSv3Scope = "SCOPE_UNCHANGED"
	CHANGED_CvsSv3Scope     CvsSv3Scope = "SCOPE_CHANGED"
)

List of CVSSv3Scope

type CvsSv3UserInteraction

type CvsSv3UserInteraction string
const (
	UNSPECIFIED_CvsSv3UserInteraction CvsSv3UserInteraction = "USER_INTERACTION_UNSPECIFIED"
	NONE_CvsSv3UserInteraction        CvsSv3UserInteraction = "USER_INTERACTION_NONE"
	REQUIRED_CvsSv3UserInteraction    CvsSv3UserInteraction = "USER_INTERACTION_REQUIRED"
)

List of CVSSv3UserInteraction

type DeploymentDeployable

type DeploymentDeployable struct {
	// Required. Resource URI for the artifact being deployed.
	ResourceUri []string `json:"resourceUri,omitempty"`
}

An artifact that can be deployed in some runtime.

type DeploymentDeployment

type DeploymentDeployment struct {
	// Identity of the user that triggered this deployment.
	UserEmail string `json:"user_email,omitempty"`
	// Required. Beginning of the lifetime of this deployment.
	DeployTime time.Time `json:"deploy_time,omitempty"`
	// End of the lifetime of this deployment.
	UndeployTime time.Time `json:"undeploy_time,omitempty"`
	// Configuration used to create this deployment.
	Config string `json:"config,omitempty"`
	// Address of the runtime element hosting this deployment.
	Address string `json:"address,omitempty"`
	// Output only. Resource URI for the artifact being deployed taken from the deployable field with the same name.
	ResourceUri []string `json:"resource_uri,omitempty"`
	// Platform hosting this deployment.
	Platform *DeploymentPlatform `json:"platform,omitempty"`
}

The period during which some deployable was active in a runtime.

type DeploymentPlatform

type DeploymentPlatform string

DeploymentPlatform : Types of platforms. - PLATFORM_UNSPECIFIED: Unknown. - GKE: Google Container Engine. - FLEX: Google App Engine: Flexible Environment. - CUSTOM: Custom user-defined platform.

const (
	PLATFORM_UNSPECIFIED_DeploymentPlatform DeploymentPlatform = "PLATFORM_UNSPECIFIED"
	GKE_DeploymentPlatform                  DeploymentPlatform = "GKE"
	FLEX_DeploymentPlatform                 DeploymentPlatform = "FLEX"
	CUSTOM_DeploymentPlatform               DeploymentPlatform = "CUSTOM"
)

List of DeploymentPlatform

type DiscoveredAnalysisStatus

type DiscoveredAnalysisStatus string

DiscoveredAnalysisStatus : Analysis status for a resource. Currently for initial analysis only (not updated in continuous analysis). - ANALYSIS_STATUS_UNSPECIFIED: Unknown. - PENDING: Resource is known but no action has been taken yet. - SCANNING: Resource is being analyzed. - FINISHED_SUCCESS: Analysis has finished successfully. - FINISHED_FAILED: Analysis has finished unsuccessfully, the analysis itself is in a bad state. - FINISHED_UNSUPPORTED: The resource is known not to be supported

const (
	ANALYSIS_STATUS_UNSPECIFIED_DiscoveredAnalysisStatus DiscoveredAnalysisStatus = "ANALYSIS_STATUS_UNSPECIFIED"
	PENDING_DiscoveredAnalysisStatus                     DiscoveredAnalysisStatus = "PENDING"
	SCANNING_DiscoveredAnalysisStatus                    DiscoveredAnalysisStatus = "SCANNING"
	FINISHED_SUCCESS_DiscoveredAnalysisStatus            DiscoveredAnalysisStatus = "FINISHED_SUCCESS"
	FINISHED_FAILED_DiscoveredAnalysisStatus             DiscoveredAnalysisStatus = "FINISHED_FAILED"
	FINISHED_UNSUPPORTED_DiscoveredAnalysisStatus        DiscoveredAnalysisStatus = "FINISHED_UNSUPPORTED"
)

List of DiscoveredAnalysisStatus

type DiscoveredContinuousAnalysis

type DiscoveredContinuousAnalysis string

DiscoveredContinuousAnalysis : Whether the resource is continuously analyzed. - CONTINUOUS_ANALYSIS_UNSPECIFIED: Unknown. - ACTIVE: The resource is continuously analyzed. - INACTIVE: The resource is ignored for continuous analysis.

const (
	CONTINUOUS_ANALYSIS_UNSPECIFIED_DiscoveredContinuousAnalysis DiscoveredContinuousAnalysis = "CONTINUOUS_ANALYSIS_UNSPECIFIED"
	ACTIVE_DiscoveredContinuousAnalysis                          DiscoveredContinuousAnalysis = "ACTIVE"
	INACTIVE_DiscoveredContinuousAnalysis                        DiscoveredContinuousAnalysis = "INACTIVE"
)

List of DiscoveredContinuousAnalysis

type DiscoveryDiscovered

type DiscoveryDiscovered struct {
	// Whether the resource is continuously analyzed.
	ContinuousAnalysis *DiscoveredContinuousAnalysis `json:"continuous_analysis,omitempty"`
	// The last time continuous analysis was done for this resource. Deprecated, do not use.
	LastAnalysisTime time.Time `json:"last_analysis_time,omitempty"`
	// The status of discovery for the resource.
	AnalysisStatus *DiscoveredAnalysisStatus `json:"analysis_status,omitempty"`
	// When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API.
	AnalysisStatusError *RpcStatus `json:"analysis_status_error,omitempty"`
}

Provides information about the analysis status of a discovered resource.

type DiscoveryDiscovery

type DiscoveryDiscovery struct {
	// Required. Immutable. The kind of analysis that is handled by this discovery.
	AnalysisKind *V1beta1NoteKind `json:"analysisKind,omitempty"`
}

A note that indicates a type of analysis a provider would perform. This note exists in a provider's project. A `Discovery` occurrence is created in a consumer's project at the start of analysis.

type GenericSwaggerError

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

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type GetVulnerabilityOccurrencesSummaryOpts

type GetVulnerabilityOccurrencesSummaryOpts struct {
	Filter optional.String
}

type GrafeasV1Beta1ApiService

type GrafeasV1Beta1ApiService service

func (*GrafeasV1Beta1ApiService) BatchCreateNotes

GrafeasV1Beta1ApiService Creates new notes in batch.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param parent The name of the project in the form of &#x60;projects/[PROJECT_ID]&#x60;, under which the notes are to be created.
  • @param body

@return V1beta1BatchCreateNotesResponse

func (*GrafeasV1Beta1ApiService) BatchCreateOccurrences

GrafeasV1Beta1ApiService Creates new occurrences in batch.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param parent The name of the project in the form of &#x60;projects/[PROJECT_ID]&#x60;, under which the occurrences are to be created.
  • @param body

@return V1beta1BatchCreateOccurrencesResponse

func (*GrafeasV1Beta1ApiService) CreateNote

GrafeasV1Beta1ApiService Creates a new note.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param parent The name of the project in the form of &#x60;projects/[PROJECT_ID]&#x60;, under which the note is to be created.
  • @param body The note to create.

@return V1beta1Note

func (*GrafeasV1Beta1ApiService) CreateOccurrence

GrafeasV1Beta1ApiService Creates a new occurrence.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param parent The name of the project in the form of &#x60;projects/[PROJECT_ID]&#x60;, under which the occurrence is to be created.
  • @param body The occurrence to create.

@return V1beta1Occurrence

func (*GrafeasV1Beta1ApiService) DeleteNote

func (a *GrafeasV1Beta1ApiService) DeleteNote(ctx context.Context, name string) (interface{}, *http.Response, error)

GrafeasV1Beta1ApiService Deletes the specified note.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name The name of the note in the form of &#x60;projects/[PROVIDER_ID]/notes/[NOTE_ID]&#x60;.

@return interface{}

func (*GrafeasV1Beta1ApiService) DeleteOccurrence

func (a *GrafeasV1Beta1ApiService) DeleteOccurrence(ctx context.Context, name string) (interface{}, *http.Response, error)

GrafeasV1Beta1ApiService Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name The name of the occurrence in the form of &#x60;projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]&#x60;.

@return interface{}

func (*GrafeasV1Beta1ApiService) GetNote

GrafeasV1Beta1ApiService Gets the specified note.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name The name of the note in the form of &#x60;projects/[PROVIDER_ID]/notes/[NOTE_ID]&#x60;.

@return V1beta1Note

func (*GrafeasV1Beta1ApiService) GetOccurrence

GrafeasV1Beta1ApiService Gets the specified occurrence.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name The name of the occurrence in the form of &#x60;projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]&#x60;.

@return V1beta1Occurrence

func (*GrafeasV1Beta1ApiService) GetOccurrenceNote

func (a *GrafeasV1Beta1ApiService) GetOccurrenceNote(ctx context.Context, name string) (V1beta1Note, *http.Response, error)

GrafeasV1Beta1ApiService Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name The name of the occurrence in the form of &#x60;projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]&#x60;.

@return V1beta1Note

func (*GrafeasV1Beta1ApiService) GetVulnerabilityOccurrencesSummary

func (a *GrafeasV1Beta1ApiService) GetVulnerabilityOccurrencesSummary(ctx context.Context, parent string, localVarOptionals *GetVulnerabilityOccurrencesSummaryOpts) (V1beta1VulnerabilityOccurrencesSummary, *http.Response, error)

func (*GrafeasV1Beta1ApiService) ListNoteOccurrences

func (*GrafeasV1Beta1ApiService) ListNotes

func (a *GrafeasV1Beta1ApiService) ListNotes(ctx context.Context, parent string, localVarOptionals *ListNotesOpts) (V1beta1ListNotesResponse, *http.Response, error)

func (*GrafeasV1Beta1ApiService) ListOccurrences

func (a *GrafeasV1Beta1ApiService) ListOccurrences(ctx context.Context, parent string, localVarOptionals *ListOccurrencesOpts) (V1beta1ListOccurrencesResponse, *http.Response, error)

func (*GrafeasV1Beta1ApiService) UpdateNote

GrafeasV1Beta1ApiService Updates the specified note.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name The name of the note in the form of &#x60;projects/[PROVIDER_ID]/notes/[NOTE_ID]&#x60;.
  • @param body The updated note.

@return V1beta1Note

func (*GrafeasV1Beta1ApiService) UpdateOccurrence

GrafeasV1Beta1ApiService Updates the specified occurrence.

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name The name of the occurrence in the form of &#x60;projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]&#x60;.
  • @param body The updated occurrence.

@return V1beta1Occurrence

type Grafeasv1beta1Signature

type Grafeasv1beta1Signature struct {
	// The content of the signature, an opaque bytestring. The payload that this signature verifies MUST be unambiguously provided with the Signature during verification. A wrapper message might provide the payload explicitly. Alternatively, a message might have a canonical serialization that can always be unambiguously computed to derive the payload.
	Signature string `json:"signature,omitempty"`
	// The identifier for the public key that verifies this signature.   * The `public_key_id` is required.   * The `public_key_id` SHOULD be an RFC3986 conformant URI.   * When possible, the `public_key_id` SHOULD be an immutable reference,     such as a cryptographic digest.  Examples of valid `public_key_id`s:  OpenPGP V4 public key fingerprint:   * \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\" See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more details on this scheme.  RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER serialization):   * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\"   * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\"
	PublicKeyId string `json:"public_key_id,omitempty"`
}

Verifiers (e.g. Kritis implementations) MUST verify signatures with respect to the trust anchors defined in policy (e.g. a Kritis policy). Typically this means that the verifier has been configured with a map from `public_key_id` to public key material (and any required parameters, e.g. signing algorithm). In particular, verification implementations MUST NOT treat the signature `public_key_id` as anything more than a key lookup hint. The `public_key_id` DOES NOT validate or authenticate a public key; it only provides a mechanism for quickly selecting a public key ALREADY CONFIGURED on the verifier through a trusted channel. Verification implementations MUST reject signatures in any of the following circumstances: * The `public_key_id` is not recognized by the verifier. * The public key that `public_key_id` refers to does not verify the signature with respect to the payload. The `signature` contents SHOULD NOT be \"attached\" (where the payload is included with the serialized `signature` bytes). Verifiers MUST ignore any \"attached\" payload and only verify signatures with respect to explicitly provided payload (e.g. a `payload` field on the proto message that holds this Signature, or the canonical serialization of the proto message that holds this signature).

type HashHashType

type HashHashType string

HashHashType : Specifies the hash algorithm. - HASH_TYPE_UNSPECIFIED: Unknown. - SHA256: A SHA-256 hash.

const (
	HASH_TYPE_UNSPECIFIED_HashHashType HashHashType = "HASH_TYPE_UNSPECIFIED"
	SHA256_HashHashType                HashHashType = "SHA256"
)

List of HashHashType

type ImageBasis

type ImageBasis struct {
	// Required. Immutable. The resource_url for the resource representing the basis of associated occurrence images.
	ResourceUrl string `json:"resourceUrl,omitempty"`
	// Required. Immutable. The fingerprint of the base image.
	Fingerprint *ImageFingerprint `json:"fingerprint,omitempty"`
}

Basis describes the base image portion (Note) of the DockerImage relationship. Linked occurrences are derived from this or an equivalent image via: FROM <Basis.resource_url> Or an equivalent reference, e.g. a tag of the resource_url.

type ImageDerived

type ImageDerived struct {
	// Required. The fingerprint of the derived image.
	Fingerprint *ImageFingerprint `json:"fingerprint,omitempty"`
	// Output only. The number of layers by which this image differs from the associated image basis.
	Distance int32 `json:"distance,omitempty"`
	// This contains layer-specific metadata, if populated it has length \"distance\" and is ordered with [distance] being the layer immediately following the base image and [1] being the final layer.
	LayerInfo []ImageLayer `json:"layer_info,omitempty"`
	// Output only. This contains the base image URL for the derived image occurrence.
	BaseResourceUrl string `json:"base_resource_url,omitempty"`
}

Derived describes the derived image portion (Occurrence) of the DockerImage relationship. This image would be produced from a Dockerfile with FROM <DockerImage.Basis in attached Note>.

type ImageFingerprint

type ImageFingerprint struct {
	// Required. The layer ID of the final layer in the Docker image's v1 representation.
	V1Name string `json:"v1Name,omitempty"`
	// Required. The ordered list of v2 blobs that represent a given image.
	V2Blob []string `json:"v2Blob,omitempty"`
	// Output only. The name of the image's v2 blobs computed via:   [bottom] := v2_blob[bottom]   [N] := sha256(v2_blob[N] + \" \" + v2_name[N+1]) Only the name of the final blob is kept.
	V2Name string `json:"v2Name,omitempty"`
}

A set of properties that uniquely identify a given Docker image.

type ImageLayer

type ImageLayer struct {
	// Required. The recovered Dockerfile directive used to construct this layer.
	Directive *LayerDirective `json:"directive,omitempty"`
	// The recovered arguments to the Dockerfile directive.
	Arguments string `json:"arguments,omitempty"`
}

Layer holds metadata specific to a layer of a Docker image.

type InTotoArtifactRule

type InTotoArtifactRule struct {
	ArtifactRule []string `json:"artifactRule,omitempty"`
}

type IntotoInToto

type IntotoInToto struct {
	// This field identifies the name of the step in the supply chain.
	StepName string `json:"stepName,omitempty"`
	// This field contains the public keys that can be used to verify the signatures on the step metadata.
	SigningKeys []IntotoSigningKey `json:"signingKeys,omitempty"`
	// The following fields contain in-toto artifact rules identifying the artifacts that enter this supply chain step, and exit the supply chain step, i.e. materials and products of the step.
	ExpectedMaterials []InTotoArtifactRule `json:"expectedMaterials,omitempty"`
	ExpectedProducts  []InTotoArtifactRule `json:"expectedProducts,omitempty"`
	// This field contains the expected command used to perform the step.
	ExpectedCommand []string `json:"expectedCommand,omitempty"`
	// This field contains a value that indicates the minimum number of keys that need to be used to sign the step's in-toto link.
	Threshold string `json:"threshold,omitempty"`
}

This contains the fields corresponding to the definition of a software supply chain step in an in-toto layout. This information goes into a Grafeas note.

type IntotoLink struct {
	EffectiveCommand []string             `json:"effective_command,omitempty"`
	Materials        []IntotoLinkArtifact `json:"materials,omitempty"`
	// Products are the supply chain artifacts generated as a result of the step. The structure is identical to that of materials.
	Products []IntotoLinkArtifact `json:"products,omitempty"`
	// ByProducts are data generated as part of a software supply chain step, but are not the actual result of the step.
	Byproducts  *LinkByProducts  `json:"byproducts,omitempty"`
	Environment *LinkEnvironment `json:"environment,omitempty"`
}

This corresponds to an in-toto link.

type IntotoLinkArtifact

type IntotoLinkArtifact struct {
	ResourceUri string              `json:"resource_uri,omitempty"`
	Hashes      *LinkArtifactHashes `json:"hashes,omitempty"`
}

type IntotoSigningKey

type IntotoSigningKey struct {
	// key_id is an identifier for the signing key.
	KeyId string `json:"keyId,omitempty"`
	// This field identifies the specific signing method. Eg: \"rsa\", \"ed25519\", and \"ecdsa\".
	KeyType string `json:"keyType,omitempty"`
	// This field contains the actual public key.
	PublicKeyValue string `json:"publicKeyValue,omitempty"`
	// This field contains the corresponding signature scheme. Eg: \"rsassa-pss-sha256\".
	KeyScheme string `json:"keyScheme,omitempty"`
}

This defines the format used to record keys used in the software supply chain. An in-toto link is attested using one or more keys defined in the in-toto layout. An example of this is: { \"key_id\": \"776a00e29f3559e0141b3b096f696abc6cfb0c657ab40f441132b345b0...\", \"key_type\": \"rsa\", \"public_key_value\": \"-----BEGIN PUBLIC KEY-----\\nMIIBojANBgkqhkiG9w0B...\", \"key_scheme\": \"rsassa-pss-sha256\" } The format for in-toto's key definition can be found in section 4.2 of the in-toto specification.

type LayerDirective

type LayerDirective string

LayerDirective : Instructions from Dockerfile. - DIRECTIVE_UNSPECIFIED: Default value for unsupported/missing directive. - MAINTAINER: https://docs.docker.com/engine/reference/builder/ - RUN: https://docs.docker.com/engine/reference/builder/ - CMD: https://docs.docker.com/engine/reference/builder/ - LABEL: https://docs.docker.com/engine/reference/builder/ - EXPOSE: https://docs.docker.com/engine/reference/builder/ - ENV: https://docs.docker.com/engine/reference/builder/ - ADD: https://docs.docker.com/engine/reference/builder/ - COPY: https://docs.docker.com/engine/reference/builder/ - ENTRYPOINT: https://docs.docker.com/engine/reference/builder/ - VOLUME: https://docs.docker.com/engine/reference/builder/ - USER: https://docs.docker.com/engine/reference/builder/ - WORKDIR: https://docs.docker.com/engine/reference/builder/ - ARG: https://docs.docker.com/engine/reference/builder/ - ONBUILD: https://docs.docker.com/engine/reference/builder/ - STOPSIGNAL: https://docs.docker.com/engine/reference/builder/ - HEALTHCHECK: https://docs.docker.com/engine/reference/builder/ - SHELL: https://docs.docker.com/engine/reference/builder/

const (
	DIRECTIVE_UNSPECIFIED_LayerDirective LayerDirective = "DIRECTIVE_UNSPECIFIED"
	MAINTAINER_LayerDirective            LayerDirective = "MAINTAINER"
	RUN_LayerDirective                   LayerDirective = "RUN"
	CMD_LayerDirective                   LayerDirective = "CMD"
	LABEL_LayerDirective                 LayerDirective = "LABEL"
	EXPOSE_LayerDirective                LayerDirective = "EXPOSE"
	ENV_LayerDirective                   LayerDirective = "ENV"
	ADD_LayerDirective                   LayerDirective = "ADD"
	COPY_LayerDirective                  LayerDirective = "COPY"
	ENTRYPOINT_LayerDirective            LayerDirective = "ENTRYPOINT"
	VOLUME_LayerDirective                LayerDirective = "VOLUME"
	USER_LayerDirective                  LayerDirective = "USER"
	WORKDIR_LayerDirective               LayerDirective = "WORKDIR"
	ARG_LayerDirective                   LayerDirective = "ARG"
	ONBUILD_LayerDirective               LayerDirective = "ONBUILD"
	STOPSIGNAL_LayerDirective            LayerDirective = "STOPSIGNAL"
	HEALTHCHECK_LayerDirective           LayerDirective = "HEALTHCHECK"
	SHELL_LayerDirective                 LayerDirective = "SHELL"
)

List of LayerDirective

type LinkArtifactHashes

type LinkArtifactHashes struct {
	Sha256 string `json:"sha256,omitempty"`
}

Defines a hash object for use in Materials and Products.

type LinkByProducts

type LinkByProducts struct {
	CustomValues map[string]string `json:"custom_values,omitempty"`
}

Defines an object for the byproducts field in in-toto links. The suggested fields are \"stderr\", \"stdout\", and \"return-value\".

type LinkEnvironment

type LinkEnvironment struct {
	CustomValues map[string]string `json:"custom_values,omitempty"`
}

Defines an object for the environment field in in-toto links. The suggested fields are \"variables\", \"filesystem\", and \"workdir\".

type ListNoteOccurrencesOpts

type ListNoteOccurrencesOpts struct {
	Filter    optional.String
	PageSize  optional.Int32
	PageToken optional.String
}

type ListNotesOpts

type ListNotesOpts struct {
	Filter    optional.String
	PageSize  optional.Int32
	PageToken optional.String
}

type ListOccurrencesOpts

type ListOccurrencesOpts struct {
	Filter    optional.String
	PageSize  optional.Int32
	PageToken optional.String
}

type PackageArchitecture

type PackageArchitecture string

PackageArchitecture : Instruction set architectures supported by various package managers. - ARCHITECTURE_UNSPECIFIED: Unknown architecture. - X86: X86 architecture. - X64: X64 architecture.

const (
	ARCHITECTURE_UNSPECIFIED_PackageArchitecture PackageArchitecture = "ARCHITECTURE_UNSPECIFIED"
	X86_PackageArchitecture                      PackageArchitecture = "X86"
	X64_PackageArchitecture                      PackageArchitecture = "X64"
)

List of packageArchitecture

type PackageDistribution

type PackageDistribution struct {
	// Required. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package.
	CpeUri string `json:"cpeUri,omitempty"`
	// The CPU architecture for which packages in this distribution channel were built.
	Architecture *PackageArchitecture `json:"architecture,omitempty"`
	// The latest available version of this package in this distribution channel.
	LatestVersion *PackageVersion `json:"latestVersion,omitempty"`
	// A freeform string denoting the maintainer of this package.
	Maintainer string `json:"maintainer,omitempty"`
	// The distribution channel-specific homepage for this package.
	Url string `json:"url,omitempty"`
	// The distribution channel-specific description of this package.
	Description string `json:"description,omitempty"`
}

This represents a particular channel of distribution for a given package. E.g., Debian's jessie-backports dpkg mirror.

type PackageInstallation

type PackageInstallation struct {
	// Output only. The name of the installed package.
	Name string `json:"name,omitempty"`
	// Required. All of the places within the filesystem versions of this package have been found.
	Location []V1beta1packageLocation `json:"location,omitempty"`
}

This represents how a particular software package may be installed on a system.

type PackagePackage

type PackagePackage struct {
	// Required. Immutable. The name of the package.
	Name string `json:"name,omitempty"`
	// The various channels by which a package is distributed.
	Distribution []PackageDistribution `json:"distribution,omitempty"`
}

This represents a particular package that is distributed over various channels. E.g., glibc (aka libc6) is distributed by many, at various versions.

type PackageVersion

type PackageVersion struct {
	// Used to correct mistakes in the version numbering scheme.
	Epoch int32 `json:"epoch,omitempty"`
	// Required only when version kind is NORMAL. The main part of the version name.
	Name string `json:"name,omitempty"`
	// The iteration of the package build from the above version.
	Revision string `json:"revision,omitempty"`
	// Required. Distinguishes between sentinel MIN/MAX versions and normal versions.
	Kind *VersionVersionKind `json:"kind,omitempty"`
}

Version contains structured information about the version of a package.

type ProtobufAny

type ProtobufAny struct {
	// A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted).  In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:  * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][]   value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the   URL, or have them precompiled into a binary to avoid any   lookup. Therefore, binary compatibility needs to be preserved   on changes to types. (Use versioned type names to manage   breaking changes.)  Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.  Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
	TypeUrl string `json:"type_url,omitempty"`
	// Must be a valid serialized protocol buffer of the above specified type.
	Value string `json:"value,omitempty"`
}

`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }

type ProtobufFieldMask

type ProtobufFieldMask struct {
	// The set of field mask paths.
	Paths []string `json:"paths,omitempty"`
}

paths: \"f.a\" paths: \"f.b.d\" Here `f` represents a field in some root message, `a` and `b` fields in the message found in `f`, and `d` a field found in the message in `f.b`. Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below). # Field Masks in Projections When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows: f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8 The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output): f { a : 22 b { d : 1 } } A repeated field is not allowed except at the last position of a paths string. If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified). Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs. # Field Masks in Update Operations A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask. If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a `paths` string. If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource. For example, given the target message: f { b { d: 1 x: 2 } c: [1] } And an update message: f { b { d: 10 } c: [2] } then if the field mask is: paths: [\"f.b\", \"f.c\"] then the result will be: f { b { d: 10 x: 2 } c: [1, 2] } An implementation may provide options to override this default behavior for repeated and message fields. In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below. If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not. As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API. ## Considerations for HTTP REST The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates). # JSON Encoding of Field Masks In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions. As an example, consider the following message declarations: message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } In proto a field mask for `Profile` may look as such: mask { paths: \"user.display_name\" paths: \"photo\" } In JSON, the same mask is represented as below: { mask: \"user.displayName,photo\" } # Field Masks and Oneof Fields Field masks treat fields in oneofs just as regular fields. Consider the following message: message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } } The field mask can be: mask { paths: \"name\" } Or: mask { paths: \"sub_message\" } Note that oneof type names (\"test_oneof\" in this case) cannot be used in paths. ## Field Mask Verification The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an `INVALID_ARGUMENT` error if any path is duplicated or unmappable.

type ProvenanceBuildProvenance

type ProvenanceBuildProvenance struct {
	// Required. Unique identifier of the build.
	Id string `json:"id,omitempty"`
	// ID of the project.
	ProjectId string `json:"project_id,omitempty"`
	// Commands requested by the build.
	Commands []ProvenanceCommand `json:"commands,omitempty"`
	// Output of the build.
	BuiltArtifacts []V1beta1provenanceArtifact `json:"built_artifacts,omitempty"`
	// Time at which the build was created.
	CreateTime time.Time `json:"create_time,omitempty"`
	// Time at which execution of the build was started.
	StartTime time.Time `json:"start_time,omitempty"`
	// Time at which execution of the build was finished.
	EndTime time.Time `json:"end_time,omitempty"`
	// E-mail address of the user who initiated this build. Note that this was the user's e-mail address at the time the build was initiated; this address may not represent the same end-user for all time.
	Creator string `json:"creator,omitempty"`
	// URI where any logs for this provenance were written.
	LogsUri string `json:"logs_uri,omitempty"`
	// Details of the Source input to the build.
	SourceProvenance *ProvenanceSource `json:"source_provenance,omitempty"`
	// Trigger identifier if the build was triggered automatically; empty if not.
	TriggerId string `json:"trigger_id,omitempty"`
	// Special options applied to this build. This is a catch-all field where build providers can enter any desired additional details.
	BuildOptions map[string]string `json:"build_options,omitempty"`
	// Version string of the builder at the time this build was executed.
	BuilderVersion string `json:"builder_version,omitempty"`
}

Provenance of a build. Contains all information needed to verify the full details about the build from source to completion.

type ProvenanceCommand

type ProvenanceCommand struct {
	// Required. Name of the command, as presented on the command line, or if the command is packaged as a Docker container, as presented to `docker pull`.
	Name string `json:"name,omitempty"`
	// Environment variables set before running this command.
	Env []string `json:"env,omitempty"`
	// Command-line arguments used when executing this command.
	Args []string `json:"args,omitempty"`
	// Working directory (relative to project source root) used when running this command.
	Dir string `json:"dir,omitempty"`
	// Optional unique identifier for this command, used in wait_for to reference this command as a dependency.
	Id string `json:"id,omitempty"`
	// The ID(s) of the command(s) that this command depends on.
	WaitFor []string `json:"wait_for,omitempty"`
}

Command describes a step performed as part of the build pipeline.

type ProvenanceFileHashes

type ProvenanceFileHashes struct {
	// Required. Collection of file hashes.
	FileHash []ProvenanceHash `json:"file_hash,omitempty"`
}

Container message for hashes of byte content of files, used in source messages to verify integrity of source input to the build.

type ProvenanceHash

type ProvenanceHash struct {
	// Required. The type of hash that was performed.
	Type_ *HashHashType `json:"type,omitempty"`
	// Required. The hash value.
	Value string `json:"value,omitempty"`
}

Container message for hash values.

type ProvenanceSource

type ProvenanceSource struct {
	// If provided, the input binary artifacts for the build came from this location.
	ArtifactStorageSourceUri string `json:"artifact_storage_source_uri,omitempty"`
	// Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build.  The keys to this map are file paths used as build source and the values contain the hash values for those files.  If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.
	FileHashes map[string]ProvenanceFileHashes `json:"file_hashes,omitempty"`
	// If provided, the source code used for the build came from this location.
	Context *SourceSourceContext `json:"context,omitempty"`
	// If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.
	AdditionalContexts []SourceSourceContext `json:"additional_contexts,omitempty"`
}

Source describes the location of the source used for the build.

type RpcStatus

type RpcStatus struct {
	// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
	Code int32 `json:"code,omitempty"`
	// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
	Message string `json:"message,omitempty"`
	// A list of messages that carry the error details.  There is a common set of message types for APIs to use.
	Details []ProtobufAny `json:"details,omitempty"`
}

- Simple to use and understand for most users - Flexible enough to meet unexpected needs # Overview The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions. # Language mapping The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C. # Other uses The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments. Example uses of this error model include: - Partial errors. If a service needs to return partial errors to the client, it may embed the `Status` in the normal response to indicate the partial errors. - Workflow errors. A typical workflow has multiple steps. Each step may have a `Status` message for error reporting. - Batch operations. If a client uses batch request and batch response, the `Status` message should be used directly inside batch response, one for each error sub-response. - Asynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the `Status` message. - Logging. If some API errors are stored in logs, the message `Status` could be used directly after any stripping needed for security/privacy reasons.

type SourceAliasContext

type SourceAliasContext struct {
	// The alias kind.
	Kind *AliasContextKind `json:"kind,omitempty"`
	// The alias name.
	Name string `json:"name,omitempty"`
}

An alias to a repo revision.

type SourceCloudRepoSourceContext

type SourceCloudRepoSourceContext struct {
	// The ID of the repo.
	RepoId *SourceRepoId `json:"repo_id,omitempty"`
	// A revision ID.
	RevisionId string `json:"revision_id,omitempty"`
	// An alias, which may be a branch or tag.
	AliasContext *SourceAliasContext `json:"alias_context,omitempty"`
}

A CloudRepoSourceContext denotes a particular revision in a Google Cloud Source Repo.

type SourceGerritSourceContext

type SourceGerritSourceContext struct {
	// The URI of a running Gerrit instance.
	HostUri string `json:"host_uri,omitempty"`
	// The full project name within the host. Projects may be nested, so \"project/subproject\" is a valid project name. The \"repo name\" is the hostURI/project.
	GerritProject string `json:"gerrit_project,omitempty"`
	// A revision (commit) ID.
	RevisionId string `json:"revision_id,omitempty"`
	// An alias, which may be a branch or tag.
	AliasContext *SourceAliasContext `json:"alias_context,omitempty"`
}

A SourceContext referring to a Gerrit project.

type SourceGitSourceContext

type SourceGitSourceContext struct {
	// Git repository URL.
	Url string `json:"url,omitempty"`
	// Git commit hash.
	RevisionId string `json:"revision_id,omitempty"`
}

A GitSourceContext denotes a particular revision in a third party Git repository (e.g., GitHub).

type SourceProjectRepoId

type SourceProjectRepoId struct {
	// The ID of the project.
	ProjectId string `json:"project_id,omitempty"`
	// The name of the repo. Leave empty for the default repo.
	RepoName string `json:"repo_name,omitempty"`
}

Selects a repo using a Google Cloud Platform project ID (e.g., winged-cargo-31) and a repo name within that project.

type SourceRepoId

type SourceRepoId struct {
	// A combination of a project ID and a repo name.
	ProjectRepoId *SourceProjectRepoId `json:"project_repo_id,omitempty"`
	// A server-assigned, globally unique identifier.
	Uid string `json:"uid,omitempty"`
}

A unique identifier for a Cloud Repo.

type SourceSourceContext

type SourceSourceContext struct {
	// A SourceContext referring to a revision in a Google Cloud Source Repo.
	CloudRepo *SourceCloudRepoSourceContext `json:"cloud_repo,omitempty"`
	// A SourceContext referring to a Gerrit project.
	Gerrit *SourceGerritSourceContext `json:"gerrit,omitempty"`
	// A SourceContext referring to any third party Git repo (e.g., GitHub).
	Git *SourceGitSourceContext `json:"git,omitempty"`
	// Labels with user defined metadata.
	Labels map[string]string `json:"labels,omitempty"`
}

A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory.

type V1beta1BatchCreateNotesRequest

type V1beta1BatchCreateNotesRequest struct {
	// The name of the project in the form of `projects/[PROJECT_ID]`, under which the notes are to be created.
	Parent string `json:"parent,omitempty"`
	// The notes to create. Max allowed length is 1000.
	Notes map[string]V1beta1Note `json:"notes,omitempty"`
}

Request to create notes in batch.

type V1beta1BatchCreateNotesResponse

type V1beta1BatchCreateNotesResponse struct {
	// The notes that were created.
	Notes []V1beta1Note `json:"notes,omitempty"`
}

Response for creating notes in batch.

type V1beta1BatchCreateOccurrencesRequest

type V1beta1BatchCreateOccurrencesRequest struct {
	// The name of the project in the form of `projects/[PROJECT_ID]`, under which the occurrences are to be created.
	Parent string `json:"parent,omitempty"`
	// The occurrences to create. Max allowed length is 1000.
	Occurrences []V1beta1Occurrence `json:"occurrences,omitempty"`
}

Request to create occurrences in batch.

type V1beta1BatchCreateOccurrencesResponse

type V1beta1BatchCreateOccurrencesResponse struct {
	// The occurrences that were created.
	Occurrences []V1beta1Occurrence `json:"occurrences,omitempty"`
}

Response for creating occurrences in batch.

type V1beta1ListNoteOccurrencesResponse

type V1beta1ListNoteOccurrencesResponse struct {
	// The occurrences attached to the specified note.
	Occurrences []V1beta1Occurrence `json:"occurrences,omitempty"`
	// Token to provide to skip to a particular spot in the list.
	NextPageToken string `json:"next_page_token,omitempty"`
}

Response for listing occurrences for a note.

type V1beta1ListNotesResponse

type V1beta1ListNotesResponse struct {
	// The notes requested.
	Notes []V1beta1Note `json:"notes,omitempty"`
	// The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results.
	NextPageToken string `json:"next_page_token,omitempty"`
}

Response for listing notes.

type V1beta1ListOccurrencesResponse

type V1beta1ListOccurrencesResponse struct {
	// The occurrences requested.
	Occurrences []V1beta1Occurrence `json:"occurrences,omitempty"`
	// The next pagination token in the list response. It should be used as `page_token` for the following request. An empty value means no more results.
	NextPageToken string `json:"next_page_token,omitempty"`
}

Response for listing occurrences.

type V1beta1Note

type V1beta1Note struct {
	// Output only. The name of the note in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`.
	Name string `json:"name,omitempty"`
	// A one sentence description of this note.
	ShortDescription string `json:"shortDescription,omitempty"`
	// A detailed description of this note.
	LongDescription string `json:"longDescription,omitempty"`
	// Output only. The type of analysis. This field can be used as a filter in list requests.
	Kind *V1beta1NoteKind `json:"kind,omitempty"`
	// URLs associated with this note.
	RelatedUrl []V1beta1RelatedUrl `json:"relatedUrl,omitempty"`
	// Time of expiration for this note. Empty if note does not expire.
	ExpirationTime time.Time `json:"expirationTime,omitempty"`
	// Output only. The time this note was created. This field can be used as a filter in list requests.
	CreateTime time.Time `json:"createTime,omitempty"`
	// Output only. The time this note was last updated. This field can be used as a filter in list requests.
	UpdateTime time.Time `json:"updateTime,omitempty"`
	// Other notes related to this note.
	RelatedNoteNames []string `json:"relatedNoteNames,omitempty"`
	// A note describing a package vulnerability.
	Vulnerability *VulnerabilityVulnerability `json:"vulnerability,omitempty"`
	// A note describing build provenance for a verifiable build.
	Build *BuildBuild `json:"build,omitempty"`
	// A note describing a base image.
	BaseImage *ImageBasis `json:"baseImage,omitempty"`
	// A note describing a package hosted by various package managers.
	Package_ *PackagePackage `json:"package,omitempty"`
	// A note describing something that can be deployed.
	Deployable *DeploymentDeployable `json:"deployable,omitempty"`
	// A note describing the initial analysis of a resource.
	Discovery *DiscoveryDiscovery `json:"discovery,omitempty"`
	// A note describing an attestation role.
	AttestationAuthority *AttestationAuthority `json:"attestationAuthority,omitempty"`
	// A note describing an in-toto link.
	Intoto *IntotoInToto `json:"intoto,omitempty"`
}

A type of analysis that can be done for a resource.

type V1beta1NoteKind

type V1beta1NoteKind string

V1beta1NoteKind : Kind represents the kinds of notes supported. - NOTE_KIND_UNSPECIFIED: Unknown. - VULNERABILITY: The note and occurrence represent a package vulnerability. - BUILD: The note and occurrence assert build provenance. - IMAGE: This represents an image basis relationship. - PACKAGE: This represents a package installed via a package manager. - DEPLOYMENT: The note and occurrence track deployment events. - DISCOVERY: The note and occurrence track the initial discovery status of a resource. - ATTESTATION: This represents a logical \"role\" that can attest to artifacts. - INTOTO: This represents an in-toto link.

const (
	NOTE_KIND_UNSPECIFIED_V1beta1NoteKind V1beta1NoteKind = "NOTE_KIND_UNSPECIFIED"
	VULNERABILITY_V1beta1NoteKind         V1beta1NoteKind = "VULNERABILITY"
	BUILD_V1beta1NoteKind                 V1beta1NoteKind = "BUILD"
	IMAGE_V1beta1NoteKind                 V1beta1NoteKind = "IMAGE"
	PACKAGE__V1beta1NoteKind              V1beta1NoteKind = "PACKAGE"
	DEPLOYMENT_V1beta1NoteKind            V1beta1NoteKind = "DEPLOYMENT"
	DISCOVERY_V1beta1NoteKind             V1beta1NoteKind = "DISCOVERY"
	ATTESTATION_V1beta1NoteKind           V1beta1NoteKind = "ATTESTATION"
	INTOTO_V1beta1NoteKind                V1beta1NoteKind = "INTOTO"
)

List of v1beta1NoteKind

type V1beta1Occurrence

type V1beta1Occurrence struct {
	// Output only. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.
	Name string `json:"name,omitempty"`
	// Required. Immutable. The resource for which the occurrence applies.
	Resource *V1beta1Resource `json:"resource,omitempty"`
	// Required. Immutable. The analysis note associated with this occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used as a filter in list requests.
	NoteName string `json:"note_name,omitempty"`
	// Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests.
	Kind *V1beta1NoteKind `json:"kind,omitempty"`
	// A description of actions that can be taken to remedy the note.
	Remediation string `json:"remediation,omitempty"`
	// Output only. The time this occurrence was created.
	CreateTime time.Time `json:"create_time,omitempty"`
	// Output only. The time this occurrence was last updated.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Describes a security vulnerability.
	Vulnerability *V1beta1vulnerabilityDetails `json:"vulnerability,omitempty"`
	// Describes a verifiable build.
	Build *V1beta1buildDetails `json:"build,omitempty"`
	// Describes how this resource derives from the basis in the associated note.
	DerivedImage *V1beta1imageDetails `json:"derived_image,omitempty"`
	// Describes the installation of a package on the linked resource.
	Installation *V1beta1packageDetails `json:"installation,omitempty"`
	// Describes the deployment of an artifact on a runtime.
	Deployment *V1beta1deploymentDetails `json:"deployment,omitempty"`
	// Describes when a resource was discovered.
	Discovered *V1beta1discoveryDetails `json:"discovered,omitempty"`
	// Describes an attestation of an artifact.
	Attestation *V1beta1attestationDetails `json:"attestation,omitempty"`
	// Describes a specific in-toto link.
	Intoto *V1beta1intotoDetails `json:"intoto,omitempty"`
}

An instance of an analysis type that has been found on a resource.

type V1beta1RelatedUrl

type V1beta1RelatedUrl struct {
	// Specific URL associated with the resource.
	Url string `json:"url,omitempty"`
	// Label to describe usage of the URL.
	Label string `json:"label,omitempty"`
}

Metadata for any related URL information.

type V1beta1Resource

type V1beta1Resource struct {
	// Deprecated, do not use. Use uri instead.  The name of the resource. For example, the name of a Docker image - \"Debian\".
	Name string `json:"name,omitempty"`
	// Required. The unique URI of the resource. For example, `https://gcr.io/project/image@sha256:foo` for a Docker image.
	Uri string `json:"uri,omitempty"`
	// Deprecated, do not use. Use uri instead.  The hash of the resource content. For example, the Docker digest.
	ContentHash *ProvenanceHash `json:"content_hash,omitempty"`
}

An entity that can have metadata. For example, a Docker image.

type V1beta1VulnerabilityOccurrencesSummary

type V1beta1VulnerabilityOccurrencesSummary struct {
	// A listing by resource of the number of fixable and total vulnerabilities.
	Counts []VulnerabilityOccurrencesSummaryFixableTotalByDigest `json:"counts,omitempty"`
}

A summary of how many vulnerability occurrences there are per resource and severity type.

type V1beta1attestationDetails

type V1beta1attestationDetails struct {
	// Required. Attestation for the resource.
	Attestation *AttestationAttestation `json:"attestation,omitempty"`
}

Details of an attestation occurrence.

type V1beta1buildDetails

type V1beta1buildDetails struct {
	// Required. The actual provenance for the build.
	Provenance *ProvenanceBuildProvenance `json:"provenance,omitempty"`
	// Serialized JSON representation of the provenance, used in generating the build signature in the corresponding build note. After verifying the signature, `provenance_bytes` can be unmarshalled and compared to the provenance to confirm that it is unchanged. A base64-encoded string representation of the provenance bytes is used for the signature in order to interoperate with openssl which expects this format for signature verification.  The serialized form is captured both to avoid ambiguity in how the provenance is marshalled to json as well to prevent incompatibilities with future changes.
	ProvenanceBytes string `json:"provenance_bytes,omitempty"`
}

Details of a build occurrence.

type V1beta1deploymentDetails

type V1beta1deploymentDetails struct {
	// Required. Deployment history for the resource.
	Deployment *DeploymentDeployment `json:"deployment,omitempty"`
}

Details of a deployment occurrence.

type V1beta1discoveryDetails

type V1beta1discoveryDetails struct {
	// Required. Analysis status for the discovered resource.
	Discovered *DiscoveryDiscovered `json:"discovered,omitempty"`
}

Details of a discovery occurrence.

type V1beta1imageDetails

type V1beta1imageDetails struct {
	// Required. Immutable. The child image derived from the base image.
	DerivedImage *ImageDerived `json:"derived_image,omitempty"`
}

Details of an image occurrence.

type V1beta1intotoDetails

type V1beta1intotoDetails struct {
	Signatures []V1beta1intotoSignature `json:"signatures,omitempty"`
	Link       *IntotoLink              `json:"link,omitempty"`
}

This corresponds to a signed in-toto link - it is made up of one or more signatures and the in-toto link itself. This is used for occurrences of a Grafeas in-toto note.

type V1beta1intotoSignature

type V1beta1intotoSignature struct {
	KeyId     string `json:"key_id,omitempty"`
	Signature string `json:"signature,omitempty"`
}

A signature object consists of the KeyID used and the signature itself.

type V1beta1packageDetails

type V1beta1packageDetails struct {
	// Required. Where the package was installed.
	Installation *PackageInstallation `json:"installation,omitempty"`
}

Details of a package occurrence.

type V1beta1packageLocation

type V1beta1packageLocation struct {
	// Required. The CPE URI in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package.
	CpeUri string `json:"cpe_uri,omitempty"`
	// The version installed at this location.
	Version *PackageVersion `json:"version,omitempty"`
	// The path from which we gathered that this package/version is installed.
	Path string `json:"path,omitempty"`
}

An occurrence of a particular package installation found within a system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.

type V1beta1provenanceArtifact

type V1beta1provenanceArtifact struct {
	// Hash or checksum value of a binary, or Docker Registry 2.0 digest of a container.
	Checksum string `json:"checksum,omitempty"`
	// Artifact ID, if any; for container images, this will be a URL by digest like `gcr.io/projectID/imagename@sha256:123456`.
	Id string `json:"id,omitempty"`
	// Related artifact names. This may be the path to a binary or jar file, or in the case of a container build, the name used to push the container image to Google Container Registry, as presented to `docker push`. Note that a single Artifact ID can have multiple names, for example if two tags are applied to one image.
	Names []string `json:"names,omitempty"`
}

Artifact describes a build product.

type V1beta1vulnerabilityDetails

type V1beta1vulnerabilityDetails struct {
	Type_ string `json:"type,omitempty"`
	// Output only. The note provider assigned Severity of the vulnerability.
	Severity *VulnerabilitySeverity `json:"severity,omitempty"`
	// Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0-10 where 0 indicates low severity and 10 indicates high severity.
	CvssScore float32 `json:"cvss_score,omitempty"`
	// Required. The set of affected locations and their fixes (if available) within the associated resource.
	PackageIssue []VulnerabilityPackageIssue `json:"package_issue,omitempty"`
	// Output only. A one sentence description of this vulnerability.
	ShortDescription string `json:"short_description,omitempty"`
	// Output only. A detailed description of this vulnerability.
	LongDescription string `json:"long_description,omitempty"`
	// Output only. URLs related to this vulnerability.
	RelatedUrls []V1beta1RelatedUrl `json:"related_urls,omitempty"`
	// The distro assigned severity for this vulnerability when it is available, and note provider assigned severity when distro has not yet assigned a severity for this vulnerability.
	EffectiveSeverity *VulnerabilitySeverity `json:"effective_severity,omitempty"`
}

Details of a vulnerability Occurrence.

type VersionVersionKind

type VersionVersionKind string

VersionVersionKind : Whether this is an ordinary package version or a sentinel MIN/MAX version. - VERSION_KIND_UNSPECIFIED: Unknown. - NORMAL: A standard package version. - MINIMUM: A special version representing negative infinity. - MAXIMUM: A special version representing positive infinity.

const (
	VERSION_KIND_UNSPECIFIED_VersionVersionKind VersionVersionKind = "VERSION_KIND_UNSPECIFIED"
	NORMAL_VersionVersionKind                   VersionVersionKind = "NORMAL"
	MINIMUM_VersionVersionKind                  VersionVersionKind = "MINIMUM"
	MAXIMUM_VersionVersionKind                  VersionVersionKind = "MAXIMUM"
)

List of VersionVersionKind

type VulnerabilityCvsSv3

type VulnerabilityCvsSv3 struct {
	// The base score is a function of the base metric scores.
	BaseScore           float32 `json:"baseScore,omitempty"`
	ExploitabilityScore float32 `json:"exploitabilityScore,omitempty"`
	ImpactScore         float32 `json:"impactScore,omitempty"`
	// Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.
	AttackVector          *CvsSv3AttackVector       `json:"attack_vector,omitempty"`
	AttackComplexity      *CvsSv3AttackComplexity   `json:"attackComplexity,omitempty"`
	PrivilegesRequired    *CvsSv3PrivilegesRequired `json:"privilegesRequired,omitempty"`
	UserInteraction       *CvsSv3UserInteraction    `json:"userInteraction,omitempty"`
	Scope                 *CvsSv3Scope              `json:"scope,omitempty"`
	ConfidentialityImpact *CvsSv3Impact             `json:"confidentialityImpact,omitempty"`
	IntegrityImpact       *CvsSv3Impact             `json:"integrityImpact,omitempty"`
	AvailabilityImpact    *CvsSv3Impact             `json:"availabilityImpact,omitempty"`
}

type VulnerabilityDetail

type VulnerabilityDetail struct {
	// Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar.
	CpeUri string `json:"cpeUri,omitempty"`
	// Required. The name of the package where the vulnerability was found.
	Package_ string `json:"package,omitempty"`
	// The min version of the package in which the vulnerability exists.
	MinAffectedVersion *PackageVersion `json:"minAffectedVersion,omitempty"`
	// The max version of the package in which the vulnerability exists.
	MaxAffectedVersion *PackageVersion `json:"maxAffectedVersion,omitempty"`
	// The severity (eg: distro assigned severity) for this vulnerability.
	SeverityName string `json:"severityNname,omitempty"`
	// A vendor-specific description of this note.
	Description string `json:"description,omitempty"`
	// The fix for this specific package version.
	FixedLocation *VulnerabilityVulnerabilityLocation `json:"fixed_location,omitempty"`
	// The type of package; whether native or non native(ruby gems, node.js packages etc).
	PackageType string `json:"packageType,omitempty"`
	// Whether this detail is obsolete. Occurrences are expected not to point to obsolete details.
	IsObsolete bool `json:"isObsolete,omitempty"`
	// The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker.
	SourceUpdateTime time.Time `json:"sourceUpdateTime,omitempty"`
}

type VulnerabilityOccurrencesSummaryFixableTotalByDigest

type VulnerabilityOccurrencesSummaryFixableTotalByDigest struct {
	// The affected resource.
	Resource *V1beta1Resource `json:"resource,omitempty"`
	// The severity for this count. SEVERITY_UNSPECIFIED indicates total across all severities.
	Severity *VulnerabilitySeverity `json:"severity,omitempty"`
	// The number of fixable vulnerabilities associated with this resource.
	FixableCount string `json:"fixable_count,omitempty"`
	// The total number of vulnerabilities associated with this resource.
	TotalCount string `json:"total_count,omitempty"`
}

Per resource and severity counts of fixable and total vulnerabilities.

type VulnerabilityPackageIssue

type VulnerabilityPackageIssue struct {
	// Required. The location of the vulnerability.
	AffectedLocation *VulnerabilityVulnerabilityLocation `json:"affected_location,omitempty"`
	// The location of the available fix for vulnerability.
	FixedLocation *VulnerabilityVulnerabilityLocation `json:"fixed_location,omitempty"`
	// Deprecated, use Details.effective_severity instead The severity (e.g., distro assigned severity) for this vulnerability.
	SeverityName string `json:"severity_name,omitempty"`
}

This message wraps a location affected by a vulnerability and its associated fix (if one is available).

type VulnerabilitySeverity

type VulnerabilitySeverity string

VulnerabilitySeverity : Note provider-assigned severity/impact ranking. - SEVERITY_UNSPECIFIED: Unknown. - MINIMAL: Minimal severity. - LOW: Low severity. - MEDIUM: Medium severity. - HIGH: High severity. - CRITICAL: Critical severity.

const (
	SEVERITY_UNSPECIFIED_VulnerabilitySeverity VulnerabilitySeverity = "SEVERITY_UNSPECIFIED"
	MINIMAL_VulnerabilitySeverity              VulnerabilitySeverity = "MINIMAL"
	LOW_VulnerabilitySeverity                  VulnerabilitySeverity = "LOW"
	MEDIUM_VulnerabilitySeverity               VulnerabilitySeverity = "MEDIUM"
	HIGH_VulnerabilitySeverity                 VulnerabilitySeverity = "HIGH"
	CRITICAL_VulnerabilitySeverity             VulnerabilitySeverity = "CRITICAL"
)

List of vulnerabilitySeverity

type VulnerabilityVulnerability

type VulnerabilityVulnerability struct {
	// The CVSS score for this vulnerability.
	CvssScore float32 `json:"cvssScore,omitempty"`
	// Note provider assigned impact of the vulnerability.
	Severity *VulnerabilitySeverity `json:"severity,omitempty"`
	// All information about the package to specifically identify this vulnerability. One entry per (version range and cpe_uri) the package vulnerability has manifested in.
	Details []VulnerabilityDetail `json:"details,omitempty"`
	// The full description of the CVSSv3.
	CvssV3 *VulnerabilityCvsSv3 `json:"cvssV3,omitempty"`
	// Windows details get their own format because the information format and model don't match a normal detail. Specifically Windows updates are done as patches, thus Windows vulnerabilities really are a missing package, rather than a package being at an incorrect version.
	WindowsDetails []VulnerabilityWindowsDetail `json:"windowsDetails,omitempty"`
	// The time this information was last changed at the source. This is an upstream timestamp from the underlying information source - e.g. Ubuntu security tracker.
	SourceUpdateTime time.Time `json:"sourceUpdateTime,omitempty"`
}

Vulnerability provides metadata about a security vulnerability in a Note.

type VulnerabilityVulnerabilityLocation

type VulnerabilityVulnerabilityLocation struct {
	// Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) format. Examples include distro or storage location for vulnerable jar.
	CpeUri string `json:"cpeUri,omitempty"`
	// Required. The package being described.
	Package_ string `json:"package,omitempty"`
	// Required. The version of the package being described.
	Version *PackageVersion `json:"version,omitempty"`
}

The location of the vulnerability.

type VulnerabilityWindowsDetail

type VulnerabilityWindowsDetail struct {
	// Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/) in which the vulnerability manifests. Examples include distro or storage location for vulnerable jar.
	CpeUri string `json:"cpeUri,omitempty"`
	// Required. The name of the vulnerability.
	Name string `json:"name,omitempty"`
	// The description of the vulnerability.
	Description string `json:"description,omitempty"`
	// Required. The names of the KBs which have hotfixes to mitigate this vulnerability. Note that there may be multiple hotfixes (and thus multiple KBs) that mitigate a given vulnerability. Currently any listed kb's presence is considered a fix.
	FixingKbs []WindowsDetailKnowledgeBase `json:"fixingKbs,omitempty"`
}

type WindowsDetailKnowledgeBase

type WindowsDetailKnowledgeBase struct {
	// The KB name (generally of the form KB[0-9]+ i.e. KB123456).
	Name string `json:"name,omitempty"`
	Url  string `json:"url,omitempty"`
}

Source Files

Jump to

Keyboard shortcuts

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