runner

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: AGPL-3.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	FindingTargetStatusSatisfied    = "satisfied"
	FindingTargetStatusNotSatisfied = "not satisfied"
)

Constants used in plugins for statusses which map to OSCAL due to int requirements of GRPC

Variables

View Source
var HandshakeConfig = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "RUNNER_PLUGIN",
	MagicCookieValue: "AC755DCE-C118-481A-8EFA-18D8675D8122",
}
View Source
var PluginMap = map[string]plugin.Plugin{
	"runner": &RunnerGRPCPlugin{},
}

Functions

func AssessmentLogEntriesProtoToOscal

func AssessmentLogEntriesProtoToOscal(entries []*proto.AssessmentLog_Entry) *[]oscaltypes113.AssessmentLogEntry

func AssessmentLogProtoToOscal

func AssessmentLogProtoToOscal(log *proto.AssessmentLog) *oscaltypes113.AssessmentLog

func AssessmentPartProtoToOscal

func AssessmentPartProtoToOscal(part *proto.AssessmentPart) *oscaltypes113.AssessmentPart

func AssessmentPartsProtoToOscal

func AssessmentPartsProtoToOscal(parts []*proto.AssessmentPart) *[]oscaltypes113.AssessmentPart

func AssociatedActivitiesProtoToOscal

func AssociatedActivitiesProtoToOscal(activities []*proto.Task_AssociatedActivity) *[]oscaltypes113.AssociatedActivity

func AttestationProtoToOscal

func AttestationProtoToOscal(attestation *proto.Attestation) *oscaltypes113.AttestationStatements

func AttestationsProtoToOscal

func AttestationsProtoToOscal(attestations []*proto.Attestation) *[]oscaltypes113.AttestationStatements

func CharacterizationProtoToOscal

func CharacterizationProtoToOscal(character *proto.Characterization) *oscaltypes113.Characterization

func CharacterizationsProtoToOscal

func CharacterizationsProtoToOscal(characters []*proto.Characterization) *[]oscaltypes113.Characterization

func EventTimingProtoToOscal

func EventTimingProtoToOscal(timing *proto.EventTiming) *oscaltypes113.EventTiming

func ExcludeSubjectProtoToOscal

func ExcludeSubjectProtoToOscal(selectedSubject *proto.SelectSubjectById) *oscaltypes113.SelectSubjectById

func ExcludeSubjectsProtoToOscal

func ExcludeSubjectsProtoToOscal(subjects []*proto.SelectSubjectById) *[]oscaltypes113.SelectSubjectById

func FacetProtoToOscal

func FacetProtoToOscal(facet *proto.Facet) *oscaltypes113.Facet

func FacetsProtoToOscal

func FacetsProtoToOscal(facets []*proto.Facet) *[]oscaltypes113.Facet

func FindingProtoToOscal

func FindingProtoToOscal(finding *proto.Finding) *oscaltypes113.Finding

func FindingTargetProtoToOscal

func FindingTargetProtoToOscal(target *proto.FindingTarget) *oscaltypes113.FindingTarget

func FindingsProtoToOscal

func FindingsProtoToOscal(findings []*proto.Finding) *[]oscaltypes113.Finding

func IdentifiedSubjectProtoToOscal

func IdentifiedSubjectProtoToOscal(subject *proto.IdentifiedSubject) *oscaltypes113.IdentifiedSubject

func IdentifiedSubjectsProtoToOscal

func IdentifiedSubjectsProtoToOscal(subjects []*proto.IdentifiedSubject) *[]oscaltypes113.IdentifiedSubject

func IncludeAllSubjectProtoToOscal

func IncludeAllSubjectProtoToOscal(selectedSubject *proto.IncludeAll) *oscaltypes113.IncludeAll

func IncludeAllSubjectsProtoToOscal

func IncludeAllSubjectsProtoToOscal(subjects []*proto.IncludeAll) *[]oscaltypes113.IncludeAll

func IncludeSubjectProtoToOscal

func IncludeSubjectProtoToOscal(selectedSubject *proto.SelectSubjectById) *oscaltypes113.SelectSubjectById

func IncludeSubjectsProtoToOscal

func IncludeSubjectsProtoToOscal(subjects []*proto.SelectSubjectById) *[]oscaltypes113.SelectSubjectById

func LinkProtoToOscal

func LinkProtoToOscal(link *proto.Link) *oscaltypes113.Link

func LinksProtoToOscal

func LinksProtoToOscal(links []*proto.Link) *[]oscaltypes113.Link

func LoggedByProtoToOscal

func LoggedByProtoToOscal(logged *proto.LoggedBy) *oscaltypes113.LoggedBy

func LoggedBysProtoToOscal

func LoggedBysProtoToOscal(logged []*proto.LoggedBy) *[]oscaltypes113.LoggedBy

func MitigatingFactorProtoToOscal

func MitigatingFactorProtoToOscal(factor *proto.MitigatingFactor) *oscaltypes113.MitigatingFactor

func MitigatingFactorsProtoToOscal

func MitigatingFactorsProtoToOscal(factors []*proto.MitigatingFactor) *[]oscaltypes113.MitigatingFactor

func ObjectiveStatusProtoToOscal

func ObjectiveStatusProtoToOscal(status *proto.ObjectiveStatus) *oscaltypes113.ObjectiveStatus

func ObservationMethodProtoToOscal

func ObservationMethodProtoToOscal(method proto.ObservationMethod) string

func ObservationMethodsProtoToOscal

func ObservationMethodsProtoToOscal(methods []proto.ObservationMethod) []string

func ObservationProtoToOscal

func ObservationProtoToOscal(observation *proto.Observation) *oscaltypes113.Observation

func ObservationTypeProtoToOscal

func ObservationTypeProtoToOscal(_type proto.ObservationType) string

func ObservationTypesProtoToOscal

func ObservationTypesProtoToOscal(types []proto.ObservationType) *[]string

func ObservationsProtoToOscal

func ObservationsProtoToOscal(observations []*proto.Observation) *[]oscaltypes113.Observation

func OnDateProtoToOscal

func OnDateProtoToOscal(timing *proto.EventTiming) *oscaltypes113.OnDateCondition

func OriginActorProtoToOscal

func OriginActorProtoToOscal(actor *proto.OriginActor) *oscaltypes113.OriginActor

func OriginActorsProtoToOscal

func OriginActorsProtoToOscal(actors []*proto.OriginActor) *[]oscaltypes113.OriginActor

func OriginProtoToOscal

func OriginProtoToOscal(origin *proto.Origin) *oscaltypes113.Origin

func OriginsProtoToOscal

func OriginsProtoToOscal(origins []*proto.Origin) *[]oscaltypes113.Origin

func PropertiesProtoToOscal

func PropertiesProtoToOscal(properties []*proto.Property) *[]oscaltypes113.Property

func PropertyProtoToOscal

func PropertyProtoToOscal(property *proto.Property) *oscaltypes113.Property

func RelatedObservationProtoToOscal

func RelatedObservationProtoToOscal(observation *proto.RelatedObservation) *oscaltypes113.RelatedObservation

func RelatedObservationsProtoToOscal

func RelatedObservationsProtoToOscal(observations []*proto.RelatedObservation) *[]oscaltypes113.RelatedObservation

func RelatedRiskProtoToOscal

func RelatedRiskProtoToOscal(risk *proto.RelatedRisk) *oscaltypes113.AssociatedRisk

func RelatedRisksProtoToOscal

func RelatedRisksProtoToOscal(risks []*proto.RelatedRisk) *[]oscaltypes113.AssociatedRisk

func RelatedTaskProtoToOscal

func RelatedTaskProtoToOscal(task *proto.RelatedTask) *oscaltypes113.RelatedTask

func RelatedTasksProtoToOscal

func RelatedTasksProtoToOscal(tasks []*proto.RelatedTask) *[]oscaltypes113.RelatedTask

func RelevantEvidenceProtoToOscal

func RelevantEvidenceProtoToOscal(evidence *proto.RelevantEvidence) *oscaltypes113.RelevantEvidence

func RelevantEvidencesProtoToOscal

func RelevantEvidencesProtoToOscal(evidences []*proto.RelevantEvidence) *[]oscaltypes113.RelevantEvidence

func RequiredAssetProtoToOscal

func RequiredAssetProtoToOscal(asset *proto.RequiredAsset) *oscaltypes113.RequiredAsset

func RequiredAssetsProtoToOscal

func RequiredAssetsProtoToOscal(assets []*proto.RequiredAsset) *[]oscaltypes113.RequiredAsset

func ResponseProtoToOscal

func ResponseProtoToOscal(response *proto.Response) *oscaltypes113.Response

func ResponsesProtoToOscal

func ResponsesProtoToOscal(responses []*proto.Response) *[]oscaltypes113.Response

func ResponsiblePartiesProtoToOscal

func ResponsiblePartiesProtoToOscal(parties []*proto.ResponsibleParty) *[]oscaltypes113.ResponsibleParty

func ResponsiblePartyProtoToOscal

func ResponsiblePartyProtoToOscal(party *proto.ResponsibleParty) *oscaltypes113.ResponsibleParty

func ResponsibleRoleProtoToOscal

func ResponsibleRoleProtoToOscal(responsibleRole *proto.ResponsibleRole) *oscaltypes113.ResponsibleRole

func ResponsibleRolesProtoToOscal

func ResponsibleRolesProtoToOscal(responsibleRoles []*proto.ResponsibleRole) *[]oscaltypes113.ResponsibleRole

func ResultProtoToOscal

func ResultProtoToOscal(result *proto.AssessmentResult) *oscaltypes113.Result

func ReviewedControlProtoToOscal

func ReviewedControlProtoToOscal(reviewedControls *proto.ReviewedControls) *oscaltypes113.ReviewedControls

func ReviewedControlsProtoToOscal

func ReviewedControlsProtoToOscal(controls []*proto.ReviewedControls) *[]oscaltypes113.ReviewedControls

func RiskLogEntriesProtoToOscal

func RiskLogEntriesProtoToOscal(entries []*proto.RiskLog_Entry) *[]oscaltypes113.RiskLogEntry

func RiskLogEntryProtoToOscal

func RiskLogEntryProtoToOscal(entry *proto.RiskLog_Entry) *oscaltypes113.RiskLogEntry

func RiskLogProtoToOscal

func RiskLogProtoToOscal(log *proto.RiskLog) *oscaltypes113.RiskLog

func RiskProtoToOscal

func RiskProtoToOscal(risk *proto.Risk) *oscaltypes113.Risk

func RisksProtoToOscal

func RisksProtoToOscal(risks []*proto.Risk) *[]oscaltypes113.Risk

func SelectControlByIdsProtoToOscal

func SelectControlByIdsProtoToOscal(selectControls []*proto.SelectControlById) *[]oscaltypes113.AssessedControlsSelectControlById

func SelectObjectiveByIdProtoToOscal

func SelectObjectiveByIdProtoToOscal(selectObjective *proto.SelectObjectiveById) *oscaltypes113.SelectObjectiveById

func SelectObjectivesByIdsProtoToOscal

func SelectObjectivesByIdsProtoToOscal(selectObjectives []*proto.SelectObjectiveById) *[]oscaltypes113.SelectObjectiveById

func SubjectReferenceProtoToOscal

func SubjectReferenceProtoToOscal(subject *proto.SubjectReference) *oscaltypes113.SubjectReference

func SubjectReferencesProtoToOscal

func SubjectReferencesProtoToOscal(subjects []*proto.SubjectReference) *[]oscaltypes113.SubjectReference

func SubjectsProtoToOscal

func SubjectsProtoToOscal(subjects []*proto.AssessmentSubject) *[]oscaltypes113.AssessmentSubject

func TaskDependenciesProtoToOscal

func TaskDependenciesProtoToOscal(deps []*proto.Task_TaskDependency) *[]oscaltypes113.TaskDependency

func TaskProtoToOscal

func TaskProtoToOscal(task *proto.Task) *oscaltypes113.Task

func TasksProtoToOscal

func TasksProtoToOscal(tasks []*proto.Task) *[]oscaltypes113.Task

func ThreatIDProtoToOscal

func ThreatIDProtoToOscal(threatId *proto.ThreatId) *oscaltypes113.ThreatId

func ThreatIDsProtoToOscal

func ThreatIDsProtoToOscal(threatIds []*proto.ThreatId) *[]oscaltypes113.ThreatId

Types

type CallableEvalResponse

type CallableEvalResponse struct {
	*proto.EvalResponse
}

func NewCallableEvalResponse

func NewCallableEvalResponse() *CallableEvalResponse

func (*CallableEvalResponse) AddFinding

func (eval *CallableEvalResponse) AddFinding(finding *proto.Finding)

func (*CallableEvalResponse) AddLogEntry

func (eval *CallableEvalResponse) AddLogEntry(logEntry *proto.AssessmentLog_Entry)

func (*CallableEvalResponse) AddObservation

func (eval *CallableEvalResponse) AddObservation(observation *proto.Observation)

func (*CallableEvalResponse) AddRiskEntry

func (eval *CallableEvalResponse) AddRiskEntry(risk *proto.Risk)

func (*CallableEvalResponse) Result

func (eval *CallableEvalResponse) Result() *proto.EvalResponse

type GRPCClient

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

GRPCClient is an implementation of KV that talks over RPC.

func (*GRPCClient) Configure

func (*GRPCClient) Eval

func (m *GRPCClient) Eval(req *proto.EvalRequest) (*proto.EvalResponse, error)

func (*GRPCClient) PrepareForEval

type GRPCServer

type GRPCServer struct {
	Impl Runner
}

func (*GRPCServer) Configure

func (*GRPCServer) Eval

func (*GRPCServer) PrepareForEval

type Runner

type Runner interface {
	Configure(request *proto.ConfigureRequest) (*proto.ConfigureResponse, error)
	PrepareForEval(request *proto.PrepareForEvalRequest) (*proto.PrepareForEvalResponse, error)
	Eval(request *proto.EvalRequest) (*proto.EvalResponse, error)
}

type RunnerGRPCPlugin

type RunnerGRPCPlugin struct {
	plugin.Plugin

	// Impl Injection
	Impl Runner
}

func (*RunnerGRPCPlugin) GRPCClient

func (p *RunnerGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*RunnerGRPCPlugin) GRPCServer

func (p *RunnerGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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