imagecheck

package
v0.1.0-alpha.41 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package imagecheck checks that an image's layers are what its config says they are before a runtime reuses an unpacked layer for it.

Unpacked layers are shared on a node by chain ID, which is computed from the diff IDs in an image's config, not from the layer blobs its manifest names. An unpacker that finds a chain already unpacked skips that layer's blob, so without a check an image whose config names another image's diff IDs would get that image's file system while serving blobs of its own. Layers checks that every layer blob really decompresses to its diff ID.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Layer

func Layer(ctx context.Context, cs content.Store, blob ocispec.Descriptor, diffID digest.Digest) error

Layer checks one layer blob against its diff ID.

func Layers

func Layers(ctx context.Context, cs content.Store, blobs []ocispec.Descriptor, diffIDs []digest.Digest) error

Layers checks that each of blobs, read from cs, decompresses to the diff ID at the same index. A blob labelled with its uncompressed digest (set only after an unpacker verified it, or by this check) is not read again; one checked here gets the label when cs can keep labels.

Types

This section is empty.

Jump to

Keyboard shortcuts

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