permissions

package
v0.0.0-...-e18164e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWorkflowLevelPermissions

func AddWorkflowLevelPermissions(inputYaml string, addProjectComment bool) (string, error)

func IterateNode

func IterateNode(node *yaml.Node, identifier, tag string, minLine int) *yaml.Node

func ShouldAddWorkflowLevelPermissions

func ShouldAddWorkflowLevelPermissions(jobErrors []JobError) bool

Types

type JobError

type JobError struct {
	JobName string
	Errors  []string
}

type JobState

type JobState struct {
	CurrentNpmPackageRegistry string
	CurrentNuGetSourceURL     string
	CurrentNugetAuthToken     string

	WorkflowEnv       map[string]string // map of workflow level environment variables
	MissingActions    []string
	Errors            []error
	ActionPermissions *metadata.ActionPermissions
}

type Permission

type Permission struct {
	// contains filtered or unexported fields
}

type SecureWorkflowReponse

type SecureWorkflowReponse struct {
	OriginalInput         string
	FinalOutput           string
	IsChanged             bool
	HasErrors             bool
	AlreadyHasPermissions bool
	PinnedActions         bool
	AddedHardenRunner     bool
	AddedPermissions      bool
	IncorrectYaml         bool
	WorkflowFetchError    bool
	JobErrors             []JobError
	MissingActions        []string
}

func AddJobLevelPermissions

func AddJobLevelPermissions(inputYaml string) (*SecureWorkflowReponse, error)

Jump to

Keyboard shortcuts

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