checkmate

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ScanType_name = map[int32]string{
		0: "PATH_SCAN",
		1: "STRING_SCAN",
	}
	ScanType_value = map[string]int32{
		"PATH_SCAN":   0,
		"STRING_SCAN": 1,
	}
)

Enum value maps for ScanType.

View Source
var (
	Confidence_name = map[int32]string{
		0: "Low",
		1: "Medium",
		2: "High",
	}
	Confidence_value = map[string]int32{
		"Low":    0,
		"Medium": 1,
		"High":   2,
	}
)

Enum value maps for Confidence.

View Source
var File_checkmate_proto protoreflect.FileDescriptor
View Source
var File_diagnostics_proto protoreflect.FileDescriptor

Functions

func RegisterPluginServiceServer

func RegisterPluginServiceServer(s *grpc.Server, srv PluginServiceServer)

Types

type Confidence added in v0.0.3

type Confidence int32
const (
	Confidence_Low    Confidence = 0
	Confidence_Medium Confidence = 1
	Confidence_High   Confidence = 2
)

func (Confidence) Descriptor added in v0.0.3

func (Confidence) Descriptor() protoreflect.EnumDescriptor

func (Confidence) Enum added in v0.0.3

func (x Confidence) Enum() *Confidence

func (Confidence) EnumDescriptor deprecated added in v0.0.3

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

Deprecated: Use Confidence.Descriptor instead.

func (Confidence) Number added in v0.0.3

func (x Confidence) Number() protoreflect.EnumNumber

func (Confidence) String added in v0.0.3

func (x Confidence) String() string

func (Confidence) Type added in v0.0.3

type DataToScan added in v0.0.3

type DataToScan struct {
	Source     string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	SourceType string `protobuf:"bytes,2,opt,name=source_type,json=sourceType,proto3" json:"source_type,omitempty"`
	Base64     bool   `protobuf:"varint,3,opt,name=base64,proto3" json:"base64,omitempty"`
	// contains filtered or unexported fields
}

func (*DataToScan) Descriptor deprecated added in v0.0.3

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

Deprecated: Use DataToScan.ProtoReflect.Descriptor instead.

func (*DataToScan) GetBase64 added in v0.0.3

func (x *DataToScan) GetBase64() bool

func (*DataToScan) GetSource added in v0.0.3

func (x *DataToScan) GetSource() string

func (*DataToScan) GetSourceType added in v0.0.3

func (x *DataToScan) GetSourceType() string

func (*DataToScan) ProtoMessage added in v0.0.3

func (*DataToScan) ProtoMessage()

func (*DataToScan) ProtoReflect added in v0.0.3

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

func (*DataToScan) Reset added in v0.0.3

func (x *DataToScan) Reset()

func (*DataToScan) String added in v0.0.3

func (x *DataToScan) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Evidence added in v0.0.3

type Evidence struct {
	Description string     `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Confidence  Confidence `protobuf:"varint,2,opt,name=confidence,proto3,enum=checkmate.Confidence" json:"confidence,omitempty"`
	// contains filtered or unexported fields
}

func (*Evidence) Descriptor deprecated added in v0.0.3

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

Deprecated: Use Evidence.ProtoReflect.Descriptor instead.

func (*Evidence) GetConfidence added in v0.0.3

func (x *Evidence) GetConfidence() Confidence

func (*Evidence) GetDescription added in v0.0.3

func (x *Evidence) GetDescription() string

func (*Evidence) ProtoMessage added in v0.0.3

func (*Evidence) ProtoMessage()

func (*Evidence) ProtoReflect added in v0.0.3

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

func (*Evidence) Reset added in v0.0.3

func (x *Evidence) Reset()

func (*Evidence) String added in v0.0.3

func (x *Evidence) String() string

type ExcludeDefinition added in v0.0.6

type ExcludeDefinition struct {
	GloballyExcludedRegExs  []string               `` /* 131-byte string literal not displayed */
	GloballyExcludedStrings []string               `` /* 132-byte string literal not displayed */
	PathExclusionRegExs     []string               `protobuf:"bytes,3,rep,name=path_exclusion_reg_exs,json=pathExclusionRegExs,proto3" json:"path_exclusion_reg_exs,omitempty"`
	PerFileExcludedStrings  map[string]*StringList `` /* 219-byte string literal not displayed */
	PathRegexExcludedRegExs map[string]*StringList `` /* 224-byte string literal not displayed */
	// contains filtered or unexported fields
}

ExcludeDefinition is the structure for conveying excluded values definitions

func (*ExcludeDefinition) Descriptor deprecated added in v0.0.6

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

Deprecated: Use ExcludeDefinition.ProtoReflect.Descriptor instead.

func (*ExcludeDefinition) GetGloballyExcludedRegExs added in v0.0.6

func (x *ExcludeDefinition) GetGloballyExcludedRegExs() []string

func (*ExcludeDefinition) GetGloballyExcludedStrings added in v0.0.6

func (x *ExcludeDefinition) GetGloballyExcludedStrings() []string

func (*ExcludeDefinition) GetPathExclusionRegExs added in v0.0.6

func (x *ExcludeDefinition) GetPathExclusionRegExs() []string

func (*ExcludeDefinition) GetPathRegexExcludedRegExs added in v0.0.6

func (x *ExcludeDefinition) GetPathRegexExcludedRegExs() map[string]*StringList

func (*ExcludeDefinition) GetPerFileExcludedStrings added in v0.0.6

func (x *ExcludeDefinition) GetPerFileExcludedStrings() map[string]*StringList

func (*ExcludeDefinition) ProtoMessage added in v0.0.6

func (*ExcludeDefinition) ProtoMessage()

func (*ExcludeDefinition) ProtoReflect added in v0.0.6

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

func (*ExcludeDefinition) Reset added in v0.0.6

func (x *ExcludeDefinition) Reset()

func (*ExcludeDefinition) String added in v0.0.6

func (x *ExcludeDefinition) String() string

type Justification added in v0.0.3

type Justification struct {
	Headline *Evidence   `protobuf:"bytes,1,opt,name=headline,proto3" json:"headline,omitempty"`
	Reasons  []*Evidence `protobuf:"bytes,2,rep,name=reasons,proto3" json:"reasons,omitempty"`
	// contains filtered or unexported fields
}

func (*Justification) Descriptor deprecated added in v0.0.3

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

Deprecated: Use Justification.ProtoReflect.Descriptor instead.

func (*Justification) GetHeadline added in v0.0.3

func (x *Justification) GetHeadline() *Evidence

func (*Justification) GetReasons added in v0.0.3

func (x *Justification) GetReasons() []*Evidence

func (*Justification) ProtoMessage added in v0.0.3

func (*Justification) ProtoMessage()

func (*Justification) ProtoReflect added in v0.0.3

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

func (*Justification) Reset added in v0.0.3

func (x *Justification) Reset()

func (*Justification) String added in v0.0.3

func (x *Justification) String() string

type PluginMetadata

type PluginMetadata struct {

	// Plugin ID
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Plugin display name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// A display description
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// filesystem path of the plugin
	Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginMetadata) Descriptor deprecated

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

Deprecated: Use PluginMetadata.ProtoReflect.Descriptor instead.

func (*PluginMetadata) GetDescription

func (x *PluginMetadata) GetDescription() string

func (*PluginMetadata) GetId

func (x *PluginMetadata) GetId() string

func (*PluginMetadata) GetName

func (x *PluginMetadata) GetName() string

func (*PluginMetadata) GetPath added in v0.0.3

func (x *PluginMetadata) GetPath() string

func (*PluginMetadata) ProtoMessage

func (*PluginMetadata) ProtoMessage()

func (*PluginMetadata) ProtoReflect

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

func (*PluginMetadata) Reset

func (x *PluginMetadata) Reset()

func (*PluginMetadata) String

func (x *PluginMetadata) String() string

type PluginServiceClient

type PluginServiceClient interface {
	GetPluginMetadata(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PluginMetadata, error)
	Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (PluginService_ScanClient, error)
}

PluginServiceClient is the client API for PluginService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type PluginServiceServer

type PluginServiceServer interface {
	GetPluginMetadata(context.Context, *Empty) (*PluginMetadata, error)
	Scan(*ScanRequest, PluginService_ScanServer) error
}

PluginServiceServer is the server API for PluginService service.

type PluginService_ScanClient added in v0.0.3

type PluginService_ScanClient interface {
	Recv() (*SecurityDiagnostic, error)
	grpc.ClientStream
}

type PluginService_ScanServer added in v0.0.3

type PluginService_ScanServer interface {
	Send(*SecurityDiagnostic) error
	grpc.ServerStream
}

type Position added in v0.0.3

type Position struct {
	Line      int64 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
	Character int64 `protobuf:"varint,2,opt,name=character,proto3" json:"character,omitempty"`
	// contains filtered or unexported fields
}

func (*Position) Descriptor deprecated added in v0.0.3

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

Deprecated: Use Position.ProtoReflect.Descriptor instead.

func (*Position) GetCharacter added in v0.0.3

func (x *Position) GetCharacter() int64

func (*Position) GetLine added in v0.0.3

func (x *Position) GetLine() int64

func (*Position) ProtoMessage added in v0.0.3

func (*Position) ProtoMessage()

func (*Position) ProtoReflect added in v0.0.3

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

func (*Position) Reset added in v0.0.3

func (x *Position) Reset()

func (*Position) String added in v0.0.3

func (x *Position) String() string

type Range added in v0.0.3

type Range struct {
	Start *Position `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	End   *Position `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// contains filtered or unexported fields
}

func (*Range) Descriptor deprecated added in v0.0.3

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

Deprecated: Use Range.ProtoReflect.Descriptor instead.

func (*Range) GetEnd added in v0.0.3

func (x *Range) GetEnd() *Position

func (*Range) GetStart added in v0.0.3

func (x *Range) GetStart() *Position

func (*Range) ProtoMessage added in v0.0.3

func (*Range) ProtoMessage()

func (*Range) ProtoReflect added in v0.0.3

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

func (*Range) Reset added in v0.0.3

func (x *Range) Reset()

func (*Range) String added in v0.0.3

func (x *Range) String() string

type ScanRequest

type ScanRequest struct {
	ScanType ScanType `protobuf:"varint,1,opt,name=scan_type,json=scanType,proto3,enum=checkmate.ScanType" json:"scan_type,omitempty"`
	// used for PATH_SCAN request type
	PathsToScan []string `protobuf:"bytes,2,rep,name=paths_to_scan,json=pathsToScan,proto3" json:"paths_to_scan,omitempty"`
	// used for STRING_SCAN request type
	DataToScan []*DataToScan `protobuf:"bytes,3,rep,name=data_to_scan,json=dataToScan,proto3" json:"data_to_scan,omitempty"`
	// excludes
	Excludes *ExcludeDefinition `protobuf:"bytes,4,opt,name=excludes,proto3" json:"excludes,omitempty"`
	// show source code evidence where possible
	ShowSource            bool `protobuf:"varint,5,opt,name=show_source,json=showSource,proto3" json:"show_source,omitempty"`
	ConfidentialFilesOnly bool `` /* 127-byte string literal not displayed */
	CalculateChecksum     bool `protobuf:"varint,7,opt,name=calculate_checksum,json=calculateChecksum,proto3" json:"calculate_checksum,omitempty"`
	// contains filtered or unexported fields
}

func (*ScanRequest) Descriptor deprecated

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

Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.

func (*ScanRequest) GetCalculateChecksum added in v0.1.0

func (x *ScanRequest) GetCalculateChecksum() bool

func (*ScanRequest) GetConfidentialFilesOnly added in v0.1.0

func (x *ScanRequest) GetConfidentialFilesOnly() bool

func (*ScanRequest) GetDataToScan added in v0.0.3

func (x *ScanRequest) GetDataToScan() []*DataToScan

func (*ScanRequest) GetExcludes added in v0.0.6

func (x *ScanRequest) GetExcludes() *ExcludeDefinition

func (*ScanRequest) GetPathsToScan added in v0.0.3

func (x *ScanRequest) GetPathsToScan() []string

func (*ScanRequest) GetScanType added in v0.0.3

func (x *ScanRequest) GetScanType() ScanType

func (*ScanRequest) GetShowSource added in v0.0.3

func (x *ScanRequest) GetShowSource() bool

func (*ScanRequest) ProtoMessage

func (*ScanRequest) ProtoMessage()

func (*ScanRequest) ProtoReflect

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

func (*ScanRequest) Reset

func (x *ScanRequest) Reset()

func (*ScanRequest) String

func (x *ScanRequest) String() string

type ScanType added in v0.0.3

type ScanType int32
const (
	ScanType_PATH_SCAN   ScanType = 0
	ScanType_STRING_SCAN ScanType = 1
)

func (ScanType) Descriptor added in v0.0.3

func (ScanType) Descriptor() protoreflect.EnumDescriptor

func (ScanType) Enum added in v0.0.3

func (x ScanType) Enum() *ScanType

func (ScanType) EnumDescriptor deprecated added in v0.0.3

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

Deprecated: Use ScanType.Descriptor instead.

func (ScanType) Number added in v0.0.3

func (x ScanType) Number() protoreflect.EnumNumber

func (ScanType) String added in v0.0.3

func (x ScanType) String() string

func (ScanType) Type added in v0.0.3

type SecurityDiagnostic added in v0.0.3

type SecurityDiagnostic struct {
	Justification  *Justification `protobuf:"bytes,1,opt,name=justification,proto3" json:"justification,omitempty"`
	Range          *Range         `protobuf:"bytes,2,opt,name=range,proto3" json:"range,omitempty"`
	HighlightRange *Range         `protobuf:"bytes,8,opt,name=highlight_range,json=highlightRange,proto3" json:"highlight_range,omitempty"`
	Location       string         `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"`
	Sha256         string         `protobuf:"bytes,4,opt,name=sha256,proto3" json:"sha256,omitempty"`
	ProviderId     string         `protobuf:"bytes,5,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"`
	Source         string         `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"`
	Excluded       bool           `protobuf:"varint,7,opt,name=excluded,proto3" json:"excluded,omitempty"`
	// contains filtered or unexported fields
}

func (*SecurityDiagnostic) Descriptor deprecated added in v0.0.3

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

Deprecated: Use SecurityDiagnostic.ProtoReflect.Descriptor instead.

func (*SecurityDiagnostic) GetExcluded added in v0.0.6

func (x *SecurityDiagnostic) GetExcluded() bool

func (*SecurityDiagnostic) GetHighlightRange added in v0.0.4

func (x *SecurityDiagnostic) GetHighlightRange() *Range

func (*SecurityDiagnostic) GetJustification added in v0.0.3

func (x *SecurityDiagnostic) GetJustification() *Justification

func (*SecurityDiagnostic) GetLocation added in v0.0.3

func (x *SecurityDiagnostic) GetLocation() string

func (*SecurityDiagnostic) GetProviderId added in v0.0.3

func (x *SecurityDiagnostic) GetProviderId() string

func (*SecurityDiagnostic) GetRange added in v0.0.3

func (x *SecurityDiagnostic) GetRange() *Range

func (*SecurityDiagnostic) GetSha256 added in v0.1.0

func (x *SecurityDiagnostic) GetSha256() string

func (*SecurityDiagnostic) GetSource added in v0.0.3

func (x *SecurityDiagnostic) GetSource() string

func (*SecurityDiagnostic) ProtoMessage added in v0.0.3

func (*SecurityDiagnostic) ProtoMessage()

func (*SecurityDiagnostic) ProtoReflect added in v0.0.3

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

func (*SecurityDiagnostic) Reset added in v0.0.3

func (x *SecurityDiagnostic) Reset()

func (*SecurityDiagnostic) String added in v0.0.3

func (x *SecurityDiagnostic) String() string

type StringList added in v0.0.3

type StringList struct {
	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StringList) Descriptor deprecated added in v0.0.3

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

Deprecated: Use StringList.ProtoReflect.Descriptor instead.

func (*StringList) GetValue added in v0.0.3

func (x *StringList) GetValue() []string

func (*StringList) ProtoMessage added in v0.0.3

func (*StringList) ProtoMessage()

func (*StringList) ProtoReflect added in v0.0.3

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

func (*StringList) Reset added in v0.0.3

func (x *StringList) Reset()

func (*StringList) String added in v0.0.3

func (x *StringList) String() string

type UnimplementedPluginServiceServer

type UnimplementedPluginServiceServer struct {
}

UnimplementedPluginServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedPluginServiceServer) GetPluginMetadata

func (*UnimplementedPluginServiceServer) Scan added in v0.0.3

Jump to

Keyboard shortcuts

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