options

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 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 options defines the reusable option sets of the pinpoint commands.

Index

Constants

View Source
const (
	FormatSPDX      = "spdx"
	FormatCycloneDX = "cyclonedx"
)

The SBOM formats the status subcommand can write.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Scan

	// Attest makes pinpoint write the scan results as an in-toto
	// attestation instead of the human readable output.
	Attest bool

	// Update makes pinpoint look up the latest release of the actions to
	// report the references that have a newer version available.
	Update bool

	// Offline stops pinpoint from calling the forge at all: no versions
	// are resolved and no repository is checked for being a fork.
	Offline bool
}

Check groups the options of the subcommand that reports on the pinning status of the action references.

func (*Check) AddFlags

func (co *Check) AddFlags(cmd *cobra.Command)

AddFlags adds the check flags to a command.

type Pin

type Pin struct {
	Scan

	// All makes pinpoint look at every action reference instead of only
	// the unpinned ones. It also widens the scan to the action definitions
	// in the repository. It is on by default.
	All bool

	// Update makes pinpoint pin the references to the latest release of
	// each action instead of to the version they already track. It is the
	// counterpart of the update reporting of the check subcommand. It is
	// on by default.
	Update bool

	// Yes writes the changes without asking for confirmation first.
	Yes bool
}

Pin groups the options of the subcommand that rewrites the action references to pin them to a commit hash.

func (*Pin) AddFlags

func (po *Pin) AddFlags(cmd *cobra.Command)

AddFlags adds the pin flags to a command.

type Scan

type Scan struct {

	// Path is the directory pinpoint looks in for workflows. It is read
	// from the command arguments, not from a flag.
	Path string
	// contains filtered or unexported fields
}

Scan groups the options shared by the commands that scan a repository for GitHub Actions workflows.

func (*Scan) AddFlags

func (so *Scan) AddFlags(_ *cobra.Command)

AddFlags adds the scanner flags to a command. The API token is read from the environment, never from a flag: tokens on a command line leak into the shell history and the process list.

func (*Scan) Config

func (so *Scan) Config() *command.OptionsSetConfig

Config returns the flag configuration of the scanner options.

func (*Scan) Validate

func (so *Scan) Validate() error

Validate checks that the scanner options are usable.

type Status

type Status struct {
	Scan

	// Format switches the output from the table to an SBOM in this format:
	// spdx or cyclonedx. Empty renders the table.
	Format string

	// Offline stops pinpoint from calling the forge: no versions are
	// resolved, so only the pinning status is reported.
	Offline bool
}

Status groups the options of the subcommand that shows the pinning and update status of every action reference.

func (*Status) AddFlags

func (st *Status) AddFlags(cmd *cobra.Command)

AddFlags adds the status flags to a command.

func (*Status) Validate

func (st *Status) Validate() error

Validate checks that the status options are usable.

Jump to

Keyboard shortcuts

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