Version: v0.0.0-...-005854d Latest Latest

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 11 Imported by: 0



Package binary implements the Binary Artifacts security policy check from scorecard.



This section is empty.


This section is empty.


func NewBinary

func NewBinary() policydef.Policy

NewBinary returns a new Binary Artifacts policy.


type Binary

type Binary bool

Binary is the Binary Artifacts policy object, implements policydef.Policy.

func (Binary) Check

func (b Binary) Check(ctx context.Context, c *github.Client, owner,
	repo string) (*policydef.Result, error)

Check performs the polcy check for this policy based on the configuration stored in the org/repo, implementing policydef.Policy.Check()

func (Binary) Fix

func (b Binary) Fix(ctx context.Context, c *github.Client, owner, repo string) error

Fix implementing policydef.Policy.Fix(). Scorecard checks will not have a Fix option.

func (Binary) GetAction

func (b Binary) GetAction(ctx context.Context, c *github.Client, owner, repo string) string

GetAction returns the configured action from this policy's configuration stored in the org-level repo, default log. Implementing policydef.Policy.GetAction()

func (Binary) Name

func (b Binary) Name() string

Name returns the name of this policy, implementing policydef.Policy.Name()

type OrgConfig

type OrgConfig struct {
	// OptConfig is the standard org-level opt in/out config, RepoOverride applies to all
	// config.
	OptConfig config.OrgOptConfig `yaml:"optConfig"`

	// Action defines which action to take, default log, other: issue...
	Action string `yaml:"action"`

OrgConfig is the org-level config definition for this policy.

type RepoConfig

type RepoConfig struct {
	// OptConfig is the standard repo-level opt in/out config.
	OptConfig config.RepoOptConfig `yaml:"optConfig"`

	// Action overrides the same setting in org-level, only if present.
	Action *string `yaml:"action"`

RepoConfig is the repo-level config for this policy.

Source Files

Jump to

Keyboard shortcuts

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