integrity

package
v0.0.0-...-9b8dde8 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashFile

func HashFile(path string) (string, error)

HashFile exposes the SHA-256 helper for external callers.

func VerifySignature

func VerifySignature(artifactPath, manifestDir, repoRoot string, sig *plugins.Signature) error

VerifySignature validates a detached signature created with cosign's ECDSA signing mode against the provided artifact. All paths are resolved relative to the manifest directory and, if necessary, the repository root.

Types

type Allowlist

type Allowlist struct {
	// contains filtered or unexported fields
}

Allowlist captures the trusted hashes recorded for plugin artifacts.

func LoadAllowlist

func LoadAllowlist(path string) (*Allowlist, error)

LoadAllowlist parses the allowlist file. Paths are interpreted relative to the directory containing the allowlist itself.

func (*Allowlist) Verify

func (a *Allowlist) Verify(artifactPath string) error

Verify ensures the artifact's hash matches the allowlist.

Jump to

Keyboard shortcuts

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