Documentation
¶
Overview ¶
Package verify implements `writ verify` — publisher-signature verification for graph and trace documents (phase-8 step 46).
Each document is decoded (a graph loads through op.LoadGraph, whose integrity check also validates the checksum; a trace decodes directly), re-canonicalized, and verified under the settled model: a raw ssh-ed25519 signature over the namespace-prefixed canonical bytes, the publisher resolved against the verifier's `allowed_signers`. What happens to each outcome is the signing.Policy ladder — the command reports every verdict and exits non-zero only when the policy rejects a document.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Paths are the documents to verify.
Paths []string
// Policy governs what each verdict does to the exit status.
Policy signing.Policy
// AllowedSigners overrides the trust-list path; "" uses the default (`<config>/devlore/allowed_signers`).
AllowedSigners string
}
Config carries the resolved settings for one verify invocation.
type Report ¶
type Report struct {
// Path is the document as given.
Path string `json:"path"`
// Kind is "graph" or "trace".
Kind string `json:"kind"`
// Outcome is the verification classification.
Outcome string `json:"outcome"`
// Principal is the trusted publisher identity when valid.
Principal string `json:"principal,omitempty"`
// External marks a document from outside this machine's own store.
External bool `json:"external"`
// Detail elaborates non-valid outcomes.
Detail string `json:"detail,omitempty"`
// Rejected marks a document the policy refused.
Rejected bool `json:"rejected,omitempty"`
}
Report is one document's verification report.
func Execute ¶
Execute verifies every document and presents the reports.
Parameters:
- `ctx`: the context for graph loading.
- `cfg`: the resolved verify configuration.
Returns:
- `[]Report`: one report per verified document, for the caller to render.
- `error`: non-nil when a document cannot be read/decoded, or when the policy rejects any document.