Documentation
¶
Index ¶
- type BuildOptions
- type BuildRequest
- type BuildResult
- type Builder
- type DecryptOptions
- type DecryptResult
- type EncryptOptions
- type EncryptResult
- type EncryptedArtifact
- type EncryptedArtifactKey
- type EvidencePackBuilder
- type HashMismatch
- type IncidentPackOptions
- type IncidentPackResult
- type RetentionFileEvent
- type RetentionOptions
- type RetentionResult
- type VerifyOptions
- type VerifyResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildOptions ¶
type BuildOptions struct {
RunpackPath string
OutputPath string
CaseID string
TemplateID string
InventoryPaths []string
TracePaths []string
RegressPaths []string
ApprovalAuditPaths []string
CredentialEvidencePaths []string
ExtraEvidenceFiles map[string][]byte
RenderPDF bool
IncidentWindow *schemaguard.Window
AutoDiscoverV12 bool
ProducerVersion string
SignKey ed25519.PrivateKey
}
type BuildRequest ¶
type BuildResult ¶
type BuildResult struct {
PackPath string
Manifest schemaguard.PackManifest
}
func BuildPack ¶
func BuildPack(options BuildOptions) (BuildResult, error)
type Builder ¶
type Builder struct {
ProducerVersion string
}
func (Builder) Build ¶
func (builder Builder) Build(_ context.Context, request BuildRequest) (schemaguard.PackManifest, error)
type DecryptOptions ¶
type DecryptResult ¶
type DecryptResult struct {
Path string `json:"path"`
PlainSHA256 string `json:"plain_sha256"`
PlainSize int `json:"plain_size"`
}
func DecryptArtifact ¶
func DecryptArtifact(options DecryptOptions) (DecryptResult, error)
type EncryptOptions ¶
type EncryptResult ¶
type EncryptResult struct {
Path string `json:"path"`
Artifact EncryptedArtifact `json:"artifact"`
KeySource EncryptedArtifactKey `json:"key_source"`
}
func EncryptArtifact ¶
func EncryptArtifact(options EncryptOptions) (EncryptResult, error)
type EncryptedArtifact ¶
type EncryptedArtifact struct {
SchemaID string `json:"schema_id"`
SchemaVersion string `json:"schema_version"`
CreatedAt time.Time `json:"created_at"`
ProducerVersion string `json:"producer_version"`
Algorithm string `json:"algorithm"`
KeySource EncryptedArtifactKey `json:"key_source"`
Nonce string `json:"nonce"`
Ciphertext string `json:"ciphertext"`
PlainSHA256 string `json:"plain_sha256"`
PlainSize int `json:"plain_size"`
}
type EncryptedArtifactKey ¶
type EvidencePackBuilder ¶
type EvidencePackBuilder interface {
Build(context.Context, BuildRequest) (schemaguard.PackManifest, error)
}
type HashMismatch ¶
type IncidentPackOptions ¶
type IncidentPackResult ¶
type IncidentPackResult struct {
BuildResult BuildResult `json:"build_result"`
WindowFrom time.Time `json:"window_from"`
WindowTo time.Time `json:"window_to"`
TraceCount int `json:"trace_count"`
RegressCount int `json:"regress_count"`
ApprovalAuditCount int `json:"approval_audit_count"`
CredentialEvidenceCount int `json:"credential_evidence_count"`
PolicyDigests []string `json:"policy_digests"`
}
func BuildIncidentPack ¶
func BuildIncidentPack(options IncidentPackOptions) (IncidentPackResult, error)
type RetentionFileEvent ¶
type RetentionOptions ¶
type RetentionResult ¶
type RetentionResult struct {
SchemaID string `json:"schema_id"`
SchemaVersion string `json:"schema_version"`
CreatedAt time.Time `json:"created_at"`
ProducerVersion string `json:"producer_version"`
RootPath string `json:"root_path"`
DryRun bool `json:"dry_run"`
TraceTTLSeconds int64 `json:"trace_ttl_seconds"`
PackTTLSeconds int64 `json:"pack_ttl_seconds"`
ScannedFiles int `json:"scanned_files"`
DeletedFiles []RetentionFileEvent `json:"deleted_files"`
KeptFiles []RetentionFileEvent `json:"kept_files"`
}
func ApplyRetention ¶
func ApplyRetention(options RetentionOptions) (RetentionResult, error)
type VerifyOptions ¶
type VerifyResult ¶
type VerifyResult struct {
PackID string `json:"pack_id,omitempty"`
RunID string `json:"run_id,omitempty"`
FilesChecked int `json:"files_checked"`
MissingFiles []string `json:"missing_files,omitempty"`
HashMismatches []HashMismatch `json:"hash_mismatches,omitempty"`
SignatureStatus string `json:"signature_status,omitempty"`
SignatureErrors []string `json:"signature_errors,omitempty"`
SignaturesTotal int `json:"signatures_total"`
SignaturesValid int `json:"signatures_valid"`
}
func VerifyPack ¶
func VerifyPack(path string) (VerifyResult, error)
func VerifyPackWithOptions ¶
func VerifyPackWithOptions(path string, opts VerifyOptions) (VerifyResult, error)
Click to show internal directories.
Click to hide internal directories.