From eb499522574653c9609efda66a720bf30a27409c Mon Sep 17 00:00:00 2001 From: Jonathan Haas Date: Wed, 15 Apr 2026 02:08:32 -0700 Subject: [PATCH] Add compliance service contract --- .github/workflows/ci.yml | 2 +- descriptions.yaml | 15 + gen/go/compliance/v1/compliance.pb.go | 1263 +++++++++++++++++ .../compliancev1connect/compliance.connect.go | 196 +++ gen/python/compliance/v1/compliance_pb2.py | 73 + gen/ts/compliance/v1/compliance_connect.ts | 55 + gen/ts/compliance/v1/compliance_pb.ts | 556 ++++++++ package.json | 4 + proto/compliance/v1/compliance.proto | 127 ++ 9 files changed, 2290 insertions(+), 1 deletion(-) create mode 100644 gen/go/compliance/v1/compliance.pb.go create mode 100644 gen/go/compliance/v1/compliancev1connect/compliance.connect.go create mode 100644 gen/python/compliance/v1/compliance_pb2.py create mode 100644 gen/ts/compliance/v1/compliance_connect.ts create mode 100644 gen/ts/compliance/v1/compliance_pb.ts create mode 100644 proto/compliance/v1/compliance.proto diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bec49ef..eb301b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,4 +100,4 @@ jobs: . .venv-smoke/bin/activate python -m pip install --upgrade pip python -m pip install dist/*.whl - python -c "from agents.v1.agents_pb2 import Agent; from config.v1.config_pb2 import FeatureFlagSnapshot; from events.v1.cloudevent_pb2 import CloudEvent; from traces.v1.traces_pb2 import TraceSummary; from workflows.v1.workflows_pb2 import WorkflowRun; assert Agent.DESCRIPTOR.full_name == 'agents.v1.Agent'; assert FeatureFlagSnapshot.DESCRIPTOR.full_name == 'config.v1.FeatureFlagSnapshot'; assert CloudEvent.DESCRIPTOR.full_name == 'events.v1.CloudEvent'; assert TraceSummary.DESCRIPTOR.full_name == 'traces.v1.TraceSummary'; assert WorkflowRun.DESCRIPTOR.full_name == 'workflows.v1.WorkflowRun'" + python -c "from agents.v1.agents_pb2 import Agent; from compliance.v1.compliance_pb2 import EvidencePackage; from config.v1.config_pb2 import FeatureFlagSnapshot; from events.v1.cloudevent_pb2 import CloudEvent; from traces.v1.traces_pb2 import TraceSummary; from workflows.v1.workflows_pb2 import WorkflowRun; assert Agent.DESCRIPTOR.full_name == 'agents.v1.Agent'; assert EvidencePackage.DESCRIPTOR.full_name == 'compliance.v1.EvidencePackage'; assert FeatureFlagSnapshot.DESCRIPTOR.full_name == 'config.v1.FeatureFlagSnapshot'; assert CloudEvent.DESCRIPTOR.full_name == 'events.v1.CloudEvent'; assert TraceSummary.DESCRIPTOR.full_name == 'traces.v1.TraceSummary'; assert WorkflowRun.DESCRIPTOR.full_name == 'workflows.v1.WorkflowRun'" diff --git a/descriptions.yaml b/descriptions.yaml index c18c224..ee0723f 100644 --- a/descriptions.yaml +++ b/descriptions.yaml @@ -130,6 +130,21 @@ ConnectorService_GetCapabilities: >- bulk-export). Used to determine what operations an agent can perform through this integration. +# --- compliance/v1 --- +ComplianceService_GenerateEvidencePackage: >- + Generate a compliance evidence package for a workspace and framework by + aggregating audit evidence, governance policy snapshots, and selected + approval decisions into a single report-ready payload. +ComplianceService_DetectGaps: >- + Detect uncovered controls for a framework in a given time window. Returns + the missing controls and the reason each gap was identified. +ComplianceService_GetCoverage: >- + Compute control coverage for a framework over a given evidence window. + Returns per-control coverage and overall coverage ratio. +ComplianceService_ExportPackage: >- + Render an evidence package into an exportable JSON or CSV artifact for + auditor delivery and downstream compliance tooling. + # --- entities/v1 --- EntityService_Resolve: >- Resolve a record from an external system to its canonical entity. diff --git a/gen/go/compliance/v1/compliance.pb.go b/gen/go/compliance/v1/compliance.pb.go new file mode 100644 index 0000000..89a12d7 --- /dev/null +++ b/gen/go/compliance/v1/compliance.pb.go @@ -0,0 +1,1263 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: compliance/v1/compliance.proto + +package compliancev1 + +import ( + v1 "github.com/evalops/proto/gen/go/approvals/v1" + v11 "github.com/evalops/proto/gen/go/governance/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ComplianceFramework int32 + +const ( + ComplianceFramework_COMPLIANCE_FRAMEWORK_UNSPECIFIED ComplianceFramework = 0 + ComplianceFramework_COMPLIANCE_FRAMEWORK_SOC2 ComplianceFramework = 1 + ComplianceFramework_COMPLIANCE_FRAMEWORK_HIPAA ComplianceFramework = 2 + ComplianceFramework_COMPLIANCE_FRAMEWORK_NIST_CSF ComplianceFramework = 3 +) + +// Enum value maps for ComplianceFramework. +var ( + ComplianceFramework_name = map[int32]string{ + 0: "COMPLIANCE_FRAMEWORK_UNSPECIFIED", + 1: "COMPLIANCE_FRAMEWORK_SOC2", + 2: "COMPLIANCE_FRAMEWORK_HIPAA", + 3: "COMPLIANCE_FRAMEWORK_NIST_CSF", + } + ComplianceFramework_value = map[string]int32{ + "COMPLIANCE_FRAMEWORK_UNSPECIFIED": 0, + "COMPLIANCE_FRAMEWORK_SOC2": 1, + "COMPLIANCE_FRAMEWORK_HIPAA": 2, + "COMPLIANCE_FRAMEWORK_NIST_CSF": 3, + } +) + +func (x ComplianceFramework) Enum() *ComplianceFramework { + p := new(ComplianceFramework) + *p = x + return p +} + +func (x ComplianceFramework) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ComplianceFramework) Descriptor() protoreflect.EnumDescriptor { + return file_compliance_v1_compliance_proto_enumTypes[0].Descriptor() +} + +func (ComplianceFramework) Type() protoreflect.EnumType { + return &file_compliance_v1_compliance_proto_enumTypes[0] +} + +func (x ComplianceFramework) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ComplianceFramework.Descriptor instead. +func (ComplianceFramework) EnumDescriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{0} +} + +type ExportFormat int32 + +const ( + ExportFormat_EXPORT_FORMAT_UNSPECIFIED ExportFormat = 0 + ExportFormat_EXPORT_FORMAT_JSON ExportFormat = 1 + ExportFormat_EXPORT_FORMAT_CSV ExportFormat = 2 +) + +// Enum value maps for ExportFormat. +var ( + ExportFormat_name = map[int32]string{ + 0: "EXPORT_FORMAT_UNSPECIFIED", + 1: "EXPORT_FORMAT_JSON", + 2: "EXPORT_FORMAT_CSV", + } + ExportFormat_value = map[string]int32{ + "EXPORT_FORMAT_UNSPECIFIED": 0, + "EXPORT_FORMAT_JSON": 1, + "EXPORT_FORMAT_CSV": 2, + } +) + +func (x ExportFormat) Enum() *ExportFormat { + p := new(ExportFormat) + *p = x + return p +} + +func (x ExportFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExportFormat) Descriptor() protoreflect.EnumDescriptor { + return file_compliance_v1_compliance_proto_enumTypes[1].Descriptor() +} + +func (ExportFormat) Type() protoreflect.EnumType { + return &file_compliance_v1_compliance_proto_enumTypes[1] +} + +func (x ExportFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ExportFormat.Descriptor instead. +func (ExportFormat) EnumDescriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{1} +} + +type EvidenceQuery struct { + state protoimpl.MessageState `protogen:"open.v1"` + WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` + OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` + Framework ComplianceFramework `protobuf:"varint,3,opt,name=framework,proto3,enum=compliance.v1.ComplianceFramework" json:"framework,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + ApprovalRequestIds []string `protobuf:"bytes,6,rep,name=approval_request_ids,json=approvalRequestIds,proto3" json:"approval_request_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EvidenceQuery) Reset() { + *x = EvidenceQuery{} + mi := &file_compliance_v1_compliance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EvidenceQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvidenceQuery) ProtoMessage() {} + +func (x *EvidenceQuery) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvidenceQuery.ProtoReflect.Descriptor instead. +func (*EvidenceQuery) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{0} +} + +func (x *EvidenceQuery) GetWorkspaceId() string { + if x != nil { + return x.WorkspaceId + } + return "" +} + +func (x *EvidenceQuery) GetOrganizationId() string { + if x != nil { + return x.OrganizationId + } + return "" +} + +func (x *EvidenceQuery) GetFramework() ComplianceFramework { + if x != nil { + return x.Framework + } + return ComplianceFramework_COMPLIANCE_FRAMEWORK_UNSPECIFIED +} + +func (x *EvidenceQuery) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *EvidenceQuery) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *EvidenceQuery) GetApprovalRequestIds() []string { + if x != nil { + return x.ApprovalRequestIds + } + return nil +} + +type EvidenceItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + SourceId string `protobuf:"bytes,2,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + ActorId string `protobuf:"bytes,3,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` + ActorName string `protobuf:"bytes,4,opt,name=actor_name,json=actorName,proto3" json:"actor_name,omitempty"` + Action string `protobuf:"bytes,5,opt,name=action,proto3" json:"action,omitempty"` + ResourceType string `protobuf:"bytes,6,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + ResourceId string `protobuf:"bytes,7,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + Outcome string `protobuf:"bytes,8,opt,name=outcome,proto3" json:"outcome,omitempty"` + ControlIds []string `protobuf:"bytes,9,rep,name=control_ids,json=controlIds,proto3" json:"control_ids,omitempty"` + Metadata *structpb.Struct `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"` + ObservedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=observed_at,json=observedAt,proto3" json:"observed_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EvidenceItem) Reset() { + *x = EvidenceItem{} + mi := &file_compliance_v1_compliance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EvidenceItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvidenceItem) ProtoMessage() {} + +func (x *EvidenceItem) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvidenceItem.ProtoReflect.Descriptor instead. +func (*EvidenceItem) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{1} +} + +func (x *EvidenceItem) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *EvidenceItem) GetSourceId() string { + if x != nil { + return x.SourceId + } + return "" +} + +func (x *EvidenceItem) GetActorId() string { + if x != nil { + return x.ActorId + } + return "" +} + +func (x *EvidenceItem) GetActorName() string { + if x != nil { + return x.ActorName + } + return "" +} + +func (x *EvidenceItem) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *EvidenceItem) GetResourceType() string { + if x != nil { + return x.ResourceType + } + return "" +} + +func (x *EvidenceItem) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *EvidenceItem) GetOutcome() string { + if x != nil { + return x.Outcome + } + return "" +} + +func (x *EvidenceItem) GetControlIds() []string { + if x != nil { + return x.ControlIds + } + return nil +} + +func (x *EvidenceItem) GetMetadata() *structpb.Struct { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *EvidenceItem) GetObservedAt() *timestamppb.Timestamp { + if x != nil { + return x.ObservedAt + } + return nil +} + +type ControlCoverage struct { + state protoimpl.MessageState `protogen:"open.v1"` + ControlId string `protobuf:"bytes,1,opt,name=control_id,json=controlId,proto3" json:"control_id,omitempty"` + ControlName string `protobuf:"bytes,2,opt,name=control_name,json=controlName,proto3" json:"control_name,omitempty"` + ControlDescription string `protobuf:"bytes,3,opt,name=control_description,json=controlDescription,proto3" json:"control_description,omitempty"` + EvidenceCount int32 `protobuf:"varint,4,opt,name=evidence_count,json=evidenceCount,proto3" json:"evidence_count,omitempty"` + Covered bool `protobuf:"varint,5,opt,name=covered,proto3" json:"covered,omitempty"` + LastObservedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_observed_at,json=lastObservedAt,proto3" json:"last_observed_at,omitempty"` + EvidenceSourceIds []string `protobuf:"bytes,7,rep,name=evidence_source_ids,json=evidenceSourceIds,proto3" json:"evidence_source_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ControlCoverage) Reset() { + *x = ControlCoverage{} + mi := &file_compliance_v1_compliance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ControlCoverage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ControlCoverage) ProtoMessage() {} + +func (x *ControlCoverage) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ControlCoverage.ProtoReflect.Descriptor instead. +func (*ControlCoverage) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{2} +} + +func (x *ControlCoverage) GetControlId() string { + if x != nil { + return x.ControlId + } + return "" +} + +func (x *ControlCoverage) GetControlName() string { + if x != nil { + return x.ControlName + } + return "" +} + +func (x *ControlCoverage) GetControlDescription() string { + if x != nil { + return x.ControlDescription + } + return "" +} + +func (x *ControlCoverage) GetEvidenceCount() int32 { + if x != nil { + return x.EvidenceCount + } + return 0 +} + +func (x *ControlCoverage) GetCovered() bool { + if x != nil { + return x.Covered + } + return false +} + +func (x *ControlCoverage) GetLastObservedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastObservedAt + } + return nil +} + +func (x *ControlCoverage) GetEvidenceSourceIds() []string { + if x != nil { + return x.EvidenceSourceIds + } + return nil +} + +type ApprovalEvidence struct { + state protoimpl.MessageState `protogen:"open.v1"` + Request *v1.ApprovalRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + Decisions []*v1.ApprovalDecision `protobuf:"bytes,2,rep,name=decisions,proto3" json:"decisions,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApprovalEvidence) Reset() { + *x = ApprovalEvidence{} + mi := &file_compliance_v1_compliance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApprovalEvidence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApprovalEvidence) ProtoMessage() {} + +func (x *ApprovalEvidence) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApprovalEvidence.ProtoReflect.Descriptor instead. +func (*ApprovalEvidence) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{3} +} + +func (x *ApprovalEvidence) GetRequest() *v1.ApprovalRequest { + if x != nil { + return x.Request + } + return nil +} + +func (x *ApprovalEvidence) GetDecisions() []*v1.ApprovalDecision { + if x != nil { + return x.Decisions + } + return nil +} + +func (x *ApprovalEvidence) GetState() string { + if x != nil { + return x.State + } + return "" +} + +type GapResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + ControlId string `protobuf:"bytes,1,opt,name=control_id,json=controlId,proto3" json:"control_id,omitempty"` + ControlName string `protobuf:"bytes,2,opt,name=control_name,json=controlName,proto3" json:"control_name,omitempty"` + ControlDescription string `protobuf:"bytes,3,opt,name=control_description,json=controlDescription,proto3" json:"control_description,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GapResult) Reset() { + *x = GapResult{} + mi := &file_compliance_v1_compliance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GapResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GapResult) ProtoMessage() {} + +func (x *GapResult) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GapResult.ProtoReflect.Descriptor instead. +func (*GapResult) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{4} +} + +func (x *GapResult) GetControlId() string { + if x != nil { + return x.ControlId + } + return "" +} + +func (x *GapResult) GetControlName() string { + if x != nil { + return x.ControlName + } + return "" +} + +func (x *GapResult) GetControlDescription() string { + if x != nil { + return x.ControlDescription + } + return "" +} + +func (x *GapResult) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type EvidencePackage struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Query *EvidenceQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + GeneratedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=generated_at,json=generatedAt,proto3" json:"generated_at,omitempty"` + EvidenceItems []*EvidenceItem `protobuf:"bytes,4,rep,name=evidence_items,json=evidenceItems,proto3" json:"evidence_items,omitempty"` + ControlCoverage []*ControlCoverage `protobuf:"bytes,5,rep,name=control_coverage,json=controlCoverage,proto3" json:"control_coverage,omitempty"` + Gaps []*GapResult `protobuf:"bytes,6,rep,name=gaps,proto3" json:"gaps,omitempty"` + RetentionPolicy *v11.RetentionPolicy `protobuf:"bytes,7,opt,name=retention_policy,json=retentionPolicy,proto3" json:"retention_policy,omitempty"` + SafetyPolicy *v11.SafetyPolicy `protobuf:"bytes,8,opt,name=safety_policy,json=safetyPolicy,proto3" json:"safety_policy,omitempty"` + Approvals []*ApprovalEvidence `protobuf:"bytes,9,rep,name=approvals,proto3" json:"approvals,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EvidencePackage) Reset() { + *x = EvidencePackage{} + mi := &file_compliance_v1_compliance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EvidencePackage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvidencePackage) ProtoMessage() {} + +func (x *EvidencePackage) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvidencePackage.ProtoReflect.Descriptor instead. +func (*EvidencePackage) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{5} +} + +func (x *EvidencePackage) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *EvidencePackage) GetQuery() *EvidenceQuery { + if x != nil { + return x.Query + } + return nil +} + +func (x *EvidencePackage) GetGeneratedAt() *timestamppb.Timestamp { + if x != nil { + return x.GeneratedAt + } + return nil +} + +func (x *EvidencePackage) GetEvidenceItems() []*EvidenceItem { + if x != nil { + return x.EvidenceItems + } + return nil +} + +func (x *EvidencePackage) GetControlCoverage() []*ControlCoverage { + if x != nil { + return x.ControlCoverage + } + return nil +} + +func (x *EvidencePackage) GetGaps() []*GapResult { + if x != nil { + return x.Gaps + } + return nil +} + +func (x *EvidencePackage) GetRetentionPolicy() *v11.RetentionPolicy { + if x != nil { + return x.RetentionPolicy + } + return nil +} + +func (x *EvidencePackage) GetSafetyPolicy() *v11.SafetyPolicy { + if x != nil { + return x.SafetyPolicy + } + return nil +} + +func (x *EvidencePackage) GetApprovals() []*ApprovalEvidence { + if x != nil { + return x.Approvals + } + return nil +} + +type GenerateEvidencePackageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *EvidenceQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerateEvidencePackageRequest) Reset() { + *x = GenerateEvidencePackageRequest{} + mi := &file_compliance_v1_compliance_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerateEvidencePackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateEvidencePackageRequest) ProtoMessage() {} + +func (x *GenerateEvidencePackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateEvidencePackageRequest.ProtoReflect.Descriptor instead. +func (*GenerateEvidencePackageRequest) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{6} +} + +func (x *GenerateEvidencePackageRequest) GetQuery() *EvidenceQuery { + if x != nil { + return x.Query + } + return nil +} + +type GenerateEvidencePackageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + EvidencePackage *EvidencePackage `protobuf:"bytes,1,opt,name=evidence_package,json=evidencePackage,proto3" json:"evidence_package,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenerateEvidencePackageResponse) Reset() { + *x = GenerateEvidencePackageResponse{} + mi := &file_compliance_v1_compliance_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenerateEvidencePackageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenerateEvidencePackageResponse) ProtoMessage() {} + +func (x *GenerateEvidencePackageResponse) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenerateEvidencePackageResponse.ProtoReflect.Descriptor instead. +func (*GenerateEvidencePackageResponse) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{7} +} + +func (x *GenerateEvidencePackageResponse) GetEvidencePackage() *EvidencePackage { + if x != nil { + return x.EvidencePackage + } + return nil +} + +type DetectGapsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *EvidenceQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DetectGapsRequest) Reset() { + *x = DetectGapsRequest{} + mi := &file_compliance_v1_compliance_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DetectGapsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DetectGapsRequest) ProtoMessage() {} + +func (x *DetectGapsRequest) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DetectGapsRequest.ProtoReflect.Descriptor instead. +func (*DetectGapsRequest) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{8} +} + +func (x *DetectGapsRequest) GetQuery() *EvidenceQuery { + if x != nil { + return x.Query + } + return nil +} + +type DetectGapsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Gaps []*GapResult `protobuf:"bytes,1,rep,name=gaps,proto3" json:"gaps,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DetectGapsResponse) Reset() { + *x = DetectGapsResponse{} + mi := &file_compliance_v1_compliance_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DetectGapsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DetectGapsResponse) ProtoMessage() {} + +func (x *DetectGapsResponse) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DetectGapsResponse.ProtoReflect.Descriptor instead. +func (*DetectGapsResponse) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{9} +} + +func (x *DetectGapsResponse) GetGaps() []*GapResult { + if x != nil { + return x.Gaps + } + return nil +} + +type GetCoverageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *EvidenceQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCoverageRequest) Reset() { + *x = GetCoverageRequest{} + mi := &file_compliance_v1_compliance_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCoverageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCoverageRequest) ProtoMessage() {} + +func (x *GetCoverageRequest) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCoverageRequest.ProtoReflect.Descriptor instead. +func (*GetCoverageRequest) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{10} +} + +func (x *GetCoverageRequest) GetQuery() *EvidenceQuery { + if x != nil { + return x.Query + } + return nil +} + +type GetCoverageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ControlCoverage []*ControlCoverage `protobuf:"bytes,1,rep,name=control_coverage,json=controlCoverage,proto3" json:"control_coverage,omitempty"` + CoveredControls int32 `protobuf:"varint,2,opt,name=covered_controls,json=coveredControls,proto3" json:"covered_controls,omitempty"` + TotalControls int32 `protobuf:"varint,3,opt,name=total_controls,json=totalControls,proto3" json:"total_controls,omitempty"` + CoverageRatio float64 `protobuf:"fixed64,4,opt,name=coverage_ratio,json=coverageRatio,proto3" json:"coverage_ratio,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCoverageResponse) Reset() { + *x = GetCoverageResponse{} + mi := &file_compliance_v1_compliance_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCoverageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCoverageResponse) ProtoMessage() {} + +func (x *GetCoverageResponse) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCoverageResponse.ProtoReflect.Descriptor instead. +func (*GetCoverageResponse) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{11} +} + +func (x *GetCoverageResponse) GetControlCoverage() []*ControlCoverage { + if x != nil { + return x.ControlCoverage + } + return nil +} + +func (x *GetCoverageResponse) GetCoveredControls() int32 { + if x != nil { + return x.CoveredControls + } + return 0 +} + +func (x *GetCoverageResponse) GetTotalControls() int32 { + if x != nil { + return x.TotalControls + } + return 0 +} + +func (x *GetCoverageResponse) GetCoverageRatio() float64 { + if x != nil { + return x.CoverageRatio + } + return 0 +} + +type ExportPackageRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query *EvidenceQuery `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Format ExportFormat `protobuf:"varint,2,opt,name=format,proto3,enum=compliance.v1.ExportFormat" json:"format,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExportPackageRequest) Reset() { + *x = ExportPackageRequest{} + mi := &file_compliance_v1_compliance_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExportPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportPackageRequest) ProtoMessage() {} + +func (x *ExportPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportPackageRequest.ProtoReflect.Descriptor instead. +func (*ExportPackageRequest) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{12} +} + +func (x *ExportPackageRequest) GetQuery() *EvidenceQuery { + if x != nil { + return x.Query + } + return nil +} + +func (x *ExportPackageRequest) GetFormat() ExportFormat { + if x != nil { + return x.Format + } + return ExportFormat_EXPORT_FORMAT_UNSPECIFIED +} + +type ExportPackageResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExportPackageResponse) Reset() { + *x = ExportPackageResponse{} + mi := &file_compliance_v1_compliance_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExportPackageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportPackageResponse) ProtoMessage() {} + +func (x *ExportPackageResponse) ProtoReflect() protoreflect.Message { + mi := &file_compliance_v1_compliance_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportPackageResponse.ProtoReflect.Descriptor instead. +func (*ExportPackageResponse) Descriptor() ([]byte, []int) { + return file_compliance_v1_compliance_proto_rawDescGZIP(), []int{13} +} + +func (x *ExportPackageResponse) GetContent() []byte { + if x != nil { + return x.Content + } + return nil +} + +func (x *ExportPackageResponse) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +func (x *ExportPackageResponse) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +var File_compliance_v1_compliance_proto protoreflect.FileDescriptor + +const file_compliance_v1_compliance_proto_rawDesc = "" + + "\n" + + "\x1ecompliance/v1/compliance.proto\x12\rcompliance.v1\x1a\x1capprovals/v1/approvals.proto\x1a\x1egovernance/v1/governance.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc1\x02\n" + + "\rEvidenceQuery\x12!\n" + + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12'\n" + + "\x0forganization_id\x18\x02 \x01(\tR\x0eorganizationId\x12@\n" + + "\tframework\x18\x03 \x01(\x0e2\".compliance.v1.ComplianceFrameworkR\tframework\x129\n" + + "\n" + + "start_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" + + "\bend_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\aendTime\x120\n" + + "\x14approval_request_ids\x18\x06 \x03(\tR\x12approvalRequestIds\"\x88\x03\n" + + "\fEvidenceItem\x12\x16\n" + + "\x06source\x18\x01 \x01(\tR\x06source\x12\x1b\n" + + "\tsource_id\x18\x02 \x01(\tR\bsourceId\x12\x19\n" + + "\bactor_id\x18\x03 \x01(\tR\aactorId\x12\x1d\n" + + "\n" + + "actor_name\x18\x04 \x01(\tR\tactorName\x12\x16\n" + + "\x06action\x18\x05 \x01(\tR\x06action\x12#\n" + + "\rresource_type\x18\x06 \x01(\tR\fresourceType\x12\x1f\n" + + "\vresource_id\x18\a \x01(\tR\n" + + "resourceId\x12\x18\n" + + "\aoutcome\x18\b \x01(\tR\aoutcome\x12\x1f\n" + + "\vcontrol_ids\x18\t \x03(\tR\n" + + "controlIds\x123\n" + + "\bmetadata\x18\n" + + " \x01(\v2\x17.google.protobuf.StructR\bmetadata\x12;\n" + + "\vobserved_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "observedAt\"\xbb\x02\n" + + "\x0fControlCoverage\x12\x1d\n" + + "\n" + + "control_id\x18\x01 \x01(\tR\tcontrolId\x12!\n" + + "\fcontrol_name\x18\x02 \x01(\tR\vcontrolName\x12/\n" + + "\x13control_description\x18\x03 \x01(\tR\x12controlDescription\x12%\n" + + "\x0eevidence_count\x18\x04 \x01(\x05R\revidenceCount\x12\x18\n" + + "\acovered\x18\x05 \x01(\bR\acovered\x12D\n" + + "\x10last_observed_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x0elastObservedAt\x12.\n" + + "\x13evidence_source_ids\x18\a \x03(\tR\x11evidenceSourceIds\"\x9f\x01\n" + + "\x10ApprovalEvidence\x127\n" + + "\arequest\x18\x01 \x01(\v2\x1d.approvals.v1.ApprovalRequestR\arequest\x12<\n" + + "\tdecisions\x18\x02 \x03(\v2\x1e.approvals.v1.ApprovalDecisionR\tdecisions\x12\x14\n" + + "\x05state\x18\x03 \x01(\tR\x05state\"\x96\x01\n" + + "\tGapResult\x12\x1d\n" + + "\n" + + "control_id\x18\x01 \x01(\tR\tcontrolId\x12!\n" + + "\fcontrol_name\x18\x02 \x01(\tR\vcontrolName\x12/\n" + + "\x13control_description\x18\x03 \x01(\tR\x12controlDescription\x12\x16\n" + + "\x06reason\x18\x04 \x01(\tR\x06reason\"\x9d\x04\n" + + "\x0fEvidencePackage\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x122\n" + + "\x05query\x18\x02 \x01(\v2\x1c.compliance.v1.EvidenceQueryR\x05query\x12=\n" + + "\fgenerated_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\vgeneratedAt\x12B\n" + + "\x0eevidence_items\x18\x04 \x03(\v2\x1b.compliance.v1.EvidenceItemR\revidenceItems\x12I\n" + + "\x10control_coverage\x18\x05 \x03(\v2\x1e.compliance.v1.ControlCoverageR\x0fcontrolCoverage\x12,\n" + + "\x04gaps\x18\x06 \x03(\v2\x18.compliance.v1.GapResultR\x04gaps\x12I\n" + + "\x10retention_policy\x18\a \x01(\v2\x1e.governance.v1.RetentionPolicyR\x0fretentionPolicy\x12@\n" + + "\rsafety_policy\x18\b \x01(\v2\x1b.governance.v1.SafetyPolicyR\fsafetyPolicy\x12=\n" + + "\tapprovals\x18\t \x03(\v2\x1f.compliance.v1.ApprovalEvidenceR\tapprovals\"T\n" + + "\x1eGenerateEvidencePackageRequest\x122\n" + + "\x05query\x18\x01 \x01(\v2\x1c.compliance.v1.EvidenceQueryR\x05query\"l\n" + + "\x1fGenerateEvidencePackageResponse\x12I\n" + + "\x10evidence_package\x18\x01 \x01(\v2\x1e.compliance.v1.EvidencePackageR\x0fevidencePackage\"G\n" + + "\x11DetectGapsRequest\x122\n" + + "\x05query\x18\x01 \x01(\v2\x1c.compliance.v1.EvidenceQueryR\x05query\"B\n" + + "\x12DetectGapsResponse\x12,\n" + + "\x04gaps\x18\x01 \x03(\v2\x18.compliance.v1.GapResultR\x04gaps\"H\n" + + "\x12GetCoverageRequest\x122\n" + + "\x05query\x18\x01 \x01(\v2\x1c.compliance.v1.EvidenceQueryR\x05query\"\xd9\x01\n" + + "\x13GetCoverageResponse\x12I\n" + + "\x10control_coverage\x18\x01 \x03(\v2\x1e.compliance.v1.ControlCoverageR\x0fcontrolCoverage\x12)\n" + + "\x10covered_controls\x18\x02 \x01(\x05R\x0fcoveredControls\x12%\n" + + "\x0etotal_controls\x18\x03 \x01(\x05R\rtotalControls\x12%\n" + + "\x0ecoverage_ratio\x18\x04 \x01(\x01R\rcoverageRatio\"\x7f\n" + + "\x14ExportPackageRequest\x122\n" + + "\x05query\x18\x01 \x01(\v2\x1c.compliance.v1.EvidenceQueryR\x05query\x123\n" + + "\x06format\x18\x02 \x01(\x0e2\x1b.compliance.v1.ExportFormatR\x06format\"p\n" + + "\x15ExportPackageResponse\x12\x18\n" + + "\acontent\x18\x01 \x01(\fR\acontent\x12!\n" + + "\fcontent_type\x18\x02 \x01(\tR\vcontentType\x12\x1a\n" + + "\bfilename\x18\x03 \x01(\tR\bfilename*\x9d\x01\n" + + "\x13ComplianceFramework\x12$\n" + + " COMPLIANCE_FRAMEWORK_UNSPECIFIED\x10\x00\x12\x1d\n" + + "\x19COMPLIANCE_FRAMEWORK_SOC2\x10\x01\x12\x1e\n" + + "\x1aCOMPLIANCE_FRAMEWORK_HIPAA\x10\x02\x12!\n" + + "\x1dCOMPLIANCE_FRAMEWORK_NIST_CSF\x10\x03*\\\n" + + "\fExportFormat\x12\x1d\n" + + "\x19EXPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x16\n" + + "\x12EXPORT_FORMAT_JSON\x10\x01\x12\x15\n" + + "\x11EXPORT_FORMAT_CSV\x10\x022\x92\x03\n" + + "\x11ComplianceService\x12x\n" + + "\x17GenerateEvidencePackage\x12-.compliance.v1.GenerateEvidencePackageRequest\x1a..compliance.v1.GenerateEvidencePackageResponse\x12Q\n" + + "\n" + + "DetectGaps\x12 .compliance.v1.DetectGapsRequest\x1a!.compliance.v1.DetectGapsResponse\x12T\n" + + "\vGetCoverage\x12!.compliance.v1.GetCoverageRequest\x1a\".compliance.v1.GetCoverageResponse\x12Z\n" + + "\rExportPackage\x12#.compliance.v1.ExportPackageRequest\x1a$.compliance.v1.ExportPackageResponseB compliance.v1.ComplianceFramework + 16, // 1: compliance.v1.EvidenceQuery.start_time:type_name -> google.protobuf.Timestamp + 16, // 2: compliance.v1.EvidenceQuery.end_time:type_name -> google.protobuf.Timestamp + 17, // 3: compliance.v1.EvidenceItem.metadata:type_name -> google.protobuf.Struct + 16, // 4: compliance.v1.EvidenceItem.observed_at:type_name -> google.protobuf.Timestamp + 16, // 5: compliance.v1.ControlCoverage.last_observed_at:type_name -> google.protobuf.Timestamp + 18, // 6: compliance.v1.ApprovalEvidence.request:type_name -> approvals.v1.ApprovalRequest + 19, // 7: compliance.v1.ApprovalEvidence.decisions:type_name -> approvals.v1.ApprovalDecision + 2, // 8: compliance.v1.EvidencePackage.query:type_name -> compliance.v1.EvidenceQuery + 16, // 9: compliance.v1.EvidencePackage.generated_at:type_name -> google.protobuf.Timestamp + 3, // 10: compliance.v1.EvidencePackage.evidence_items:type_name -> compliance.v1.EvidenceItem + 4, // 11: compliance.v1.EvidencePackage.control_coverage:type_name -> compliance.v1.ControlCoverage + 6, // 12: compliance.v1.EvidencePackage.gaps:type_name -> compliance.v1.GapResult + 20, // 13: compliance.v1.EvidencePackage.retention_policy:type_name -> governance.v1.RetentionPolicy + 21, // 14: compliance.v1.EvidencePackage.safety_policy:type_name -> governance.v1.SafetyPolicy + 5, // 15: compliance.v1.EvidencePackage.approvals:type_name -> compliance.v1.ApprovalEvidence + 2, // 16: compliance.v1.GenerateEvidencePackageRequest.query:type_name -> compliance.v1.EvidenceQuery + 7, // 17: compliance.v1.GenerateEvidencePackageResponse.evidence_package:type_name -> compliance.v1.EvidencePackage + 2, // 18: compliance.v1.DetectGapsRequest.query:type_name -> compliance.v1.EvidenceQuery + 6, // 19: compliance.v1.DetectGapsResponse.gaps:type_name -> compliance.v1.GapResult + 2, // 20: compliance.v1.GetCoverageRequest.query:type_name -> compliance.v1.EvidenceQuery + 4, // 21: compliance.v1.GetCoverageResponse.control_coverage:type_name -> compliance.v1.ControlCoverage + 2, // 22: compliance.v1.ExportPackageRequest.query:type_name -> compliance.v1.EvidenceQuery + 1, // 23: compliance.v1.ExportPackageRequest.format:type_name -> compliance.v1.ExportFormat + 8, // 24: compliance.v1.ComplianceService.GenerateEvidencePackage:input_type -> compliance.v1.GenerateEvidencePackageRequest + 10, // 25: compliance.v1.ComplianceService.DetectGaps:input_type -> compliance.v1.DetectGapsRequest + 12, // 26: compliance.v1.ComplianceService.GetCoverage:input_type -> compliance.v1.GetCoverageRequest + 14, // 27: compliance.v1.ComplianceService.ExportPackage:input_type -> compliance.v1.ExportPackageRequest + 9, // 28: compliance.v1.ComplianceService.GenerateEvidencePackage:output_type -> compliance.v1.GenerateEvidencePackageResponse + 11, // 29: compliance.v1.ComplianceService.DetectGaps:output_type -> compliance.v1.DetectGapsResponse + 13, // 30: compliance.v1.ComplianceService.GetCoverage:output_type -> compliance.v1.GetCoverageResponse + 15, // 31: compliance.v1.ComplianceService.ExportPackage:output_type -> compliance.v1.ExportPackageResponse + 28, // [28:32] is the sub-list for method output_type + 24, // [24:28] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name +} + +func init() { file_compliance_v1_compliance_proto_init() } +func file_compliance_v1_compliance_proto_init() { + if File_compliance_v1_compliance_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_compliance_v1_compliance_proto_rawDesc), len(file_compliance_v1_compliance_proto_rawDesc)), + NumEnums: 2, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_compliance_v1_compliance_proto_goTypes, + DependencyIndexes: file_compliance_v1_compliance_proto_depIdxs, + EnumInfos: file_compliance_v1_compliance_proto_enumTypes, + MessageInfos: file_compliance_v1_compliance_proto_msgTypes, + }.Build() + File_compliance_v1_compliance_proto = out.File + file_compliance_v1_compliance_proto_goTypes = nil + file_compliance_v1_compliance_proto_depIdxs = nil +} diff --git a/gen/go/compliance/v1/compliancev1connect/compliance.connect.go b/gen/go/compliance/v1/compliancev1connect/compliance.connect.go new file mode 100644 index 0000000..04af593 --- /dev/null +++ b/gen/go/compliance/v1/compliancev1connect/compliance.connect.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: compliance/v1/compliance.proto + +package compliancev1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/evalops/proto/gen/go/compliance/v1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // ComplianceServiceName is the fully-qualified name of the ComplianceService service. + ComplianceServiceName = "compliance.v1.ComplianceService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // ComplianceServiceGenerateEvidencePackageProcedure is the fully-qualified name of the + // ComplianceService's GenerateEvidencePackage RPC. + ComplianceServiceGenerateEvidencePackageProcedure = "/compliance.v1.ComplianceService/GenerateEvidencePackage" + // ComplianceServiceDetectGapsProcedure is the fully-qualified name of the ComplianceService's + // DetectGaps RPC. + ComplianceServiceDetectGapsProcedure = "/compliance.v1.ComplianceService/DetectGaps" + // ComplianceServiceGetCoverageProcedure is the fully-qualified name of the ComplianceService's + // GetCoverage RPC. + ComplianceServiceGetCoverageProcedure = "/compliance.v1.ComplianceService/GetCoverage" + // ComplianceServiceExportPackageProcedure is the fully-qualified name of the ComplianceService's + // ExportPackage RPC. + ComplianceServiceExportPackageProcedure = "/compliance.v1.ComplianceService/ExportPackage" +) + +// ComplianceServiceClient is a client for the compliance.v1.ComplianceService service. +type ComplianceServiceClient interface { + GenerateEvidencePackage(context.Context, *connect.Request[v1.GenerateEvidencePackageRequest]) (*connect.Response[v1.GenerateEvidencePackageResponse], error) + DetectGaps(context.Context, *connect.Request[v1.DetectGapsRequest]) (*connect.Response[v1.DetectGapsResponse], error) + GetCoverage(context.Context, *connect.Request[v1.GetCoverageRequest]) (*connect.Response[v1.GetCoverageResponse], error) + ExportPackage(context.Context, *connect.Request[v1.ExportPackageRequest]) (*connect.Response[v1.ExportPackageResponse], error) +} + +// NewComplianceServiceClient constructs a client for the compliance.v1.ComplianceService service. +// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped +// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the +// connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewComplianceServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ComplianceServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + complianceServiceMethods := v1.File_compliance_v1_compliance_proto.Services().ByName("ComplianceService").Methods() + return &complianceServiceClient{ + generateEvidencePackage: connect.NewClient[v1.GenerateEvidencePackageRequest, v1.GenerateEvidencePackageResponse]( + httpClient, + baseURL+ComplianceServiceGenerateEvidencePackageProcedure, + connect.WithSchema(complianceServiceMethods.ByName("GenerateEvidencePackage")), + connect.WithClientOptions(opts...), + ), + detectGaps: connect.NewClient[v1.DetectGapsRequest, v1.DetectGapsResponse]( + httpClient, + baseURL+ComplianceServiceDetectGapsProcedure, + connect.WithSchema(complianceServiceMethods.ByName("DetectGaps")), + connect.WithClientOptions(opts...), + ), + getCoverage: connect.NewClient[v1.GetCoverageRequest, v1.GetCoverageResponse]( + httpClient, + baseURL+ComplianceServiceGetCoverageProcedure, + connect.WithSchema(complianceServiceMethods.ByName("GetCoverage")), + connect.WithClientOptions(opts...), + ), + exportPackage: connect.NewClient[v1.ExportPackageRequest, v1.ExportPackageResponse]( + httpClient, + baseURL+ComplianceServiceExportPackageProcedure, + connect.WithSchema(complianceServiceMethods.ByName("ExportPackage")), + connect.WithClientOptions(opts...), + ), + } +} + +// complianceServiceClient implements ComplianceServiceClient. +type complianceServiceClient struct { + generateEvidencePackage *connect.Client[v1.GenerateEvidencePackageRequest, v1.GenerateEvidencePackageResponse] + detectGaps *connect.Client[v1.DetectGapsRequest, v1.DetectGapsResponse] + getCoverage *connect.Client[v1.GetCoverageRequest, v1.GetCoverageResponse] + exportPackage *connect.Client[v1.ExportPackageRequest, v1.ExportPackageResponse] +} + +// GenerateEvidencePackage calls compliance.v1.ComplianceService.GenerateEvidencePackage. +func (c *complianceServiceClient) GenerateEvidencePackage(ctx context.Context, req *connect.Request[v1.GenerateEvidencePackageRequest]) (*connect.Response[v1.GenerateEvidencePackageResponse], error) { + return c.generateEvidencePackage.CallUnary(ctx, req) +} + +// DetectGaps calls compliance.v1.ComplianceService.DetectGaps. +func (c *complianceServiceClient) DetectGaps(ctx context.Context, req *connect.Request[v1.DetectGapsRequest]) (*connect.Response[v1.DetectGapsResponse], error) { + return c.detectGaps.CallUnary(ctx, req) +} + +// GetCoverage calls compliance.v1.ComplianceService.GetCoverage. +func (c *complianceServiceClient) GetCoverage(ctx context.Context, req *connect.Request[v1.GetCoverageRequest]) (*connect.Response[v1.GetCoverageResponse], error) { + return c.getCoverage.CallUnary(ctx, req) +} + +// ExportPackage calls compliance.v1.ComplianceService.ExportPackage. +func (c *complianceServiceClient) ExportPackage(ctx context.Context, req *connect.Request[v1.ExportPackageRequest]) (*connect.Response[v1.ExportPackageResponse], error) { + return c.exportPackage.CallUnary(ctx, req) +} + +// ComplianceServiceHandler is an implementation of the compliance.v1.ComplianceService service. +type ComplianceServiceHandler interface { + GenerateEvidencePackage(context.Context, *connect.Request[v1.GenerateEvidencePackageRequest]) (*connect.Response[v1.GenerateEvidencePackageResponse], error) + DetectGaps(context.Context, *connect.Request[v1.DetectGapsRequest]) (*connect.Response[v1.DetectGapsResponse], error) + GetCoverage(context.Context, *connect.Request[v1.GetCoverageRequest]) (*connect.Response[v1.GetCoverageResponse], error) + ExportPackage(context.Context, *connect.Request[v1.ExportPackageRequest]) (*connect.Response[v1.ExportPackageResponse], error) +} + +// NewComplianceServiceHandler builds an HTTP handler from the service implementation. It returns +// the path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewComplianceServiceHandler(svc ComplianceServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + complianceServiceMethods := v1.File_compliance_v1_compliance_proto.Services().ByName("ComplianceService").Methods() + complianceServiceGenerateEvidencePackageHandler := connect.NewUnaryHandler( + ComplianceServiceGenerateEvidencePackageProcedure, + svc.GenerateEvidencePackage, + connect.WithSchema(complianceServiceMethods.ByName("GenerateEvidencePackage")), + connect.WithHandlerOptions(opts...), + ) + complianceServiceDetectGapsHandler := connect.NewUnaryHandler( + ComplianceServiceDetectGapsProcedure, + svc.DetectGaps, + connect.WithSchema(complianceServiceMethods.ByName("DetectGaps")), + connect.WithHandlerOptions(opts...), + ) + complianceServiceGetCoverageHandler := connect.NewUnaryHandler( + ComplianceServiceGetCoverageProcedure, + svc.GetCoverage, + connect.WithSchema(complianceServiceMethods.ByName("GetCoverage")), + connect.WithHandlerOptions(opts...), + ) + complianceServiceExportPackageHandler := connect.NewUnaryHandler( + ComplianceServiceExportPackageProcedure, + svc.ExportPackage, + connect.WithSchema(complianceServiceMethods.ByName("ExportPackage")), + connect.WithHandlerOptions(opts...), + ) + return "/compliance.v1.ComplianceService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case ComplianceServiceGenerateEvidencePackageProcedure: + complianceServiceGenerateEvidencePackageHandler.ServeHTTP(w, r) + case ComplianceServiceDetectGapsProcedure: + complianceServiceDetectGapsHandler.ServeHTTP(w, r) + case ComplianceServiceGetCoverageProcedure: + complianceServiceGetCoverageHandler.ServeHTTP(w, r) + case ComplianceServiceExportPackageProcedure: + complianceServiceExportPackageHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedComplianceServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedComplianceServiceHandler struct{} + +func (UnimplementedComplianceServiceHandler) GenerateEvidencePackage(context.Context, *connect.Request[v1.GenerateEvidencePackageRequest]) (*connect.Response[v1.GenerateEvidencePackageResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("compliance.v1.ComplianceService.GenerateEvidencePackage is not implemented")) +} + +func (UnimplementedComplianceServiceHandler) DetectGaps(context.Context, *connect.Request[v1.DetectGapsRequest]) (*connect.Response[v1.DetectGapsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("compliance.v1.ComplianceService.DetectGaps is not implemented")) +} + +func (UnimplementedComplianceServiceHandler) GetCoverage(context.Context, *connect.Request[v1.GetCoverageRequest]) (*connect.Response[v1.GetCoverageResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("compliance.v1.ComplianceService.GetCoverage is not implemented")) +} + +func (UnimplementedComplianceServiceHandler) ExportPackage(context.Context, *connect.Request[v1.ExportPackageRequest]) (*connect.Response[v1.ExportPackageResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("compliance.v1.ComplianceService.ExportPackage is not implemented")) +} diff --git a/gen/python/compliance/v1/compliance_pb2.py b/gen/python/compliance/v1/compliance_pb2.py new file mode 100644 index 0000000..21d0099 --- /dev/null +++ b/gen/python/compliance/v1/compliance_pb2.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: compliance/v1/compliance.proto +# Protobuf Python Version: 7.34.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 7, + 34, + 1, + '', + 'compliance/v1/compliance.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from approvals.v1 import approvals_pb2 as approvals_dot_v1_dot_approvals__pb2 +from governance.v1 import governance_pb2 as governance_dot_v1_dot_governance__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63ompliance/v1/compliance.proto\x12\rcompliance.v1\x1a\x1c\x61pprovals/v1/approvals.proto\x1a\x1egovernance/v1/governance.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc1\x02\n\rEvidenceQuery\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\x12\'\n\x0forganization_id\x18\x02 \x01(\tR\x0eorganizationId\x12@\n\tframework\x18\x03 \x01(\x0e\x32\".compliance.v1.ComplianceFrameworkR\tframework\x12\x39\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tstartTime\x12\x35\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65ndTime\x12\x30\n\x14\x61pproval_request_ids\x18\x06 \x03(\tR\x12\x61pprovalRequestIds\"\x88\x03\n\x0c\x45videnceItem\x12\x16\n\x06source\x18\x01 \x01(\tR\x06source\x12\x1b\n\tsource_id\x18\x02 \x01(\tR\x08sourceId\x12\x19\n\x08\x61\x63tor_id\x18\x03 \x01(\tR\x07\x61\x63torId\x12\x1d\n\nactor_name\x18\x04 \x01(\tR\tactorName\x12\x16\n\x06\x61\x63tion\x18\x05 \x01(\tR\x06\x61\x63tion\x12#\n\rresource_type\x18\x06 \x01(\tR\x0cresourceType\x12\x1f\n\x0bresource_id\x18\x07 \x01(\tR\nresourceId\x12\x18\n\x07outcome\x18\x08 \x01(\tR\x07outcome\x12\x1f\n\x0b\x63ontrol_ids\x18\t \x03(\tR\ncontrolIds\x12\x33\n\x08metadata\x18\n \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\x12;\n\x0bobserved_at\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampR\nobservedAt\"\xbb\x02\n\x0f\x43ontrolCoverage\x12\x1d\n\ncontrol_id\x18\x01 \x01(\tR\tcontrolId\x12!\n\x0c\x63ontrol_name\x18\x02 \x01(\tR\x0b\x63ontrolName\x12/\n\x13\x63ontrol_description\x18\x03 \x01(\tR\x12\x63ontrolDescription\x12%\n\x0e\x65vidence_count\x18\x04 \x01(\x05R\revidenceCount\x12\x18\n\x07\x63overed\x18\x05 \x01(\x08R\x07\x63overed\x12\x44\n\x10last_observed_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0elastObservedAt\x12.\n\x13\x65vidence_source_ids\x18\x07 \x03(\tR\x11\x65videnceSourceIds\"\x9f\x01\n\x10\x41pprovalEvidence\x12\x37\n\x07request\x18\x01 \x01(\x0b\x32\x1d.approvals.v1.ApprovalRequestR\x07request\x12<\n\tdecisions\x18\x02 \x03(\x0b\x32\x1e.approvals.v1.ApprovalDecisionR\tdecisions\x12\x14\n\x05state\x18\x03 \x01(\tR\x05state\"\x96\x01\n\tGapResult\x12\x1d\n\ncontrol_id\x18\x01 \x01(\tR\tcontrolId\x12!\n\x0c\x63ontrol_name\x18\x02 \x01(\tR\x0b\x63ontrolName\x12/\n\x13\x63ontrol_description\x18\x03 \x01(\tR\x12\x63ontrolDescription\x12\x16\n\x06reason\x18\x04 \x01(\tR\x06reason\"\x9d\x04\n\x0f\x45videncePackage\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x32\n\x05query\x18\x02 \x01(\x0b\x32\x1c.compliance.v1.EvidenceQueryR\x05query\x12=\n\x0cgenerated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x0bgeneratedAt\x12\x42\n\x0e\x65vidence_items\x18\x04 \x03(\x0b\x32\x1b.compliance.v1.EvidenceItemR\revidenceItems\x12I\n\x10\x63ontrol_coverage\x18\x05 \x03(\x0b\x32\x1e.compliance.v1.ControlCoverageR\x0f\x63ontrolCoverage\x12,\n\x04gaps\x18\x06 \x03(\x0b\x32\x18.compliance.v1.GapResultR\x04gaps\x12I\n\x10retention_policy\x18\x07 \x01(\x0b\x32\x1e.governance.v1.RetentionPolicyR\x0fretentionPolicy\x12@\n\rsafety_policy\x18\x08 \x01(\x0b\x32\x1b.governance.v1.SafetyPolicyR\x0csafetyPolicy\x12=\n\tapprovals\x18\t \x03(\x0b\x32\x1f.compliance.v1.ApprovalEvidenceR\tapprovals\"T\n\x1eGenerateEvidencePackageRequest\x12\x32\n\x05query\x18\x01 \x01(\x0b\x32\x1c.compliance.v1.EvidenceQueryR\x05query\"l\n\x1fGenerateEvidencePackageResponse\x12I\n\x10\x65vidence_package\x18\x01 \x01(\x0b\x32\x1e.compliance.v1.EvidencePackageR\x0f\x65videncePackage\"G\n\x11\x44\x65tectGapsRequest\x12\x32\n\x05query\x18\x01 \x01(\x0b\x32\x1c.compliance.v1.EvidenceQueryR\x05query\"B\n\x12\x44\x65tectGapsResponse\x12,\n\x04gaps\x18\x01 \x03(\x0b\x32\x18.compliance.v1.GapResultR\x04gaps\"H\n\x12GetCoverageRequest\x12\x32\n\x05query\x18\x01 \x01(\x0b\x32\x1c.compliance.v1.EvidenceQueryR\x05query\"\xd9\x01\n\x13GetCoverageResponse\x12I\n\x10\x63ontrol_coverage\x18\x01 \x03(\x0b\x32\x1e.compliance.v1.ControlCoverageR\x0f\x63ontrolCoverage\x12)\n\x10\x63overed_controls\x18\x02 \x01(\x05R\x0f\x63overedControls\x12%\n\x0etotal_controls\x18\x03 \x01(\x05R\rtotalControls\x12%\n\x0e\x63overage_ratio\x18\x04 \x01(\x01R\rcoverageRatio\"\x7f\n\x14\x45xportPackageRequest\x12\x32\n\x05query\x18\x01 \x01(\x0b\x32\x1c.compliance.v1.EvidenceQueryR\x05query\x12\x33\n\x06\x66ormat\x18\x02 \x01(\x0e\x32\x1b.compliance.v1.ExportFormatR\x06\x66ormat\"p\n\x15\x45xportPackageResponse\x12\x18\n\x07\x63ontent\x18\x01 \x01(\x0cR\x07\x63ontent\x12!\n\x0c\x63ontent_type\x18\x02 \x01(\tR\x0b\x63ontentType\x12\x1a\n\x08\x66ilename\x18\x03 \x01(\tR\x08\x66ilename*\x9d\x01\n\x13\x43omplianceFramework\x12$\n COMPLIANCE_FRAMEWORK_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43OMPLIANCE_FRAMEWORK_SOC2\x10\x01\x12\x1e\n\x1a\x43OMPLIANCE_FRAMEWORK_HIPAA\x10\x02\x12!\n\x1d\x43OMPLIANCE_FRAMEWORK_NIST_CSF\x10\x03*\\\n\x0c\x45xportFormat\x12\x1d\n\x19\x45XPORT_FORMAT_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45XPORT_FORMAT_JSON\x10\x01\x12\x15\n\x11\x45XPORT_FORMAT_CSV\x10\x02\x32\x92\x03\n\x11\x43omplianceService\x12x\n\x17GenerateEvidencePackage\x12-.compliance.v1.GenerateEvidencePackageRequest\x1a..compliance.v1.GenerateEvidencePackageResponse\x12Q\n\nDetectGaps\x12 .compliance.v1.DetectGapsRequest\x1a!.compliance.v1.DetectGapsResponse\x12T\n\x0bGetCoverage\x12!.compliance.v1.GetCoverageRequest\x1a\".compliance.v1.GetCoverageResponse\x12Z\n\rExportPackage\x12#.compliance.v1.ExportPackageRequest\x1a$.compliance.v1.ExportPackageResponseB & { + /** + * @generated from field: string workspace_id = 1; + */ + workspaceId: string; + + /** + * @generated from field: string organization_id = 2; + */ + organizationId: string; + + /** + * @generated from field: compliance.v1.ComplianceFramework framework = 3; + */ + framework: ComplianceFramework; + + /** + * @generated from field: google.protobuf.Timestamp start_time = 4; + */ + startTime?: Timestamp; + + /** + * @generated from field: google.protobuf.Timestamp end_time = 5; + */ + endTime?: Timestamp; + + /** + * @generated from field: repeated string approval_request_ids = 6; + */ + approvalRequestIds: string[]; +}; + +/** + * Describes the message compliance.v1.EvidenceQuery. + * Use `create(EvidenceQuerySchema)` to create a new message. + */ +export const EvidenceQuerySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 0); + +/** + * @generated from message compliance.v1.EvidenceItem + */ +export type EvidenceItem = Message<"compliance.v1.EvidenceItem"> & { + /** + * @generated from field: string source = 1; + */ + source: string; + + /** + * @generated from field: string source_id = 2; + */ + sourceId: string; + + /** + * @generated from field: string actor_id = 3; + */ + actorId: string; + + /** + * @generated from field: string actor_name = 4; + */ + actorName: string; + + /** + * @generated from field: string action = 5; + */ + action: string; + + /** + * @generated from field: string resource_type = 6; + */ + resourceType: string; + + /** + * @generated from field: string resource_id = 7; + */ + resourceId: string; + + /** + * @generated from field: string outcome = 8; + */ + outcome: string; + + /** + * @generated from field: repeated string control_ids = 9; + */ + controlIds: string[]; + + /** + * @generated from field: google.protobuf.Struct metadata = 10; + */ + metadata?: JsonObject; + + /** + * @generated from field: google.protobuf.Timestamp observed_at = 11; + */ + observedAt?: Timestamp; +}; + +/** + * Describes the message compliance.v1.EvidenceItem. + * Use `create(EvidenceItemSchema)` to create a new message. + */ +export const EvidenceItemSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 1); + +/** + * @generated from message compliance.v1.ControlCoverage + */ +export type ControlCoverage = Message<"compliance.v1.ControlCoverage"> & { + /** + * @generated from field: string control_id = 1; + */ + controlId: string; + + /** + * @generated from field: string control_name = 2; + */ + controlName: string; + + /** + * @generated from field: string control_description = 3; + */ + controlDescription: string; + + /** + * @generated from field: int32 evidence_count = 4; + */ + evidenceCount: number; + + /** + * @generated from field: bool covered = 5; + */ + covered: boolean; + + /** + * @generated from field: google.protobuf.Timestamp last_observed_at = 6; + */ + lastObservedAt?: Timestamp; + + /** + * @generated from field: repeated string evidence_source_ids = 7; + */ + evidenceSourceIds: string[]; +}; + +/** + * Describes the message compliance.v1.ControlCoverage. + * Use `create(ControlCoverageSchema)` to create a new message. + */ +export const ControlCoverageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 2); + +/** + * @generated from message compliance.v1.ApprovalEvidence + */ +export type ApprovalEvidence = Message<"compliance.v1.ApprovalEvidence"> & { + /** + * @generated from field: approvals.v1.ApprovalRequest request = 1; + */ + request?: ApprovalRequest; + + /** + * @generated from field: repeated approvals.v1.ApprovalDecision decisions = 2; + */ + decisions: ApprovalDecision[]; + + /** + * @generated from field: string state = 3; + */ + state: string; +}; + +/** + * Describes the message compliance.v1.ApprovalEvidence. + * Use `create(ApprovalEvidenceSchema)` to create a new message. + */ +export const ApprovalEvidenceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 3); + +/** + * @generated from message compliance.v1.GapResult + */ +export type GapResult = Message<"compliance.v1.GapResult"> & { + /** + * @generated from field: string control_id = 1; + */ + controlId: string; + + /** + * @generated from field: string control_name = 2; + */ + controlName: string; + + /** + * @generated from field: string control_description = 3; + */ + controlDescription: string; + + /** + * @generated from field: string reason = 4; + */ + reason: string; +}; + +/** + * Describes the message compliance.v1.GapResult. + * Use `create(GapResultSchema)` to create a new message. + */ +export const GapResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 4); + +/** + * @generated from message compliance.v1.EvidencePackage + */ +export type EvidencePackage = Message<"compliance.v1.EvidencePackage"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: compliance.v1.EvidenceQuery query = 2; + */ + query?: EvidenceQuery; + + /** + * @generated from field: google.protobuf.Timestamp generated_at = 3; + */ + generatedAt?: Timestamp; + + /** + * @generated from field: repeated compliance.v1.EvidenceItem evidence_items = 4; + */ + evidenceItems: EvidenceItem[]; + + /** + * @generated from field: repeated compliance.v1.ControlCoverage control_coverage = 5; + */ + controlCoverage: ControlCoverage[]; + + /** + * @generated from field: repeated compliance.v1.GapResult gaps = 6; + */ + gaps: GapResult[]; + + /** + * @generated from field: governance.v1.RetentionPolicy retention_policy = 7; + */ + retentionPolicy?: RetentionPolicy; + + /** + * @generated from field: governance.v1.SafetyPolicy safety_policy = 8; + */ + safetyPolicy?: SafetyPolicy; + + /** + * @generated from field: repeated compliance.v1.ApprovalEvidence approvals = 9; + */ + approvals: ApprovalEvidence[]; +}; + +/** + * Describes the message compliance.v1.EvidencePackage. + * Use `create(EvidencePackageSchema)` to create a new message. + */ +export const EvidencePackageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 5); + +/** + * @generated from message compliance.v1.GenerateEvidencePackageRequest + */ +export type GenerateEvidencePackageRequest = Message<"compliance.v1.GenerateEvidencePackageRequest"> & { + /** + * @generated from field: compliance.v1.EvidenceQuery query = 1; + */ + query?: EvidenceQuery; +}; + +/** + * Describes the message compliance.v1.GenerateEvidencePackageRequest. + * Use `create(GenerateEvidencePackageRequestSchema)` to create a new message. + */ +export const GenerateEvidencePackageRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 6); + +/** + * @generated from message compliance.v1.GenerateEvidencePackageResponse + */ +export type GenerateEvidencePackageResponse = Message<"compliance.v1.GenerateEvidencePackageResponse"> & { + /** + * @generated from field: compliance.v1.EvidencePackage evidence_package = 1; + */ + evidencePackage?: EvidencePackage; +}; + +/** + * Describes the message compliance.v1.GenerateEvidencePackageResponse. + * Use `create(GenerateEvidencePackageResponseSchema)` to create a new message. + */ +export const GenerateEvidencePackageResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 7); + +/** + * @generated from message compliance.v1.DetectGapsRequest + */ +export type DetectGapsRequest = Message<"compliance.v1.DetectGapsRequest"> & { + /** + * @generated from field: compliance.v1.EvidenceQuery query = 1; + */ + query?: EvidenceQuery; +}; + +/** + * Describes the message compliance.v1.DetectGapsRequest. + * Use `create(DetectGapsRequestSchema)` to create a new message. + */ +export const DetectGapsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 8); + +/** + * @generated from message compliance.v1.DetectGapsResponse + */ +export type DetectGapsResponse = Message<"compliance.v1.DetectGapsResponse"> & { + /** + * @generated from field: repeated compliance.v1.GapResult gaps = 1; + */ + gaps: GapResult[]; +}; + +/** + * Describes the message compliance.v1.DetectGapsResponse. + * Use `create(DetectGapsResponseSchema)` to create a new message. + */ +export const DetectGapsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 9); + +/** + * @generated from message compliance.v1.GetCoverageRequest + */ +export type GetCoverageRequest = Message<"compliance.v1.GetCoverageRequest"> & { + /** + * @generated from field: compliance.v1.EvidenceQuery query = 1; + */ + query?: EvidenceQuery; +}; + +/** + * Describes the message compliance.v1.GetCoverageRequest. + * Use `create(GetCoverageRequestSchema)` to create a new message. + */ +export const GetCoverageRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 10); + +/** + * @generated from message compliance.v1.GetCoverageResponse + */ +export type GetCoverageResponse = Message<"compliance.v1.GetCoverageResponse"> & { + /** + * @generated from field: repeated compliance.v1.ControlCoverage control_coverage = 1; + */ + controlCoverage: ControlCoverage[]; + + /** + * @generated from field: int32 covered_controls = 2; + */ + coveredControls: number; + + /** + * @generated from field: int32 total_controls = 3; + */ + totalControls: number; + + /** + * @generated from field: double coverage_ratio = 4; + */ + coverageRatio: number; +}; + +/** + * Describes the message compliance.v1.GetCoverageResponse. + * Use `create(GetCoverageResponseSchema)` to create a new message. + */ +export const GetCoverageResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 11); + +/** + * @generated from message compliance.v1.ExportPackageRequest + */ +export type ExportPackageRequest = Message<"compliance.v1.ExportPackageRequest"> & { + /** + * @generated from field: compliance.v1.EvidenceQuery query = 1; + */ + query?: EvidenceQuery; + + /** + * @generated from field: compliance.v1.ExportFormat format = 2; + */ + format: ExportFormat; +}; + +/** + * Describes the message compliance.v1.ExportPackageRequest. + * Use `create(ExportPackageRequestSchema)` to create a new message. + */ +export const ExportPackageRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 12); + +/** + * @generated from message compliance.v1.ExportPackageResponse + */ +export type ExportPackageResponse = Message<"compliance.v1.ExportPackageResponse"> & { + /** + * @generated from field: bytes content = 1; + */ + content: Uint8Array; + + /** + * @generated from field: string content_type = 2; + */ + contentType: string; + + /** + * @generated from field: string filename = 3; + */ + filename: string; +}; + +/** + * Describes the message compliance.v1.ExportPackageResponse. + * Use `create(ExportPackageResponseSchema)` to create a new message. + */ +export const ExportPackageResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_compliance_v1_compliance, 13); + +/** + * @generated from enum compliance.v1.ComplianceFramework + */ +export enum ComplianceFramework { + /** + * @generated from enum value: COMPLIANCE_FRAMEWORK_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: COMPLIANCE_FRAMEWORK_SOC2 = 1; + */ + SOC2 = 1, + + /** + * @generated from enum value: COMPLIANCE_FRAMEWORK_HIPAA = 2; + */ + HIPAA = 2, + + /** + * @generated from enum value: COMPLIANCE_FRAMEWORK_NIST_CSF = 3; + */ + NIST_CSF = 3, +} + +/** + * Describes the enum compliance.v1.ComplianceFramework. + */ +export const ComplianceFrameworkSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_compliance_v1_compliance, 0); + +/** + * @generated from enum compliance.v1.ExportFormat + */ +export enum ExportFormat { + /** + * @generated from enum value: EXPORT_FORMAT_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: EXPORT_FORMAT_JSON = 1; + */ + JSON = 1, + + /** + * @generated from enum value: EXPORT_FORMAT_CSV = 2; + */ + CSV = 2, +} + +/** + * Describes the enum compliance.v1.ExportFormat. + */ +export const ExportFormatSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_compliance_v1_compliance, 1); + +/** + * ComplianceService generates evidence packages and control coverage views. + * + * @generated from service compliance.v1.ComplianceService + */ +export const ComplianceService: GenService<{ + /** + * @generated from rpc compliance.v1.ComplianceService.GenerateEvidencePackage + */ + generateEvidencePackage: { + methodKind: "unary"; + input: typeof GenerateEvidencePackageRequestSchema; + output: typeof GenerateEvidencePackageResponseSchema; + }, + /** + * @generated from rpc compliance.v1.ComplianceService.DetectGaps + */ + detectGaps: { + methodKind: "unary"; + input: typeof DetectGapsRequestSchema; + output: typeof DetectGapsResponseSchema; + }, + /** + * @generated from rpc compliance.v1.ComplianceService.GetCoverage + */ + getCoverage: { + methodKind: "unary"; + input: typeof GetCoverageRequestSchema; + output: typeof GetCoverageResponseSchema; + }, + /** + * @generated from rpc compliance.v1.ComplianceService.ExportPackage + */ + exportPackage: { + methodKind: "unary"; + input: typeof ExportPackageRequestSchema; + output: typeof ExportPackageResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_compliance_v1_compliance, 0); + diff --git a/package.json b/package.json index 115d0d6..c9d3859 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,10 @@ "types": "./gen/dist/audit/v1/audit_pb.d.ts", "import": "./gen/dist/audit/v1/audit_pb.js" }, + "./compliance/v1/compliance_pb": { + "types": "./gen/dist/compliance/v1/compliance_pb.d.ts", + "import": "./gen/dist/compliance/v1/compliance_pb.js" + }, "./config/v1/config_pb": { "types": "./gen/dist/config/v1/config_pb.d.ts", "import": "./gen/dist/config/v1/config_pb.js" diff --git a/proto/compliance/v1/compliance.proto b/proto/compliance/v1/compliance.proto new file mode 100644 index 0000000..b0619a9 --- /dev/null +++ b/proto/compliance/v1/compliance.proto @@ -0,0 +1,127 @@ +syntax = "proto3"; + +package compliance.v1; + +option go_package = "github.com/evalops/proto/gen/go/compliance/v1;compliancev1"; + +import "approvals/v1/approvals.proto"; +import "governance/v1/governance.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +// ComplianceService generates evidence packages and control coverage views. +service ComplianceService { + rpc GenerateEvidencePackage(GenerateEvidencePackageRequest) returns (GenerateEvidencePackageResponse); + rpc DetectGaps(DetectGapsRequest) returns (DetectGapsResponse); + rpc GetCoverage(GetCoverageRequest) returns (GetCoverageResponse); + rpc ExportPackage(ExportPackageRequest) returns (ExportPackageResponse); +} + +enum ComplianceFramework { + COMPLIANCE_FRAMEWORK_UNSPECIFIED = 0; + COMPLIANCE_FRAMEWORK_SOC2 = 1; + COMPLIANCE_FRAMEWORK_HIPAA = 2; + COMPLIANCE_FRAMEWORK_NIST_CSF = 3; +} + +enum ExportFormat { + EXPORT_FORMAT_UNSPECIFIED = 0; + EXPORT_FORMAT_JSON = 1; + EXPORT_FORMAT_CSV = 2; +} + +message EvidenceQuery { + string workspace_id = 1; + string organization_id = 2; + ComplianceFramework framework = 3; + google.protobuf.Timestamp start_time = 4; + google.protobuf.Timestamp end_time = 5; + repeated string approval_request_ids = 6; +} + +message EvidenceItem { + string source = 1; + string source_id = 2; + string actor_id = 3; + string actor_name = 4; + string action = 5; + string resource_type = 6; + string resource_id = 7; + string outcome = 8; + repeated string control_ids = 9; + google.protobuf.Struct metadata = 10; + google.protobuf.Timestamp observed_at = 11; +} + +message ControlCoverage { + string control_id = 1; + string control_name = 2; + string control_description = 3; + int32 evidence_count = 4; + bool covered = 5; + google.protobuf.Timestamp last_observed_at = 6; + repeated string evidence_source_ids = 7; +} + +message ApprovalEvidence { + approvals.v1.ApprovalRequest request = 1; + repeated approvals.v1.ApprovalDecision decisions = 2; + string state = 3; +} + +message GapResult { + string control_id = 1; + string control_name = 2; + string control_description = 3; + string reason = 4; +} + +message EvidencePackage { + string id = 1; + EvidenceQuery query = 2; + google.protobuf.Timestamp generated_at = 3; + repeated EvidenceItem evidence_items = 4; + repeated ControlCoverage control_coverage = 5; + repeated GapResult gaps = 6; + governance.v1.RetentionPolicy retention_policy = 7; + governance.v1.SafetyPolicy safety_policy = 8; + repeated ApprovalEvidence approvals = 9; +} + +message GenerateEvidencePackageRequest { + EvidenceQuery query = 1; +} + +message GenerateEvidencePackageResponse { + EvidencePackage evidence_package = 1; +} + +message DetectGapsRequest { + EvidenceQuery query = 1; +} + +message DetectGapsResponse { + repeated GapResult gaps = 1; +} + +message GetCoverageRequest { + EvidenceQuery query = 1; +} + +message GetCoverageResponse { + repeated ControlCoverage control_coverage = 1; + int32 covered_controls = 2; + int32 total_controls = 3; + double coverage_ratio = 4; +} + +message ExportPackageRequest { + EvidenceQuery query = 1; + ExportFormat format = 2; +} + +message ExportPackageResponse { + bytes content = 1; + string content_type = 2; + string filename = 3; +}