Documentation
¶
Index ¶
- Constants
- func AppendToChain(c *Chain, r *Record) error
- func Canonicalize(input []byte, domain CanonDomain) ([]byte, error)
- func CanonicalizeControlContainmentTelemetry(p *ControlContainmentTelemetryProfile) ([]byte, error)
- func ComputeRecordHash(r *Record) (string, error)
- func IsDependencyMissing(err error) bool
- func IsKeyRevoked(list RevocationList, keyID string, at time.Time) bool
- func RegisterCustomType(recordType string, schemaJSON []byte) error
- func RegisterCustomTypeSchema(recordType, schemaPath string) error
- func ResetCustomTypes()
- func ValidateControlContainmentTelemetry(p *ControlContainmentTelemetryProfile) error
- func ValidateControlContainmentTelemetryProfile(p *ControlContainmentTelemetryProfile) error
- func ValidateCustomTypeSchema(schemaPath string) error
- func ValidateGovernanceEvent(event GovernanceEvent) error
- func ValidateRecord(r *Record) error
- func ValidateRecordWithRegistry(registry *SchemaRegistry, r *Record) error
- func Verify(r *Record, publicKey PublicKey) error
- func VerifyChainSignature(c *Chain, sig Signature, pub PublicKey) error
- func VerifyCosign(r *Record, keyPath string) error
- func VerifyCosignWithOptions(r *Record, opts CosignVerifyOpts) error
- func VerifyRevocationList(list RevocationList, pub PublicKey) error
- func WriteRecord(path string, r *Record) error
- type AgentChainHop
- type AgentLineageHop
- type BundleManifest
- func SignBundle(path string, key SigningKey) (*BundleManifest, error)deprecated
- func SignBundleCosign(path string, keyPath string) (*BundleManifest, error)deprecated
- func SignBundleCosignFile(path string, keyPath string) (*BundleManifest, error)
- func SignBundleFile(path string, key SigningKey) (*BundleManifest, error)
- func SignBundleManifest(manifest BundleManifest, key SigningKey) (*BundleManifest, error)
- func SignBundleManifestCosign(manifest BundleManifest, keyPath string) (*BundleManifest, error)
- func VerifyBundle(path string, opts BundleVerifyOpts) (*BundleManifest, error)
- type BundleManifestEntry
- type BundleVerifyOpts
- type CanonDomain
- type Chain
- type ChainVerification
- func VerifyChain(c *Chain) (*ChainVerification, error)
- func VerifyChainRange(c *Chain, from, to time.Time) (*ChainVerification, error)
- func VerifyChainRangeWithOptions(c *Chain, from, to time.Time, opts ChainVerifyOpts) (*ChainVerification, error)
- func VerifyChainWithOptions(c *Chain, opts ChainVerifyOpts) (*ChainVerification, error)
- type ChainVerifyOpts
- type ControlContainmentTelemetry
- type ControlContainmentTelemetryProfile
- type ControlContainmentTelemetryRef
- type Controls
- type CorrelationRef
- type CosignVerifyOpts
- type Digest
- type ErrorKind
- type Framework
- type FrameworkControlCoverage
- type FrameworkCoverage
- type FrameworkEvidenceSetCoverage
- type GovernanceEvent
- type Integrity
- type LibraryError
- type PolicyRef
- type PublicKey
- type Record
- func NewRecord(opts RecordOpts) (*Record, error)
- func NewRecordFromEvent(event GovernanceEvent, source string) (*Record, error)
- func ReadAndValidateRecord(path string) (*Record, error)
- func ReadRecord(path string) (*Record, error)
- func Sign(r *Record, key SigningKey) (*Record, error)
- func SignCosign(r *Record, keyPath string) (*Record, error)
- type RecordOpts
- type RecordType
- type RecordTypeDefinition
- type RecordTypeManifest
- type RedactionMetadata
- type Registry
- type Relations
- type Relationship
- type RelationshipEdge
- type RelationshipRef
- type RevocationEntry
- type RevocationList
- type SchemaRegistry
- type Signature
- type SigningKey
Constants ¶
const ( ErrorKindInvalidInput = coreerr.KindInvalidInput ErrorKindValidation = coreerr.KindValidation ErrorKindVerification = coreerr.KindVerification ErrorKindDependencyMissing = coreerr.KindDependencyMissing ErrorKindInternal = coreerr.KindInternal )
const ( RecordTypeManifestVersion = schema.RecordTypeManifestVersion RecordTypeManifestPath = schema.RecordTypeManifestPath DomainJSON = canon.DomainJSON DomainSQL = canon.DomainSQL DomainURL = canon.DomainURL DomainText = canon.DomainText DomainPrompt = canon.DomainPrompt )
const ( ControlContainmentTelemetryProfileVersion = record.ControlContainmentTelemetryProfileVersion BindingModeIdentifierOnly = record.BindingModeIdentifierOnly BindingModeDigestBound = record.BindingModeDigestBound )
const ( ErrorCodeRelationshipRefIDRequired = record.ErrorCodeRelationshipRefIDRequired ErrorCodeRelationshipRefKindInvalid = record.ErrorCodeRelationshipRefKindInvalid ErrorCodeRelationshipRefDigestInvalid = record.ErrorCodeRelationshipRefDigestInvalid ErrorCodeRelationshipEdgeKindInvalid = record.ErrorCodeRelationshipEdgeKindInvalid ErrorCodeChainRecordCountMismatch = chain.ErrorCodeRecordCountMismatch ErrorCodeChainHeadHashMismatch = chain.ErrorCodeHeadHashMismatch ErrorCodeStructurePathInvalid = structure.ErrorCodePathInvalid ErrorCodeStructurePathAmbiguous = structure.ErrorCodePathAmbiguous ErrorCodeStructurePathDuplicate = structure.ErrorCodePathDuplicate ErrorCodeStructureUnlistedFile = structure.ErrorCodeUnlistedFile ErrorCodeStructureSymlinkAmbiguous = structure.ErrorCodeSymlinkAmbiguous )
Variables ¶
This section is empty.
Functions ¶
func AppendToChain ¶
func Canonicalize ¶
func Canonicalize(input []byte, domain CanonDomain) ([]byte, error)
func CanonicalizeControlContainmentTelemetry ¶ added in v0.6.0
func CanonicalizeControlContainmentTelemetry(p *ControlContainmentTelemetryProfile) ([]byte, error)
func ComputeRecordHash ¶
func IsDependencyMissing ¶
func IsKeyRevoked ¶
func IsKeyRevoked(list RevocationList, keyID string, at time.Time) bool
func RegisterCustomType ¶
func ResetCustomTypes ¶
func ResetCustomTypes()
func ValidateControlContainmentTelemetry ¶ added in v0.6.0
func ValidateControlContainmentTelemetry(p *ControlContainmentTelemetryProfile) error
func ValidateControlContainmentTelemetryProfile ¶ added in v0.6.0
func ValidateControlContainmentTelemetryProfile(p *ControlContainmentTelemetryProfile) error
func ValidateGovernanceEvent ¶ added in v0.4.2
func ValidateGovernanceEvent(event GovernanceEvent) error
ValidateGovernanceEvent validates a governance event against the embedded governance event schema.
func ValidateRecord ¶
func ValidateRecordWithRegistry ¶ added in v0.6.0
func ValidateRecordWithRegistry(registry *SchemaRegistry, r *Record) error
ValidateRecordWithRegistry validates using a caller-owned scoped registry. A nil registry preserves the legacy process-global custom type behavior.
func VerifyCosign ¶
func VerifyCosignWithOptions ¶
func VerifyCosignWithOptions(r *Record, opts CosignVerifyOpts) error
func VerifyRevocationList ¶
func VerifyRevocationList(list RevocationList, pub PublicKey) error
func WriteRecord ¶
Types ¶
type AgentChainHop ¶ added in v0.4.5
type AgentChainHop = record.AgentChainHop
type AgentLineageHop ¶ added in v0.4.5
type AgentLineageHop = record.AgentLineageHop
type BundleManifest ¶
func SignBundle
deprecated
func SignBundle(path string, key SigningKey) (*BundleManifest, error)
Deprecated: SignBundle mutates <path>/manifest.json. Use SignBundleManifest for pure signing or SignBundleFile for explicit file mutation.
func SignBundleCosign
deprecated
func SignBundleCosign(path string, keyPath string) (*BundleManifest, error)
Deprecated: SignBundleCosign mutates <path>/manifest.json. Use SignBundleManifestCosign for pure signing or SignBundleCosignFile for explicit file mutation.
func SignBundleCosignFile ¶ added in v0.4.6
func SignBundleCosignFile(path string, keyPath string) (*BundleManifest, error)
func SignBundleFile ¶ added in v0.4.6
func SignBundleFile(path string, key SigningKey) (*BundleManifest, error)
func SignBundleManifest ¶ added in v0.4.6
func SignBundleManifest(manifest BundleManifest, key SigningKey) (*BundleManifest, error)
func SignBundleManifestCosign ¶ added in v0.4.6
func SignBundleManifestCosign(manifest BundleManifest, keyPath string) (*BundleManifest, error)
func VerifyBundle ¶
func VerifyBundle(path string, opts BundleVerifyOpts) (*BundleManifest, error)
type BundleManifestEntry ¶
type BundleManifestEntry = bundle.ManifestEntry
type BundleVerifyOpts ¶
type BundleVerifyOpts = bundle.VerifyOpts
type CanonDomain ¶
type ChainVerification ¶
type ChainVerification = chain.Verification
func VerifyChain ¶
func VerifyChain(c *Chain) (*ChainVerification, error)
func VerifyChainRange ¶
func VerifyChainRange(c *Chain, from, to time.Time) (*ChainVerification, error)
func VerifyChainRangeWithOptions ¶ added in v0.5.0
func VerifyChainRangeWithOptions(c *Chain, from, to time.Time, opts ChainVerifyOpts) (*ChainVerification, error)
func VerifyChainWithOptions ¶ added in v0.5.0
func VerifyChainWithOptions(c *Chain, opts ChainVerifyOpts) (*ChainVerification, error)
type ChainVerifyOpts ¶ added in v0.5.0
type ChainVerifyOpts = chain.VerifyOpts
type ControlContainmentTelemetry ¶ added in v0.6.0
type ControlContainmentTelemetry = record.ControlContainmentTelemetry
type ControlContainmentTelemetryProfile ¶ added in v0.6.0
type ControlContainmentTelemetryProfile = record.ControlContainmentTelemetryProfile
type ControlContainmentTelemetryRef ¶ added in v0.6.0
type ControlContainmentTelemetryRef = record.ControlContainmentTelemetryRef
type CorrelationRef ¶ added in v0.6.0
type CorrelationRef = record.CorrelationRef
type CosignVerifyOpts ¶
type CosignVerifyOpts = signing.CosignVerifyOpts
type Digest ¶
func DigestHMACValue ¶
func DigestValue ¶
func DigestValue(input []byte, domain CanonDomain, saltID string) (Digest, error)
type Framework ¶
func LoadFramework ¶
type FrameworkControlCoverage ¶ added in v0.5.0
type FrameworkControlCoverage = framework.ControlCoverage
type FrameworkCoverage ¶ added in v0.5.0
func EvaluateFrameworkCoverage ¶ added in v0.5.0
func EvaluateFrameworkCoverage(f *Framework, records []Record) (*FrameworkCoverage, error)
EvaluateFrameworkCoverage reports deterministic evidence-path coverage only. Deprecated: callers must not treat this helper as a compliance decision or regulatory applicability engine; use product-owned compliance evaluation for those semantics while this compatibility API remains available.
type FrameworkEvidenceSetCoverage ¶ added in v0.5.0
type FrameworkEvidenceSetCoverage = framework.EvidenceSetCoverage
type GovernanceEvent ¶ added in v0.4.2
type GovernanceEvent struct {
EventID string `json:"event_id"`
Timestamp string `json:"timestamp"`
EventType string `json:"event_type"`
AgentID string `json:"agent_id,omitempty"`
ToolName string `json:"tool_name,omitempty"`
Verdict string `json:"verdict,omitempty"`
Context map[string]any `json:"context,omitempty"`
Detail map[string]any `json:"detail,omitempty"`
}
GovernanceEvent is a lightweight, unsigned governance signal that can be promoted into a signed proof record.
type LibraryError ¶ added in v0.4.6
func AsLibraryError ¶ added in v0.4.6
func AsLibraryError(err error) (*LibraryError, bool)
type Record ¶
func NewRecord ¶
func NewRecord(opts RecordOpts) (*Record, error)
func NewRecordFromEvent ¶ added in v0.4.2
func NewRecordFromEvent(event GovernanceEvent, source string) (*Record, error)
NewRecordFromEvent creates a proof.Record from a validated governance event. The caller is responsible for signing and chain-appending the returned record.
func ReadAndValidateRecord ¶ added in v0.4.6
func ReadRecord ¶
type RecordOpts ¶
type RecordOpts = record.RecordOpts
type RecordType ¶
type RecordType = schema.RecordType
func ListRecordTypes ¶
func ListRecordTypes() []RecordType
type RecordTypeDefinition ¶ added in v0.6.0
type RecordTypeDefinition = schema.RecordTypeDefinition
type RecordTypeManifest ¶ added in v0.6.0
type RecordTypeManifest = schema.RecordTypeManifest
func ParseRecordTypeManifest ¶ added in v0.6.0
func ParseRecordTypeManifest(raw []byte) (RecordTypeManifest, error)
type RedactionMetadata ¶ added in v0.6.0
type RedactionMetadata = record.RedactionMetadata
type Registry ¶ added in v0.6.0
func NewRegistry ¶ added in v0.6.0
func NewRegistry() *Registry
type Relationship ¶ added in v0.4.5
type Relationship = record.Relationship
type RelationshipEdge ¶ added in v0.4.5
type RelationshipEdge = record.RelationshipEdge
type RelationshipRef ¶ added in v0.4.5
type RelationshipRef = record.RelationshipRef
type RevocationEntry ¶
type RevocationEntry = signing.RevocationEntry
type RevocationList ¶
type RevocationList = signing.RevocationList
func SignRevocationList ¶
func SignRevocationList(list RevocationList, key SigningKey) (RevocationList, error)
type SchemaRegistry ¶ added in v0.6.0
func LoadRecordTypeManifest ¶ added in v0.6.0
func LoadRecordTypeManifest(raw []byte, schemaFiles map[string][]byte) (*SchemaRegistry, error)
func LoadRecordTypeManifestWithResources ¶ added in v0.6.0
func LoadRecordTypeManifestWithResources(raw []byte, schemaFiles map[string][]byte) (*SchemaRegistry, error)
func NewSchemaRegistry ¶ added in v0.6.0
func NewSchemaRegistry() *SchemaRegistry
type SigningKey ¶
type SigningKey = signing.SigningKey
func GenerateSigningKey ¶
func GenerateSigningKey() (SigningKey, error)