inspec

package
v0.0.0-...-05bb4c1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResultStatusPassed        string = "passed"
	ResultStatusSkipped       string = "skipped"
	ResultStatusFailed        string = "failed"
	ResultStatusLoaded        string = "loaded"
	ResultStatusWaived        string = "waived"
	ControlImpactMinor        string = "minor"
	ControlImpactMajor        string = "major"
	ControlImpactCritical     string = "critical"
	ControlWaivedStrNo        string = "no"
	ControlWaivedStrNoExpired string = "no_expired"
	ControlWaivedStrYes       string = "yes"
	ControlWaivedStrYesRun    string = "yes_run"
)

Variables

View Source
var File_interservice_compliance_ingest_events_inspec_inspec_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Name    string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	Options *structpb.Struct `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

We can't have options as another message because the default field inside can take any json value(int, string, bool, hash, array) We get options as a struct and handle the unmarshalling and marshaling in the code

func (*Attribute) Descriptor deprecated

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

Deprecated: Use Attribute.ProtoReflect.Descriptor instead.

func (*Attribute) GetName

func (x *Attribute) GetName() string

func (*Attribute) GetOptions

func (x *Attribute) GetOptions() *structpb.Struct

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) ProtoReflect

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

func (*Attribute) Reset

func (x *Attribute) Reset()

func (*Attribute) String

func (x *Attribute) String() string

type Control

type Control struct {
	Id             string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	Impact         float32         `protobuf:"fixed32,2,opt,name=impact,proto3" json:"impact,omitempty" toml:"impact,omitempty" mapstructure:"impact,omitempty"`
	Title          string          `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty" toml:"title,omitempty" mapstructure:"title,omitempty"`
	Code           string          `protobuf:"bytes,20,opt,name=code,proto3" json:"code,omitempty" toml:"code,omitempty" mapstructure:"code,omitempty"`
	Desc           string          `protobuf:"bytes,21,opt,name=desc,proto3" json:"desc,omitempty" toml:"desc,omitempty" mapstructure:"desc,omitempty"`
	SourceLocation *SourceLocation `` /* 178-byte string literal not displayed */
	// TODO handle raw refs and tags
	Refs                 []*structpb.Struct    `protobuf:"bytes,23,rep,name=refs,proto3" json:"refs,omitempty" toml:"refs,omitempty" mapstructure:"refs,omitempty"`
	Tags                 *structpb.Struct      `protobuf:"bytes,24,opt,name=tags,proto3" json:"tags,omitempty" toml:"tags,omitempty" mapstructure:"tags,omitempty"`
	Results              []*Result             `` /* 126-byte string literal not displayed */
	WaiverData           *WaiverData           `` /* 158-byte string literal not displayed */
	RemovedResultsCounts *RemovedResultsCounts `` /* 212-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Control) Descriptor deprecated

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

Deprecated: Use Control.ProtoReflect.Descriptor instead.

func (*Control) GetCode

func (x *Control) GetCode() string

func (*Control) GetDesc

func (x *Control) GetDesc() string

func (*Control) GetId

func (x *Control) GetId() string

func (*Control) GetImpact

func (x *Control) GetImpact() float32

func (*Control) GetRefs

func (x *Control) GetRefs() []*structpb.Struct

func (*Control) GetRemovedResultsCounts

func (x *Control) GetRemovedResultsCounts() *RemovedResultsCounts

func (*Control) GetResults

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

func (*Control) GetSourceLocation

func (x *Control) GetSourceLocation() *SourceLocation

func (*Control) GetTags

func (x *Control) GetTags() *structpb.Struct

func (*Control) GetTitle

func (x *Control) GetTitle() string

func (*Control) GetWaiverData

func (x *Control) GetWaiverData() *WaiverData

func (*Control) ImpactName

func (control *Control) ImpactName() (impact string)

ImpactName returns a human readable name for the impact

func (*Control) ProtoMessage

func (*Control) ProtoMessage()

func (*Control) ProtoReflect

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

func (*Control) Reset

func (x *Control) Reset()

func (*Control) Status

func (control *Control) Status(waived string) (status string)

Status calculates the overall status of a control based on all results

func (*Control) String

func (x *Control) String() string

type Dependency

type Dependency struct {
	Name        string `protobuf:"bytes,21,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	Url         string `protobuf:"bytes,22,opt,name=url,proto3" json:"url,omitempty" toml:"url,omitempty" mapstructure:"url,omitempty"`
	Path        string `protobuf:"bytes,23,opt,name=path,proto3" json:"path,omitempty" toml:"path,omitempty" mapstructure:"path,omitempty"`
	Git         string `protobuf:"bytes,24,opt,name=git,proto3" json:"git,omitempty" toml:"git,omitempty" mapstructure:"git,omitempty"`
	Branch      string `protobuf:"bytes,25,opt,name=branch,proto3" json:"branch,omitempty" toml:"branch,omitempty" mapstructure:"branch,omitempty"`
	Tag         string `protobuf:"bytes,26,opt,name=tag,proto3" json:"tag,omitempty" toml:"tag,omitempty" mapstructure:"tag,omitempty"`
	Commit      string `protobuf:"bytes,27,opt,name=commit,proto3" json:"commit,omitempty" toml:"commit,omitempty" mapstructure:"commit,omitempty"`
	Version     string `` /* 126-byte string literal not displayed */
	Supermarket string `` /* 142-byte string literal not displayed */
	Compliance  string `` /* 138-byte string literal not displayed */
	Status      string `protobuf:"bytes,31,opt,name=status,proto3" json:"status,omitempty" toml:"status,omitempty" mapstructure:"status,omitempty"`
	SkipMessage string `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Dependency) Descriptor deprecated

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

Deprecated: Use Dependency.ProtoReflect.Descriptor instead.

func (*Dependency) GetBranch

func (x *Dependency) GetBranch() string

func (*Dependency) GetCommit

func (x *Dependency) GetCommit() string

func (*Dependency) GetCompliance

func (x *Dependency) GetCompliance() string

func (*Dependency) GetGit

func (x *Dependency) GetGit() string

func (*Dependency) GetName

func (x *Dependency) GetName() string

func (*Dependency) GetPath

func (x *Dependency) GetPath() string

func (*Dependency) GetSkipMessage

func (x *Dependency) GetSkipMessage() string

func (*Dependency) GetStatus

func (x *Dependency) GetStatus() string

func (*Dependency) GetSupermarket

func (x *Dependency) GetSupermarket() string

func (*Dependency) GetTag

func (x *Dependency) GetTag() string

func (*Dependency) GetUrl

func (x *Dependency) GetUrl() string

func (*Dependency) GetVersion

func (x *Dependency) GetVersion() string

func (*Dependency) ProtoMessage

func (*Dependency) ProtoMessage()

func (*Dependency) ProtoReflect

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

func (*Dependency) Reset

func (x *Dependency) Reset()

func (*Dependency) String

func (x *Dependency) String() string

type Group

type Group struct {
	Id       string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" toml:"id,omitempty" mapstructure:"id,omitempty"`
	Title    string   `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty" toml:"title,omitempty" mapstructure:"title,omitempty"`
	Controls []string `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetControls

func (x *Group) GetControls() []string

func (*Group) GetId

func (x *Group) GetId() string

func (*Group) GetTitle

func (x *Group) GetTitle() string

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type Platform

type Platform struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release,omitempty" toml:"release,omitempty" mapstructure:"release,omitempty"`
	// contains filtered or unexported fields
}

func (*Platform) Descriptor deprecated

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

Deprecated: Use Platform.ProtoReflect.Descriptor instead.

func (*Platform) GetName

func (x *Platform) GetName() string

func (*Platform) GetRelease

func (x *Platform) GetRelease() string

func (*Platform) ProtoMessage

func (*Platform) ProtoMessage()

func (*Platform) ProtoReflect

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

func (*Platform) Reset

func (x *Platform) Reset()

func (*Platform) String

func (x *Platform) String() string

type Profile

type Profile struct {
	Name           string        `protobuf:"bytes,20,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"`
	Title          string        `protobuf:"bytes,21,opt,name=title,proto3" json:"title,omitempty" toml:"title,omitempty" mapstructure:"title,omitempty"`
	Version        string        `` /* 126-byte string literal not displayed */
	Summary        string        `` /* 126-byte string literal not displayed */
	Maintainer     string        `` /* 138-byte string literal not displayed */
	License        string        `` /* 126-byte string literal not displayed */
	Copyright      string        `` /* 134-byte string literal not displayed */
	CopyrightEmail string        `` /* 178-byte string literal not displayed */
	Sha256         string        `protobuf:"bytes,28,opt,name=sha256,proto3" json:"sha256,omitempty" toml:"sha256,omitempty" mapstructure:"sha256,omitempty"`
	Controls       []*Control    `` /* 130-byte string literal not displayed */
	Supports       []*Support    `` /* 130-byte string literal not displayed */
	Attributes     []*Attribute  `` /* 138-byte string literal not displayed */
	Depends        []*Dependency `` /* 126-byte string literal not displayed */
	Groups         []*Group      `protobuf:"bytes,33,rep,name=groups,proto3" json:"groups,omitempty" toml:"groups,omitempty" mapstructure:"groups,omitempty"`
	ParentProfile  string        `` /* 173-byte string literal not displayed */
	Status         string        `protobuf:"bytes,35,opt,name=status,proto3" json:"status,omitempty" toml:"status,omitempty" mapstructure:"status,omitempty"`
	SkipMessage    string        `` /* 163-byte string literal not displayed */
	StatusMessage  string        `` /* 173-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Profile) Descriptor deprecated

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

Deprecated: Use Profile.ProtoReflect.Descriptor instead.

func (*Profile) GetAttributes

func (x *Profile) GetAttributes() []*Attribute

func (*Profile) GetControls

func (x *Profile) GetControls() []*Control

func (*Profile) GetCopyright

func (x *Profile) GetCopyright() string

func (*Profile) GetCopyrightEmail

func (x *Profile) GetCopyrightEmail() string

func (*Profile) GetDepends

func (x *Profile) GetDepends() []*Dependency

func (*Profile) GetGroups

func (x *Profile) GetGroups() []*Group

func (*Profile) GetLicense

func (x *Profile) GetLicense() string

func (*Profile) GetMaintainer

func (x *Profile) GetMaintainer() string

func (*Profile) GetName

func (x *Profile) GetName() string

func (*Profile) GetParentProfile

func (x *Profile) GetParentProfile() string

func (*Profile) GetSha256

func (x *Profile) GetSha256() string

func (*Profile) GetSkipMessage

func (x *Profile) GetSkipMessage() string

func (*Profile) GetStatus

func (x *Profile) GetStatus() string

func (*Profile) GetStatusMessage

func (x *Profile) GetStatusMessage() string

func (*Profile) GetSummary

func (x *Profile) GetSummary() string

func (*Profile) GetSupports

func (x *Profile) GetSupports() []*Support

func (*Profile) GetTitle

func (x *Profile) GetTitle() string

func (*Profile) GetVersion

func (x *Profile) GetVersion() string

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) ProtoReflect

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

func (*Profile) Reset

func (x *Profile) Reset()

func (*Profile) String

func (x *Profile) String() string

type RemovedResultsCounts

type RemovedResultsCounts struct {
	Failed  int32 `protobuf:"varint,1,opt,name=failed,proto3" json:"failed,omitempty" toml:"failed,omitempty" mapstructure:"failed,omitempty"`
	Skipped int32 `` /* 126-byte string literal not displayed */
	Passed  int32 `protobuf:"varint,3,opt,name=passed,proto3" json:"passed,omitempty" toml:"passed,omitempty" mapstructure:"passed,omitempty"`
	// contains filtered or unexported fields
}

func (*RemovedResultsCounts) Descriptor deprecated

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

Deprecated: Use RemovedResultsCounts.ProtoReflect.Descriptor instead.

func (*RemovedResultsCounts) GetFailed

func (x *RemovedResultsCounts) GetFailed() int32

func (*RemovedResultsCounts) GetPassed

func (x *RemovedResultsCounts) GetPassed() int32

func (*RemovedResultsCounts) GetSkipped

func (x *RemovedResultsCounts) GetSkipped() int32

func (*RemovedResultsCounts) ProtoMessage

func (*RemovedResultsCounts) ProtoMessage()

func (*RemovedResultsCounts) ProtoReflect

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

func (*RemovedResultsCounts) Reset

func (x *RemovedResultsCounts) Reset()

func (*RemovedResultsCounts) String

func (x *RemovedResultsCounts) String() string

type Report

type Report struct {
	Version       string      `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty" toml:"version,omitempty" mapstructure:"version,omitempty"`
	Platform      *Platform   `` /* 129-byte string literal not displayed */
	Statistics    *Statistics `` /* 137-byte string literal not displayed */
	OtherChecks   []string    `` /* 162-byte string literal not displayed */
	Status        string      `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty" toml:"status,omitempty" mapstructure:"status,omitempty"`
	StatusMessage string      `` /* 172-byte string literal not displayed */
	Profiles      []*Profile  `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Report) Descriptor deprecated

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

Deprecated: Use Report.ProtoReflect.Descriptor instead.

func (*Report) GetOtherChecks

func (x *Report) GetOtherChecks() []string

func (*Report) GetPlatform

func (x *Report) GetPlatform() *Platform

func (*Report) GetProfiles

func (x *Report) GetProfiles() []*Profile

func (*Report) GetStatistics

func (x *Report) GetStatistics() *Statistics

func (*Report) GetStatus

func (x *Report) GetStatus() string

func (*Report) GetStatusMessage

func (x *Report) GetStatusMessage() string

func (*Report) GetVersion

func (x *Report) GetVersion() string

func (*Report) ProtoMessage

func (*Report) ProtoMessage()

func (*Report) ProtoReflect

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

func (*Report) Reset

func (x *Report) Reset()

func (*Report) String

func (x *Report) String() string

type Result

type Result struct {
	Status    string  `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty" toml:"status,omitempty" mapstructure:"status,omitempty"`
	CodeDesc  string  `` /* 147-byte string literal not displayed */
	RunTime   float32 `` /* 144-byte string literal not displayed */
	StartTime string  `` // For now, use string
	/* 152-byte string literal not displayed */
	Resource    string `` /* 129-byte string literal not displayed */
	Message     string `` /* 126-byte string literal not displayed */
	SkipMessage string `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

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

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCodeDesc

func (x *Result) GetCodeDesc() string

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) GetResource

func (x *Result) GetResource() string

func (*Result) GetRunTime

func (x *Result) GetRunTime() float32

func (*Result) GetSkipMessage

func (x *Result) GetSkipMessage() string

func (*Result) GetStartTime

func (x *Result) GetStartTime() string

func (*Result) GetStatus

func (x *Result) GetStatus() string

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 SourceLocation

type SourceLocation struct {
	Ref  string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty" toml:"ref,omitempty" mapstructure:"ref,omitempty"`
	Line int32  `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty" toml:"line,omitempty" mapstructure:"line,omitempty"`
	// contains filtered or unexported fields
}

func (*SourceLocation) Descriptor deprecated

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

Deprecated: Use SourceLocation.ProtoReflect.Descriptor instead.

func (*SourceLocation) GetLine

func (x *SourceLocation) GetLine() int32

func (*SourceLocation) GetRef

func (x *SourceLocation) GetRef() string

func (*SourceLocation) ProtoMessage

func (*SourceLocation) ProtoMessage()

func (*SourceLocation) ProtoReflect

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

func (*SourceLocation) Reset

func (x *SourceLocation) Reset()

func (*SourceLocation) String

func (x *SourceLocation) String() string

type Statistics

type Statistics struct {
	Duration float32 `` /* 131-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Statistics) Descriptor deprecated

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

Deprecated: Use Statistics.ProtoReflect.Descriptor instead.

func (*Statistics) GetDuration

func (x *Statistics) GetDuration() float32

func (*Statistics) ProtoMessage

func (*Statistics) ProtoMessage()

func (*Statistics) ProtoReflect

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

func (*Statistics) Reset

func (x *Statistics) Reset()

func (*Statistics) String

func (x *Statistics) String() string

type Support

type Support struct {
	Inspec         string `protobuf:"bytes,1,opt,name=inspec,proto3" json:"inspec,omitempty" toml:"inspec,omitempty" mapstructure:"inspec,omitempty"`
	OsName         string `` /* 138-byte string literal not displayed */
	OsFamily       string `` /* 148-byte string literal not displayed */
	Release        string `protobuf:"bytes,4,opt,name=release,proto3" json:"release,omitempty" toml:"release,omitempty" mapstructure:"release,omitempty"`
	PlatformName   string `` /* 168-byte string literal not displayed */
	PlatformFamily string `` /* 178-byte string literal not displayed */
	Platform       string `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Support) Descriptor deprecated

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

Deprecated: Use Support.ProtoReflect.Descriptor instead.

func (*Support) GetInspec

func (x *Support) GetInspec() string

func (*Support) GetOsFamily

func (x *Support) GetOsFamily() string

func (*Support) GetOsName

func (x *Support) GetOsName() string

func (*Support) GetPlatform

func (x *Support) GetPlatform() string

func (*Support) GetPlatformFamily

func (x *Support) GetPlatformFamily() string

func (*Support) GetPlatformName

func (x *Support) GetPlatformName() string

func (*Support) GetRelease

func (x *Support) GetRelease() string

func (*Support) ProtoMessage

func (*Support) ProtoMessage()

func (*Support) ProtoReflect

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

func (*Support) Reset

func (x *Support) Reset()

func (*Support) String

func (x *Support) String() string

type WaiverData

type WaiverData struct {
	ExpirationDate     string `` /* 177-byte string literal not displayed */
	Justification      string `` /* 149-byte string literal not displayed */
	Run                bool   `protobuf:"varint,3,opt,name=run,proto3" json:"run,omitempty" toml:"run,omitempty" mapstructure:"run,omitempty"`
	SkippedDueToWaiver bool   `` /* 206-byte string literal not displayed */
	Message            string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty" toml:"message,omitempty" mapstructure:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*WaiverData) Descriptor deprecated

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

Deprecated: Use WaiverData.ProtoReflect.Descriptor instead.

func (*WaiverData) GetExpirationDate

func (x *WaiverData) GetExpirationDate() string

func (*WaiverData) GetJustification

func (x *WaiverData) GetJustification() string

func (*WaiverData) GetMessage

func (x *WaiverData) GetMessage() string

func (*WaiverData) GetRun

func (x *WaiverData) GetRun() bool

func (*WaiverData) GetSkippedDueToWaiver

func (x *WaiverData) GetSkippedDueToWaiver() bool

func (*WaiverData) ProtoMessage

func (*WaiverData) ProtoMessage()

func (*WaiverData) ProtoReflect

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

func (*WaiverData) Reset

func (x *WaiverData) Reset()

func (*WaiverData) String

func (x *WaiverData) String() string

Jump to

Keyboard shortcuts

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