verify

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package verify checks the Sigstore signature on a signed Fleet Intelligence report.

It is a package of its own so that the sigstore, rekor, and TUF dependency tree stays out of the main nvfleetint module surface: a caller that only lists nodes or downloads reports never links it in.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidKey means the supplied data is not a PEM-encoded public key.
	ErrInvalidKey = errors.New("invalid public key: expected a PEM-encoded public key")
	// ErrInvalidBundle means the supplied data is not a Sigstore .sig.bundle.
	ErrInvalidBundle = errors.New("invalid signature bundle: expected a Sigstore .sig.bundle file")
	// ErrVerificationFailed means the report does not match the signature.
	ErrVerificationFailed = errors.New("signature verification failed: the report does not match the signature")
)

Errors returned by VerifySignedReport. They are sentinels so callers can distinguish the failure mode (e.g. with errors.Is) and present their own messages instead of the underlying sigstore/proto details.

Functions

func VerifySignedReport

func VerifySignedReport(csv, bundleJSON, publicKeyPEM []byte) error

VerifySignedReport verifies that csv was signed with the public key in publicKeyPEM, using the Sigstore bundle in bundleJSON. It mirrors `cosign verify-blob --key <key> --bundle <bundle> --insecure-ignore-tlog <csv>`: the signature is checked against an out-of-band public key while the transparency log and observer timestamps are intentionally not required. It returns nil when verification succeeds and a descriptive error otherwise.

The verify.VerifySignedReport stutter is deliberate: this is the name the function has always had, so moving it into this package costs callers an import path and nothing else.

Types

This section is empty.

Jump to

Keyboard shortcuts

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