Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyBundleAttestation ¶
VerifyBundleAttestation re-reads the bundle and its DSSE attestation and confirms the signature covers the current bundle bytes. It returns an error if the attestation is missing, the signature is invalid for pub, or the bundle on disk no longer matches the signed digest (i.e. it was tampered after signing).
Types ¶
type BatchBundle ¶
type BatchBundle struct {
SchemaVersion string `json:"schema_version"`
BundleID string `json:"bundle_id"`
ExportedAt string `json:"exported_at"`
Query BatchExportOptions `json:"query"`
Summary BatchSummary `json:"summary"`
RunBundles []BundleInfo `json:"run_bundles,omitempty"`
EvalContexts []signal.EvalContext `json:"eval_contexts,omitempty"`
Commands []BatchCommandRef `json:"commands"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
}
type BatchBundleInfo ¶
type BatchBundleInfo struct {
SchemaVersion string `json:"schema_version"`
ID string `json:"id"`
BatchID string `json:"batch_id,omitempty"`
Path string `json:"path"`
SHA256 string `json:"sha256"`
SizeBytes int64 `json:"size_bytes"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
RunCount int `json:"run_count"`
ItemCount int `json:"item_count"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
RunBundles []BundleInfo `json:"run_bundles,omitempty"`
Query BatchExportOptions `json:"query"`
}
type BatchCommandRef ¶
type BatchExportOptions ¶
type BatchExportOptions struct {
BatchID string `json:"batch_id,omitempty"`
RunID string `json:"run_id,omitempty"`
JobID string `json:"job_id,omitempty"`
ShardID string `json:"shard_id,omitempty"`
Latest bool `json:"latest,omitempty"`
Limit int `json:"limit"`
IncludeRunBundles bool `json:"include_run_bundles"`
IncludeEvalContexts bool `json:"include_eval_contexts,omitempty"`
}
type BatchHead ¶
type BatchHead struct {
BatchID string `json:"batch_id"`
InputSHA256 string `json:"input_sha256"`
StartedAt string `json:"started_at"`
EndedAt string `json:"ended_at"`
JobCount int `json:"job_count"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
Shards map[string]int `json:"shards,omitempty"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
CreatedAt string `json:"created_at"`
}
type BatchItem ¶
type BatchItem struct {
BatchID string `json:"batch_id"`
Index int `json:"index"`
JobID string `json:"job_id,omitempty"`
ShardID string `json:"shard_id,omitempty"`
RunID string `json:"run_id,omitempty"`
AttemptID string `json:"attempt_id,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ProcessID string `json:"process_id,omitempty"`
Workdir string `json:"workdir,omitempty"`
Command string `json:"command,omitempty"`
Status string `json:"status"`
ExitCode int `json:"exit_code"`
WallMS int64 `json:"wall_ms"`
ChangedFileCount int `json:"changed_file_count"`
ChangedFiles []string `json:"changed_files,omitempty"`
Error string `json:"error,omitempty"`
EvidenceManifestCommand string `json:"evidence_manifest_command,omitempty"`
EvalContextCommand string `json:"eval_context_command,omitempty"`
ExplainCommand string `json:"explain_command,omitempty"`
}
type BatchSummary ¶
type BatchSummary struct {
SchemaVersion string `json:"schema_version"`
Query BatchExportOptions `json:"query"`
BatchCount int `json:"batch_count"`
ItemCount int `json:"item_count"`
Passed int `json:"passed"`
Failed int `json:"failed"`
Skipped int `json:"skipped"`
StatusCounts map[string]int `json:"status_counts"`
Shards map[string]int `json:"shards,omitempty"`
RunIDs []string `json:"run_ids"`
Batches []BatchHead `json:"batches"`
Items []BatchItem `json:"items"`
ResultSetID string `json:"result_set_id"`
PageHash string `json:"page_hash"`
}
func BuildBatchSummary ¶
func BuildBatchSummary(db *sql.DB, opts BatchExportOptions) (BatchSummary, error)
type BundleInfo ¶
type BundleInfo struct {
SchemaVersion string `json:"schema_version"`
ID string `json:"id"`
RunID string `json:"run_id"`
Path string `json:"path"`
SHA256 string `json:"sha256"`
SizeBytes int64 `json:"size_bytes"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
Signed bool `json:"signed"`
AttestationPath string `json:"attestation_path,omitempty"`
}
type Service ¶
type Service struct {
DB *sql.DB
Paths store.Paths
// SignKey, when set, makes ExportBundle emit a capture-time DSSE/in-toto
// attestation over the bundle's sha256 for tamper-evidence.
// When nil, bundles are produced unsigned and behavior is unchanged.
SignKey ed25519.PrivateKey
SignKeyID string
}
func (Service) ExportBatch ¶
func (s Service) ExportBatch(opts BatchExportOptions) (BatchBundleInfo, error)
func (Service) ExportBundle ¶
func (s Service) ExportBundle(runID string) (BundleInfo, error)
Click to show internal directories.
Click to hide internal directories.