Documentation
¶
Overview ¶
Package options defines the reusable option sets of the pinpoint commands.
Index ¶
Constants ¶
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.
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.
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.
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.
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 ¶
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.
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.