Documentation
¶
Index ¶
- type Backend
- func (b *Backend) CheckWorkflowFork(r *models.Repository) error
- func (b *Backend) ConfigureControls(r *models.Repository, branches []*models.Branch, ...) error
- func (b *Backend) ControlConfigurationDescr(branch *models.Branch, config models.ControlConfiguration) string
- func (b *Backend) ControlPrecheck(r *models.Repository, branches []*models.Branch, ...) (ok bool, remediationMessage string, remediateFn models.ControlPreRemediationFn, ...)
- func (b *Backend) CreateRepoRuleset(r *models.Repository, branches []*models.Branch) error
- func (b *Backend) CreateTagRuleset(r *models.Repository) error
- func (b *Backend) CreateWorkflowPR(r *models.Repository, branches []*models.Branch) (*models.PullRequest, error)
- func (b *Backend) FindWorkflowPR(ctx context.Context, r *models.Repository) (*models.PullRequest, error)
- func (b *Backend) GetBranchControls(ctx context.Context, r *models.Repository, branch *models.Branch) (*slsa.ControlSetStatus, error)
- func (b *Backend) GetBranchControlsAtCommit(ctx context.Context, r *models.Repository, branch *models.Branch, ...) (*slsa.ControlSetStatus, error)
- func (b *Backend) GetLatestCommit(ctx context.Context, r *models.Repository, branch *models.Branch) (*models.Commit, error)
- func (b *Backend) GetTagControls(context.Context, *models.Tag) (*slsa.Controls, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
Options Options
// contains filtered or unexported fields
}
Backend implemets the GitHub sourcetool backend
func (*Backend) CheckWorkflowFork ¶
func (b *Backend) CheckWorkflowFork(r *models.Repository) error
CheckWorkflowFork verifies that the user has a fork of the repository we are configuring.
func (*Backend) ConfigureControls ¶
func (b *Backend) ConfigureControls(r *models.Repository, branches []*models.Branch, configs []models.ControlConfiguration) error
ConfigureControls configure the SLSA controls in the repository
func (*Backend) ControlConfigurationDescr ¶
func (*Backend) ControlPrecheck ¶
func (b *Backend) ControlPrecheck( r *models.Repository, branches []*models.Branch, config models.ControlConfiguration, ) (ok bool, remediationMessage string, remediateFn models.ControlPreRemediationFn, err error)
ControlPrecheck checks if the prerequisites to enable the controls are OK
func (*Backend) CreateRepoRuleset ¶
func (*Backend) CreateTagRuleset ¶
func (b *Backend) CreateTagRuleset(r *models.Repository) error
func (*Backend) CreateWorkflowPR ¶
func (b *Backend) CreateWorkflowPR(r *models.Repository, branches []*models.Branch) (*models.PullRequest, error)
CreateWorkflowPR creates the pull request to add the provenance workflow to the specified repository.
func (*Backend) FindWorkflowPR ¶
func (b *Backend) FindWorkflowPR(ctx context.Context, r *models.Repository) (*models.PullRequest, error)
func (*Backend) GetBranchControls ¶
func (b *Backend) GetBranchControls(ctx context.Context, r *models.Repository, branch *models.Branch) (*slsa.ControlSetStatus, error)
func (*Backend) GetBranchControlsAtCommit ¶
func (b *Backend) GetBranchControlsAtCommit(ctx context.Context, r *models.Repository, branch *models.Branch, commit *models.Commit) (*slsa.ControlSetStatus, error)
GetBranchControlsAtCommit
Click to show internal directories.
Click to hide internal directories.