sopschecker

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Failure

type Failure struct {
	Path   string
	Reason string
}

Failure describes a file that should have been encrypted but was not.

func Check

func Check(opts Options) ([]Failure, error)

Check validates that files requiring SOPS encryption are encrypted.

type Options

type Options struct {
	// ConfigPath is an optional path to a .sops.yaml file. When set, files are
	// only required to be encrypted if they match a creation rule in the config.
	ConfigPath string
	// Files contains the files to check.
	Files []string
	// Globs contains file glob patterns to check. When set, Files is ignored.
	Globs []string
	// RequireAll requires every file in Files to be encrypted, independent of
	// any .sops.yaml creation rules.
	RequireAll bool
	// WorkDir is used to resolve relative file and config paths. It defaults to
	// the current working directory.
	WorkDir string
}

Options configures a SOPS encryption check.

Jump to

Keyboard shortcuts

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