buildsecurity

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const BuildSecurityPathPrefix = "/twirp/buildsecurity.BuildSecurity/"

BuildSecurityPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

Variables

View Source
var (
	TriggeredByEnum_name = map[int32]string{
		0: "TRIGGERED_BY_UNKNOWN",
		1: "TRIGGERED_BY_PUSH",
		2: "TRIGGERED_BY_PULL_REQUEST",
		3: "TRIGGERED_BY_OFFLINE",
	}
	TriggeredByEnum_value = map[string]int32{
		"TRIGGERED_BY_UNKNOWN":      0,
		"TRIGGERED_BY_PUSH":         1,
		"TRIGGERED_BY_PULL_REQUEST": 2,
		"TRIGGERED_BY_OFFLINE":      3,
	}
)

Enum value maps for TriggeredByEnum.

View Source
var (
	SeverityEnum_name = map[int32]string{
		0: "SEVERITY_UNKNOWN",
		1: "SEVERITY_LOW",
		2: "SEVERITY_MEDIUM",
		3: "SEVERITY_HIGH",
		4: "SEVERITY_CRITICAL",
		5: "SEVERITY_MAX",
	}
	SeverityEnum_value = map[string]int32{
		"SEVERITY_UNKNOWN":  0,
		"SEVERITY_LOW":      1,
		"SEVERITY_MEDIUM":   2,
		"SEVERITY_HIGH":     3,
		"SEVERITY_CRITICAL": 4,
		"SEVERITY_MAX":      5,
	}
)

Enum value maps for SeverityEnum.

View Source
var (
	PolicyTypeEnum_name = map[int32]string{
		0: "POLICY_TYPE_POLICY",
		1: "POLICY_TYPE_SUPPRESSION",
	}
	PolicyTypeEnum_value = map[string]int32{
		"POLICY_TYPE_POLICY":      0,
		"POLICY_TYPE_SUPPRESSION": 1,
	}
)

Enum value maps for PolicyTypeEnum.

View Source
var (
	ScanTypeEnum_name = map[int32]string{
		0: "SCAN_TYPE_MISCONFIGURATION",
		1: "SCAN_TYPE_VULNERABILITY",
		2: "SCAN_TYPE_SECRET",
	}
	ScanTypeEnum_value = map[string]int32{
		"SCAN_TYPE_MISCONFIGURATION": 0,
		"SCAN_TYPE_VULNERABILITY":    1,
		"SCAN_TYPE_SECRET":           2,
	}
)

Enum value maps for ScanTypeEnum.

View Source
var (
	Result_TypeEnum_name = map[int32]string{
		0: "TYPE_UNKNOWN",
		1: "TYPE_TERRAFORM",
		2: "TYPE_CLOUDFORMATION",
		3: "TYPE_DOCKERFILE",
		4: "TYPE_KUBERNETES",
		5: "TYPE_YAML",
		6: "TYPE_HCL",
		7: "TYPE_VULNERABILITIES",
		8: "TYPE_SECRETS",
		9: "TYPE_HELM",
	}
	Result_TypeEnum_value = map[string]int32{
		"TYPE_UNKNOWN":         0,
		"TYPE_TERRAFORM":       1,
		"TYPE_CLOUDFORMATION":  2,
		"TYPE_DOCKERFILE":      3,
		"TYPE_KUBERNETES":      4,
		"TYPE_YAML":            5,
		"TYPE_HCL":             6,
		"TYPE_VULNERABILITIES": 7,
		"TYPE_SECRETS":         8,
		"TYPE_HELM":            9,
	}
)

Enum value maps for Result_TypeEnum.

View Source
var File_buildsecurity_proto protoreflect.FileDescriptor

Functions

func WriteError

func WriteError(resp http.ResponseWriter, err error)

WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)

Types

type BuildSecurity

func NewBuildSecurityJSONClient

func NewBuildSecurityJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) BuildSecurity

NewBuildSecurityJSONClient creates a JSON client that implements the BuildSecurity interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewBuildSecurityProtobufClient

func NewBuildSecurityProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) BuildSecurity

NewBuildSecurityProtobufClient creates a Protobuf client that implements the BuildSecurity interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type CreateRepositoryReq

type CreateRepositoryReq struct {
	SCMID string `protobuf:"bytes,1,opt,name=SCMID,proto3" json:"SCMID,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRepositoryReq) Descriptor deprecated

func (*CreateRepositoryReq) Descriptor() ([]byte, []int)

Deprecated: Use CreateRepositoryReq.ProtoReflect.Descriptor instead.

func (*CreateRepositoryReq) GetName

func (x *CreateRepositoryReq) GetName() string

func (*CreateRepositoryReq) GetSCMID

func (x *CreateRepositoryReq) GetSCMID() string

func (*CreateRepositoryReq) ProtoMessage

func (*CreateRepositoryReq) ProtoMessage()

func (*CreateRepositoryReq) ProtoReflect

func (x *CreateRepositoryReq) ProtoReflect() protoreflect.Message

func (*CreateRepositoryReq) Reset

func (x *CreateRepositoryReq) Reset()

func (*CreateRepositoryReq) String

func (x *CreateRepositoryReq) String() string

type CreateRepositoryResp

type CreateRepositoryResp struct {
	RepositoryID string `protobuf:"bytes,1,opt,name=RepositoryID,proto3" json:"RepositoryID,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRepositoryResp) Descriptor deprecated

func (*CreateRepositoryResp) Descriptor() ([]byte, []int)

Deprecated: Use CreateRepositoryResp.ProtoReflect.Descriptor instead.

func (*CreateRepositoryResp) GetRepositoryID

func (x *CreateRepositoryResp) GetRepositoryID() string

func (*CreateRepositoryResp) ProtoMessage

func (*CreateRepositoryResp) ProtoMessage()

func (*CreateRepositoryResp) ProtoReflect

func (x *CreateRepositoryResp) ProtoReflect() protoreflect.Message

func (*CreateRepositoryResp) Reset

func (x *CreateRepositoryResp) Reset()

func (*CreateRepositoryResp) String

func (x *CreateRepositoryResp) String() string

type CreateScanReq

type CreateScanReq struct {
	RepositoryID string            `protobuf:"bytes,1,opt,name=RepositoryID,proto3" json:"RepositoryID,omitempty"`
	Branch       string            `protobuf:"bytes,2,opt,name=Branch,proto3" json:"Branch,omitempty"`
	User         string            `protobuf:"bytes,3,opt,name=User,proto3" json:"User,omitempty"`
	System       string            `protobuf:"bytes,4,opt,name=System,proto3" json:"System,omitempty"`
	Commit       string            `protobuf:"bytes,5,opt,name=Commit,proto3" json:"Commit,omitempty"`
	Results      []*Result         `protobuf:"bytes,7,rep,name=Results,proto3" json:"Results,omitempty"`
	Tags         map[string]string `` /* 149-byte string literal not displayed */
	TriggeredBy  TriggeredByEnum   `protobuf:"varint,9,opt,name=TriggeredBy,proto3,enum=buildsecurity.TriggeredByEnum" json:"TriggeredBy,omitempty"`
	Run          string            `protobuf:"bytes,10,opt,name=Run,proto3" json:"Run,omitempty"`
	BuildID      string            `protobuf:"bytes,11,opt,name=BuildID,proto3" json:"BuildID,omitempty"`
	Pipelines    []*Pipeline       `protobuf:"bytes,12,rep,name=Pipelines,proto3" json:"Pipelines,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateScanReq) Descriptor deprecated

func (*CreateScanReq) Descriptor() ([]byte, []int)

Deprecated: Use CreateScanReq.ProtoReflect.Descriptor instead.

func (*CreateScanReq) GetBranch

func (x *CreateScanReq) GetBranch() string

func (*CreateScanReq) GetBuildID added in v0.34.0

func (x *CreateScanReq) GetBuildID() string

func (*CreateScanReq) GetCommit

func (x *CreateScanReq) GetCommit() string

func (*CreateScanReq) GetPipelines added in v0.54.0

func (x *CreateScanReq) GetPipelines() []*Pipeline

func (*CreateScanReq) GetRepositoryID

func (x *CreateScanReq) GetRepositoryID() string

func (*CreateScanReq) GetResults

func (x *CreateScanReq) GetResults() []*Result

func (*CreateScanReq) GetRun added in v0.34.0

func (x *CreateScanReq) GetRun() string

func (*CreateScanReq) GetSystem

func (x *CreateScanReq) GetSystem() string

func (*CreateScanReq) GetTags

func (x *CreateScanReq) GetTags() map[string]string

func (*CreateScanReq) GetTriggeredBy added in v0.24.0

func (x *CreateScanReq) GetTriggeredBy() TriggeredByEnum

func (*CreateScanReq) GetUser

func (x *CreateScanReq) GetUser() string

func (*CreateScanReq) ProtoMessage

func (*CreateScanReq) ProtoMessage()

func (*CreateScanReq) ProtoReflect

func (x *CreateScanReq) ProtoReflect() protoreflect.Message

func (*CreateScanReq) Reset

func (x *CreateScanReq) Reset()

func (*CreateScanReq) String

func (x *CreateScanReq) String() string

type CreateScanResp

type CreateScanResp struct {
	ScanID string `protobuf:"bytes,1,opt,name=ScanID,proto3" json:"ScanID,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateScanResp) Descriptor deprecated

func (*CreateScanResp) Descriptor() ([]byte, []int)

Deprecated: Use CreateScanResp.ProtoReflect.Descriptor instead.

func (*CreateScanResp) GetScanID

func (x *CreateScanResp) GetScanID() string

func (*CreateScanResp) ProtoMessage

func (*CreateScanResp) ProtoMessage()

func (*CreateScanResp) ProtoReflect

func (x *CreateScanResp) ProtoReflect() protoreflect.Message

func (*CreateScanResp) Reset

func (x *CreateScanResp) Reset()

func (*CreateScanResp) String

func (x *CreateScanResp) String() string

type GetPoliciesReq

type GetPoliciesReq struct {
	RepositoryID string `protobuf:"bytes,1,opt,name=RepositoryID,proto3" json:"RepositoryID,omitempty"`
	Branch       string `protobuf:"bytes,2,opt,name=Branch,proto3" json:"Branch,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPoliciesReq) Descriptor deprecated

func (*GetPoliciesReq) Descriptor() ([]byte, []int)

Deprecated: Use GetPoliciesReq.ProtoReflect.Descriptor instead.

func (*GetPoliciesReq) GetBranch added in v0.7.1

func (x *GetPoliciesReq) GetBranch() string

func (*GetPoliciesReq) GetRepositoryID

func (x *GetPoliciesReq) GetRepositoryID() string

func (*GetPoliciesReq) ProtoMessage

func (*GetPoliciesReq) ProtoMessage()

func (*GetPoliciesReq) ProtoReflect

func (x *GetPoliciesReq) ProtoReflect() protoreflect.Message

func (*GetPoliciesReq) Reset

func (x *GetPoliciesReq) Reset()

func (*GetPoliciesReq) String

func (x *GetPoliciesReq) String() string

type GetPoliciesResp

type GetPoliciesResp struct {
	Policies []*Policy `protobuf:"bytes,1,rep,name=Policies,proto3" json:"Policies,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPoliciesResp) Descriptor deprecated

func (*GetPoliciesResp) Descriptor() ([]byte, []int)

Deprecated: Use GetPoliciesResp.ProtoReflect.Descriptor instead.

func (*GetPoliciesResp) GetPolicies

func (x *GetPoliciesResp) GetPolicies() []*Policy

func (*GetPoliciesResp) ProtoMessage

func (*GetPoliciesResp) ProtoMessage()

func (*GetPoliciesResp) ProtoReflect

func (x *GetPoliciesResp) ProtoReflect() protoreflect.Message

func (*GetPoliciesResp) Reset

func (x *GetPoliciesResp) Reset()

func (*GetPoliciesResp) String

func (x *GetPoliciesResp) String() string

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.

HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.

type LookupRepositoryReq

type LookupRepositoryReq struct {
	SCMID string `protobuf:"bytes,1,opt,name=SCMID,proto3" json:"SCMID,omitempty"`
	// contains filtered or unexported fields
}

func (*LookupRepositoryReq) Descriptor deprecated

func (*LookupRepositoryReq) Descriptor() ([]byte, []int)

Deprecated: Use LookupRepositoryReq.ProtoReflect.Descriptor instead.

func (*LookupRepositoryReq) GetSCMID

func (x *LookupRepositoryReq) GetSCMID() string

func (*LookupRepositoryReq) ProtoMessage

func (*LookupRepositoryReq) ProtoMessage()

func (*LookupRepositoryReq) ProtoReflect

func (x *LookupRepositoryReq) ProtoReflect() protoreflect.Message

func (*LookupRepositoryReq) Reset

func (x *LookupRepositoryReq) Reset()

func (*LookupRepositoryReq) String

func (x *LookupRepositoryReq) String() string

type LookupRepositoryResp

type LookupRepositoryResp struct {
	RepositoryID string `protobuf:"bytes,2,opt,name=RepositoryID,proto3" json:"RepositoryID,omitempty"`
	// contains filtered or unexported fields
}

func (*LookupRepositoryResp) Descriptor deprecated

func (*LookupRepositoryResp) Descriptor() ([]byte, []int)

Deprecated: Use LookupRepositoryResp.ProtoReflect.Descriptor instead.

func (*LookupRepositoryResp) GetRepositoryID

func (x *LookupRepositoryResp) GetRepositoryID() string

func (*LookupRepositoryResp) ProtoMessage

func (*LookupRepositoryResp) ProtoMessage()

func (*LookupRepositoryResp) ProtoReflect

func (x *LookupRepositoryResp) ProtoReflect() protoreflect.Message

func (*LookupRepositoryResp) Reset

func (x *LookupRepositoryResp) Reset()

func (*LookupRepositoryResp) String

func (x *LookupRepositoryResp) String() string

type Pipeline added in v0.54.0

type Pipeline struct {
	ID             string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name           string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	CreatedDate    string `protobuf:"bytes,4,opt,name=CreatedDate,proto3" json:"CreatedDate,omitempty"`
	CreatedBy      string `protobuf:"bytes,5,opt,name=CreatedBy,proto3" json:"CreatedBy,omitempty"`
	Path           string `protobuf:"bytes,6,opt,name=Path,proto3" json:"Path,omitempty"`
	Platform       string `protobuf:"bytes,7,opt,name=Platform,proto3" json:"Platform,omitempty"`
	Branch         string `protobuf:"bytes,8,opt,name=Branch,proto3" json:"Branch,omitempty"`
	LastCommitSha  string `protobuf:"bytes,9,opt,name=LastCommitSha,proto3" json:"LastCommitSha,omitempty"`
	LastCommitDate string `protobuf:"bytes,10,opt,name=LastCommitDate,proto3" json:"LastCommitDate,omitempty"`
	UpdatedBy      string `protobuf:"bytes,11,opt,name=UpdatedBy,proto3" json:"UpdatedBy,omitempty"`
	Link           string `protobuf:"bytes,12,opt,name=Link,proto3" json:"Link,omitempty"`
	// contains filtered or unexported fields
}

func (*Pipeline) Descriptor deprecated added in v0.54.0

func (*Pipeline) Descriptor() ([]byte, []int)

Deprecated: Use Pipeline.ProtoReflect.Descriptor instead.

func (*Pipeline) GetBranch added in v0.54.0

func (x *Pipeline) GetBranch() string

func (*Pipeline) GetCreatedBy added in v0.54.0

func (x *Pipeline) GetCreatedBy() string

func (*Pipeline) GetCreatedDate added in v0.54.0

func (x *Pipeline) GetCreatedDate() string

func (*Pipeline) GetID added in v0.54.0

func (x *Pipeline) GetID() string

func (*Pipeline) GetLastCommitDate added in v0.54.0

func (x *Pipeline) GetLastCommitDate() string

func (*Pipeline) GetLastCommitSha added in v0.54.0

func (x *Pipeline) GetLastCommitSha() string
func (x *Pipeline) GetLink() string

func (*Pipeline) GetName added in v0.54.0

func (x *Pipeline) GetName() string

func (*Pipeline) GetPath added in v0.54.0

func (x *Pipeline) GetPath() string

func (*Pipeline) GetPlatform added in v0.54.0

func (x *Pipeline) GetPlatform() string

func (*Pipeline) GetUpdatedBy added in v0.54.0

func (x *Pipeline) GetUpdatedBy() string

func (*Pipeline) ProtoMessage added in v0.54.0

func (*Pipeline) ProtoMessage()

func (*Pipeline) ProtoReflect added in v0.54.0

func (x *Pipeline) ProtoReflect() protoreflect.Message

func (*Pipeline) Reset added in v0.54.0

func (x *Pipeline) Reset()

func (*Pipeline) String added in v0.54.0

func (x *Pipeline) String() string

type Policy

type Policy struct {
	PolicyID   string           `protobuf:"bytes,1,opt,name=PolicyID,proto3" json:"PolicyID,omitempty"`
	Enforced   bool             `protobuf:"varint,2,opt,name=Enforced,proto3" json:"Enforced,omitempty"`
	Controls   []*PolicyControl `protobuf:"bytes,3,rep,name=Controls,proto3" json:"Controls,omitempty"`
	PolicyType PolicyTypeEnum   `protobuf:"varint,4,opt,name=PolicyType,proto3,enum=buildsecurity.PolicyTypeEnum" json:"PolicyType,omitempty"`
	// contains filtered or unexported fields
}

func (*Policy) Descriptor deprecated

func (*Policy) Descriptor() ([]byte, []int)

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetControls

func (x *Policy) GetControls() []*PolicyControl

func (*Policy) GetEnforced added in v0.5.0

func (x *Policy) GetEnforced() bool

func (*Policy) GetPolicyID

func (x *Policy) GetPolicyID() string

func (*Policy) GetPolicyType added in v0.17.0

func (x *Policy) GetPolicyType() PolicyTypeEnum

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect

func (x *Policy) ProtoReflect() protoreflect.Message

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) String

func (x *Policy) String() string

type PolicyControl

type PolicyControl struct {
	Provider string       `protobuf:"bytes,1,opt,name=Provider,proto3" json:"Provider,omitempty"`
	Service  string       `protobuf:"bytes,2,opt,name=Service,proto3" json:"Service,omitempty"`
	AVDIDs   []string     `protobuf:"bytes,3,rep,name=AVDIDs,proto3" json:"AVDIDs,omitempty"`
	Severity SeverityEnum `protobuf:"varint,4,opt,name=Severity,proto3,enum=buildsecurity.SeverityEnum" json:"Severity,omitempty"`
	ScanType ScanTypeEnum `protobuf:"varint,5,opt,name=ScanType,proto3,enum=buildsecurity.ScanTypeEnum" json:"ScanType,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyControl) Descriptor deprecated

func (*PolicyControl) Descriptor() ([]byte, []int)

Deprecated: Use PolicyControl.ProtoReflect.Descriptor instead.

func (*PolicyControl) GetAVDIDs

func (x *PolicyControl) GetAVDIDs() []string

func (*PolicyControl) GetProvider

func (x *PolicyControl) GetProvider() string

func (*PolicyControl) GetScanType added in v0.45.0

func (x *PolicyControl) GetScanType() ScanTypeEnum

func (*PolicyControl) GetService

func (x *PolicyControl) GetService() string

func (*PolicyControl) GetSeverity added in v0.5.0

func (x *PolicyControl) GetSeverity() SeverityEnum

func (*PolicyControl) ProtoMessage

func (*PolicyControl) ProtoMessage()

func (*PolicyControl) ProtoReflect

func (x *PolicyControl) ProtoReflect() protoreflect.Message

func (*PolicyControl) Reset

func (x *PolicyControl) Reset()

func (*PolicyControl) String

func (x *PolicyControl) String() string

type PolicyResult added in v0.9.0

type PolicyResult struct {
	PolicyID string `protobuf:"bytes,1,opt,name=PolicyID,proto3" json:"PolicyID,omitempty"`
	Enforced bool   `protobuf:"varint,2,opt,name=Enforced,proto3" json:"Enforced,omitempty"`
	Failed   bool   `protobuf:"varint,3,opt,name=Failed,proto3" json:"Failed,omitempty"`
	Reason   string `protobuf:"bytes,4,opt,name=Reason,proto3" json:"Reason,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyResult) Descriptor deprecated added in v0.9.0

func (*PolicyResult) Descriptor() ([]byte, []int)

Deprecated: Use PolicyResult.ProtoReflect.Descriptor instead.

func (*PolicyResult) GetEnforced added in v0.9.0

func (x *PolicyResult) GetEnforced() bool

func (*PolicyResult) GetFailed added in v0.9.0

func (x *PolicyResult) GetFailed() bool

func (*PolicyResult) GetPolicyID added in v0.9.0

func (x *PolicyResult) GetPolicyID() string

func (*PolicyResult) GetReason added in v0.9.0

func (x *PolicyResult) GetReason() string

func (*PolicyResult) ProtoMessage added in v0.9.0

func (*PolicyResult) ProtoMessage()

func (*PolicyResult) ProtoReflect added in v0.9.0

func (x *PolicyResult) ProtoReflect() protoreflect.Message

func (*PolicyResult) Reset added in v0.9.0

func (x *PolicyResult) Reset()

func (*PolicyResult) String added in v0.9.0

func (x *PolicyResult) String() string

type PolicyTypeEnum added in v0.17.0

type PolicyTypeEnum int32
const (
	PolicyTypeEnum_POLICY_TYPE_POLICY      PolicyTypeEnum = 0
	PolicyTypeEnum_POLICY_TYPE_SUPPRESSION PolicyTypeEnum = 1
)

func (PolicyTypeEnum) Descriptor added in v0.17.0

func (PolicyTypeEnum) Enum added in v0.17.0

func (x PolicyTypeEnum) Enum() *PolicyTypeEnum

func (PolicyTypeEnum) EnumDescriptor deprecated added in v0.17.0

func (PolicyTypeEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use PolicyTypeEnum.Descriptor instead.

func (PolicyTypeEnum) Number added in v0.17.0

func (PolicyTypeEnum) String added in v0.17.0

func (x PolicyTypeEnum) String() string

func (PolicyTypeEnum) Type added in v0.17.0

type Result

type Result struct {
	AVDID            string           `protobuf:"bytes,1,opt,name=AVDID,proto3" json:"AVDID,omitempty"`
	Message          string           `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	Type             Result_TypeEnum  `protobuf:"varint,4,opt,name=Type,proto3,enum=buildsecurity.Result_TypeEnum" json:"Type,omitempty"`
	Severity         SeverityEnum     `protobuf:"varint,5,opt,name=Severity,proto3,enum=buildsecurity.SeverityEnum" json:"Severity,omitempty"`
	Title            string           `protobuf:"bytes,6,opt,name=Title,proto3" json:"Title,omitempty"`
	Filename         string           `protobuf:"bytes,7,opt,name=Filename,proto3" json:"Filename,omitempty"`
	StartLine        int32            `protobuf:"varint,8,opt,name=StartLine,proto3" json:"StartLine,omitempty"`
	EndLine          int32            `protobuf:"varint,9,opt,name=EndLine,proto3" json:"EndLine,omitempty"`
	Resource         string           `protobuf:"bytes,10,opt,name=Resource,proto3" json:"Resource,omitempty"`
	PolicyResults    []*PolicyResult  `protobuf:"bytes,11,rep,name=PolicyResults,proto3" json:"PolicyResults,omitempty"`
	PkgName          string           `protobuf:"bytes,12,opt,name=PkgName,proto3" json:"PkgName,omitempty"`
	InstalledVersion string           `protobuf:"bytes,13,opt,name=InstalledVersion,proto3" json:"InstalledVersion,omitempty"`
	FixedVersion     string           `protobuf:"bytes,14,opt,name=FixedVersion,proto3" json:"FixedVersion,omitempty"`
	DataSource       string           `protobuf:"bytes,15,opt,name=DataSource,proto3" json:"DataSource,omitempty"`
	VendorScoring    []*VendorScoring `protobuf:"bytes,16,rep,name=VendorScoring,proto3" json:"VendorScoring,omitempty"`
	SuppressionID    string           `protobuf:"bytes,17,opt,name=suppressionID,proto3" json:"suppressionID,omitempty"`
	PublishedDate    int64            `protobuf:"varint,18,opt,name=PublishedDate,proto3" json:"PublishedDate,omitempty"`
	LastModified     int64            `protobuf:"varint,19,opt,name=LastModified,proto3" json:"LastModified,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetAVDID

func (x *Result) GetAVDID() string

func (*Result) GetDataSource added in v0.17.0

func (x *Result) GetDataSource() string

func (*Result) GetEndLine

func (x *Result) GetEndLine() int32

func (*Result) GetFilename

func (x *Result) GetFilename() string

func (*Result) GetFixedVersion added in v0.17.0

func (x *Result) GetFixedVersion() string

func (*Result) GetInstalledVersion added in v0.17.0

func (x *Result) GetInstalledVersion() string

func (*Result) GetLastModified added in v0.19.0

func (x *Result) GetLastModified() int64

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) GetPkgName added in v0.17.0

func (x *Result) GetPkgName() string

func (*Result) GetPolicyResults added in v0.9.0

func (x *Result) GetPolicyResults() []*PolicyResult

func (*Result) GetPublishedDate added in v0.19.0

func (x *Result) GetPublishedDate() int64

func (*Result) GetResource

func (x *Result) GetResource() string

func (*Result) GetSeverity

func (x *Result) GetSeverity() SeverityEnum

func (*Result) GetStartLine

func (x *Result) GetStartLine() int32

func (*Result) GetSuppressionID added in v0.19.0

func (x *Result) GetSuppressionID() string

func (*Result) GetTitle

func (x *Result) GetTitle() string

func (*Result) GetType

func (x *Result) GetType() Result_TypeEnum

func (*Result) GetVendorScoring added in v0.17.0

func (x *Result) GetVendorScoring() []*VendorScoring

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type Result_TypeEnum

type Result_TypeEnum int32
const (
	Result_TYPE_UNKNOWN         Result_TypeEnum = 0
	Result_TYPE_TERRAFORM       Result_TypeEnum = 1
	Result_TYPE_CLOUDFORMATION  Result_TypeEnum = 2
	Result_TYPE_DOCKERFILE      Result_TypeEnum = 3
	Result_TYPE_KUBERNETES      Result_TypeEnum = 4
	Result_TYPE_YAML            Result_TypeEnum = 5
	Result_TYPE_HCL             Result_TypeEnum = 6
	Result_TYPE_VULNERABILITIES Result_TypeEnum = 7
	Result_TYPE_SECRETS         Result_TypeEnum = 8
	Result_TYPE_HELM            Result_TypeEnum = 9
)

func (Result_TypeEnum) Descriptor

func (Result_TypeEnum) Enum

func (x Result_TypeEnum) Enum() *Result_TypeEnum

func (Result_TypeEnum) EnumDescriptor deprecated

func (Result_TypeEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use Result_TypeEnum.Descriptor instead.

func (Result_TypeEnum) Number

func (Result_TypeEnum) String

func (x Result_TypeEnum) String() string

func (Result_TypeEnum) Type

type ScanTypeEnum added in v0.45.0

type ScanTypeEnum int32
const (
	ScanTypeEnum_SCAN_TYPE_MISCONFIGURATION ScanTypeEnum = 0
	ScanTypeEnum_SCAN_TYPE_VULNERABILITY    ScanTypeEnum = 1
	ScanTypeEnum_SCAN_TYPE_SECRET           ScanTypeEnum = 2
)

func (ScanTypeEnum) Descriptor added in v0.45.0

func (ScanTypeEnum) Enum added in v0.45.0

func (x ScanTypeEnum) Enum() *ScanTypeEnum

func (ScanTypeEnum) EnumDescriptor deprecated added in v0.45.0

func (ScanTypeEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use ScanTypeEnum.Descriptor instead.

func (ScanTypeEnum) Number added in v0.45.0

func (ScanTypeEnum) String added in v0.45.0

func (x ScanTypeEnum) String() string

func (ScanTypeEnum) Type added in v0.45.0

type SeverityEnum added in v0.5.0

type SeverityEnum int32
const (
	SeverityEnum_SEVERITY_UNKNOWN  SeverityEnum = 0
	SeverityEnum_SEVERITY_LOW      SeverityEnum = 1
	SeverityEnum_SEVERITY_MEDIUM   SeverityEnum = 2
	SeverityEnum_SEVERITY_HIGH     SeverityEnum = 3
	SeverityEnum_SEVERITY_CRITICAL SeverityEnum = 4
	SeverityEnum_SEVERITY_MAX      SeverityEnum = 5
)

func (SeverityEnum) Descriptor added in v0.5.0

func (SeverityEnum) Enum added in v0.5.0

func (x SeverityEnum) Enum() *SeverityEnum

func (SeverityEnum) EnumDescriptor deprecated added in v0.5.0

func (SeverityEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use SeverityEnum.Descriptor instead.

func (SeverityEnum) Number added in v0.5.0

func (SeverityEnum) String added in v0.5.0

func (x SeverityEnum) String() string

func (SeverityEnum) Type added in v0.5.0

type TriggeredByEnum added in v0.24.0

type TriggeredByEnum int32
const (
	TriggeredByEnum_TRIGGERED_BY_UNKNOWN      TriggeredByEnum = 0
	TriggeredByEnum_TRIGGERED_BY_PUSH         TriggeredByEnum = 1
	TriggeredByEnum_TRIGGERED_BY_PULL_REQUEST TriggeredByEnum = 2
	TriggeredByEnum_TRIGGERED_BY_OFFLINE      TriggeredByEnum = 3
)

func (TriggeredByEnum) Descriptor added in v0.24.0

func (TriggeredByEnum) Enum added in v0.24.0

func (x TriggeredByEnum) Enum() *TriggeredByEnum

func (TriggeredByEnum) EnumDescriptor deprecated added in v0.24.0

func (TriggeredByEnum) EnumDescriptor() ([]byte, []int)

Deprecated: Use TriggeredByEnum.Descriptor instead.

func (TriggeredByEnum) Number added in v0.24.0

func (TriggeredByEnum) String added in v0.24.0

func (x TriggeredByEnum) String() string

func (TriggeredByEnum) Type added in v0.24.0

type TwirpServer

type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.

func NewBuildSecurityServer

func NewBuildSecurityServer(svc BuildSecurity, opts ...interface{}) TwirpServer

NewBuildSecurityServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

type VendorScoring added in v0.17.0

type VendorScoring struct {
	VendorName string  `protobuf:"bytes,1,opt,name=vendorName,proto3" json:"vendorName,omitempty"`
	V2Score    float32 `protobuf:"fixed32,2,opt,name=V2Score,proto3" json:"V2Score,omitempty"`
	V2Vector   string  `protobuf:"bytes,3,opt,name=V2Vector,proto3" json:"V2Vector,omitempty"`
	V3Score    float32 `protobuf:"fixed32,4,opt,name=V3Score,proto3" json:"V3Score,omitempty"`
	V3Vector   string  `protobuf:"bytes,5,opt,name=V3Vector,proto3" json:"V3Vector,omitempty"`
	// contains filtered or unexported fields
}

func (*VendorScoring) Descriptor deprecated added in v0.17.0

func (*VendorScoring) Descriptor() ([]byte, []int)

Deprecated: Use VendorScoring.ProtoReflect.Descriptor instead.

func (*VendorScoring) GetV2Score added in v0.17.0

func (x *VendorScoring) GetV2Score() float32

func (*VendorScoring) GetV2Vector added in v0.17.0

func (x *VendorScoring) GetV2Vector() string

func (*VendorScoring) GetV3Score added in v0.17.0

func (x *VendorScoring) GetV3Score() float32

func (*VendorScoring) GetV3Vector added in v0.17.0

func (x *VendorScoring) GetV3Vector() string

func (*VendorScoring) GetVendorName added in v0.17.0

func (x *VendorScoring) GetVendorName() string

func (*VendorScoring) ProtoMessage added in v0.17.0

func (*VendorScoring) ProtoMessage()

func (*VendorScoring) ProtoReflect added in v0.17.0

func (x *VendorScoring) ProtoReflect() protoreflect.Message

func (*VendorScoring) Reset added in v0.17.0

func (x *VendorScoring) Reset()

func (*VendorScoring) String added in v0.17.0

func (x *VendorScoring) String() string

Jump to

Keyboard shortcuts

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