releaseprojection

package
v3.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapabilityContractSetSHA256

func CapabilityContractSetSHA256(summary ExternalPackageSecuritySummary) (string, error)

CapabilityContractSetSHA256 returns the digest bound to the exact ordered capability contract projection shown to a user.

func ProjectManifestWithCapabilityContracts

func ProjectManifestWithCapabilityContracts(m manifest.Manifest, contracts []capabilitycontract.KnownContract) (manifest.Manifest, map[string][]string, error)

ProjectManifestWithCapabilityContracts resolves the signed capability bindings against the exact Host contract artifacts supplied by the caller. It is the single projection used when release evidence is produced and when a Host validates the same evidence during installation.

func SecuritySummarySHA256

func SecuritySummarySHA256(summary ExternalPackageSecuritySummary) (string, error)

SecuritySummarySHA256 returns the digest of the canonical summary payload.

Types

type ExternalPackageCancelSummary

type ExternalPackageCancelSummary struct {
	Cancelable        bool   `json:"cancelable"`
	DisableBehavior   string `json:"disable_behavior"`
	UninstallBehavior string `json:"uninstall_behavior"`
	AckTimeoutMS      int    `json:"ack_timeout_ms"`
}

type ExternalPackageCapabilityContractSummary

type ExternalPackageCapabilityContractSummary struct {
	BindingID         string `json:"binding_id"`
	CapabilityID      string `json:"capability_id"`
	CapabilityVersion string `json:"capability_version"`
	ContractSHA256    string `json:"contract_sha256"`
}

type ExternalPackageConfirmationSummary

type ExternalPackageConfirmationSummary struct {
	Mode              string   `json:"mode"`
	PreflightMethod   string   `json:"preflight_method,omitempty"`
	RequestHashFields []string `json:"request_hash_fields"`
	PlanHashRequired  bool     `json:"plan_hash_required"`
}

type ExternalPackageCoreActionSummary

type ExternalPackageCoreActionSummary struct {
	Method   string `json:"method"`
	ActionID string `json:"action_id"`
	Effect   string `json:"effect"`
}

type ExternalPackageExecutionApproval

type ExternalPackageExecutionApproval struct {
	State       string     `json:"state"`
	ReasonCodes []string   `json:"reason_codes"`
	AssessedAt  time.Time  `json:"assessed_at"`
	ApprovedAt  *time.Time `json:"approved_at,omitempty"`
}

type ExternalPackageIntent

type ExternalPackageIntent struct {
	Action                     string `json:"action"`
	PluginInstanceID           string `json:"plugin_instance_id,omitempty"`
	ExpectedManagementRevision uint64 `json:"expected_management_revision,omitempty"`
}

type ExternalPackageIntentSummary

type ExternalPackageIntentSummary struct {
	IntentID string `json:"intent_id"`
	Method   string `json:"method"`
}

type ExternalPackageMethodRouteSummary

type ExternalPackageMethodRouteSummary struct {
	Kind         string `json:"kind"`
	BindingID    string `json:"binding_id,omitempty"`
	TargetMethod string `json:"target_method,omitempty"`
	WorkerID     string `json:"worker_id,omitempty"`
	ActionID     string `json:"action_id,omitempty"`
}

type ExternalPackageMethodSummary

type ExternalPackageMethodSummary struct {
	Method              string                             `json:"method"`
	Route               ExternalPackageMethodRouteSummary  `json:"route"`
	Effect              string                             `json:"effect"`
	Execution           string                             `json:"execution"`
	Dangerous           bool                               `json:"dangerous"`
	PreflightOnly       bool                               `json:"preflight_only"`
	RequiredPermissions []string                           `json:"required_permissions"`
	Confirmation        ExternalPackageConfirmationSummary `json:"confirmation"`
	Cancel              *ExternalPackageCancelSummary      `json:"cancel,omitempty"`
}

type ExternalPackageNetworkMethodAccessSummary

type ExternalPackageNetworkMethodAccessSummary struct {
	Method      string   `json:"method"`
	Operations  []string `json:"operations"`
	HTTPMethods []string `json:"http_methods"`
}

type ExternalPackageNetworkSummary

type ExternalPackageNetworkSummary struct {
	ConnectorID  string                                      `json:"connector_id"`
	Transport    string                                      `json:"transport"`
	Scope        string                                      `json:"scope"`
	Destinations []string                                    `json:"destinations"`
	AuthDeclared bool                                        `json:"auth_declared"`
	TLSDeclared  bool                                        `json:"tls_declared"`
	MethodAccess []ExternalPackageNetworkMethodAccessSummary `json:"method_access"`
}

type ExternalPackagePermissionSummary

type ExternalPackagePermissionSummary struct {
	PermissionID string   `json:"permission_id"`
	Methods      []string `json:"methods"`
	Required     bool     `json:"required"`
	Effects      []string `json:"effects"`
}

type ExternalPackageRedirectHop

type ExternalPackageRedirectHop struct {
	Origin string `json:"origin"`
	Path   string `json:"path"`
}

type ExternalPackageSecretRefSummary

type ExternalPackageSecretRefSummary struct {
	SettingKey string `json:"setting_key"`
	SecretRef  string `json:"secret_ref"`
	Scope      string `json:"scope"`
}

type ExternalPackageSecuritySummary

type ExternalPackageSecuritySummary struct {
	SummarySHA256       string                                     `json:"summary_sha256"`
	Permissions         []ExternalPackagePermissionSummary         `json:"permissions"`
	Methods             []ExternalPackageMethodSummary             `json:"methods"`
	CapabilityContracts []ExternalPackageCapabilityContractSummary `json:"capability_contracts"`
	Workers             []ExternalPackageWorkerSummary             `json:"workers"`
	Network             []ExternalPackageNetworkSummary            `json:"network"`
	Storage             []ExternalPackageStorageSummary            `json:"storage"`
	SecretRefs          []ExternalPackageSecretRefSummary          `json:"secret_refs"`
	CoreActions         []ExternalPackageCoreActionSummary         `json:"core_actions"`
	Intents             []ExternalPackageIntentSummary             `json:"intents"`
	Surfaces            []ExternalPackageSurfaceSummary            `json:"surfaces"`
}

func BuildExternalPackageSecuritySummary

func BuildExternalPackageSecuritySummary(m manifest.Manifest, pins []capabilitycontract.Pin, required map[string][]string) (ExternalPackageSecuritySummary, error)

BuildExternalPackageSecuritySummary is the host-neutral, deterministic permission projection used by release publishers, markets, and Hosts.

func BuildExternalPackageSecuritySummaryFromContracts

func BuildExternalPackageSecuritySummaryFromContracts(m manifest.Manifest, contracts []capabilitycontract.KnownContract) (ExternalPackageSecuritySummary, error)

BuildExternalPackageSecuritySummaryFromContracts derives both effective method policy and permissions from exact capability contract artifacts.

type ExternalPackageSignatureAssessment

type ExternalPackageSignatureAssessment struct {
	State           string         `json:"state"`
	ReasonCodes     []string       `json:"reason_codes"`
	AssessedHashes  PackageHashSet `json:"assessed_hashes"`
	Algorithm       string         `json:"algorithm,omitempty"`
	KeyID           string         `json:"key_id,omitempty"`
	AssessedAt      time.Time      `json:"assessed_at"`
	AssessmentEpoch string         `json:"assessment_epoch,omitempty"`
}

type ExternalPackageSizeSummary

type ExternalPackageSizeSummary struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

type ExternalPackageSourceProvenance

type ExternalPackageSourceProvenance struct {
	Kind              string                       `json:"kind"`
	UploadID          string                       `json:"upload_id,omitempty"`
	SourceOrigin      string                       `json:"source_origin,omitempty"`
	SourcePath        string                       `json:"source_path,omitempty"`
	RedirectChain     []ExternalPackageRedirectHop `json:"redirect_chain,omitempty"`
	RepositoryID      string                       `json:"repository_id,omitempty"`
	ReleaseID         string                       `json:"release_id,omitempty"`
	AssetID           string                       `json:"asset_id,omitempty"`
	RepositoryURL     string                       `json:"repository_url,omitempty"`
	Owner             string                       `json:"owner,omitempty"`
	Repository        string                       `json:"repository,omitempty"`
	ResolvedCommitSHA string                       `json:"resolved_commit_sha,omitempty"`
	ReleaseTag        string                       `json:"release_tag,omitempty"`
	AssetName         string                       `json:"asset_name,omitempty"`
	PackageSHA256     string                       `json:"package_sha256"`
	ResolvedAt        time.Time                    `json:"resolved_at"`
}

func (ExternalPackageSourceProvenance) MarshalJSON

func (provenance ExternalPackageSourceProvenance) MarshalJSON() ([]byte, error)

type ExternalPackageStorageMethodAccessSummary

type ExternalPackageStorageMethodAccessSummary struct {
	Method     string   `json:"method"`
	Operations []string `json:"operations"`
}

type ExternalPackageStorageSummary

type ExternalPackageStorageSummary struct {
	StoreID       string                                      `json:"store_id"`
	Kind          string                                      `json:"kind"`
	Scope         string                                      `json:"scope"`
	QuotaBytes    int64                                       `json:"quota_bytes"`
	QuotaFiles    *int64                                      `json:"quota_files,omitempty"`
	SchemaVersion int                                         `json:"schema_version"`
	MethodAccess  []ExternalPackageStorageMethodAccessSummary `json:"method_access"`
}

type ExternalPackageSurfaceSummary

type ExternalPackageSurfaceSummary struct {
	SurfaceID   string                      `json:"surface_id"`
	Kind        string                      `json:"kind"`
	Intent      string                      `json:"intent"`
	Label       string                      `json:"label"`
	Entry       string                      `json:"entry"`
	Icon        string                      `json:"icon,omitempty"`
	DefaultSize *ExternalPackageSizeSummary `json:"default_size,omitempty"`
}

type ExternalPackageUpdateEligibility

type ExternalPackageUpdateEligibility struct {
	State       string    `json:"state"`
	ReasonCodes []string  `json:"reason_codes"`
	AssessedAt  time.Time `json:"assessed_at"`
}

type ExternalPackageWorkerSummary

type ExternalPackageWorkerSummary struct {
	WorkerID         string `json:"worker_id"`
	Artifact         string `json:"artifact"`
	Mode             string `json:"mode"`
	Scope            string `json:"scope"`
	MemoryLimitBytes int64  `json:"memory_limit_bytes"`
	IdleTimeoutMS    int    `json:"idle_timeout_ms"`
}

type PackageHashSet

type PackageHashSet struct {
	PackageSHA256  string `json:"package_sha256"`
	ManifestSHA256 string `json:"manifest_sha256"`
	EntriesSHA256  string `json:"entries_sha256"`
}

Jump to

Keyboard shortcuts

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