securityscorecards

package
v0.94.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(httpClient *http.Client) Client

func (*Client) GetResult

func (c *Client) GetResult(ctx context.Context, repoPath string) (*ScorecardResult, error)

GetResult retrieves a ScorecardResult for a given repository.

`repoPath` should be the URL to a repository with no scheme in it, for instance `https://gitlab.com/gitlab-org/sbom/generator` would become `gitlab.com/gitlab-org/sbom/generator`

type Parser added in v0.84.0

type Parser struct{}

func NewParser added in v0.84.0

func NewParser() Parser

func (Parser) ParseFile added in v0.84.0

func (p Parser) ParseFile(filename string) (ScorecardResult, error)

func (Parser) ParseFiles added in v0.84.0

func (p Parser) ParseFiles(glob string, pw progress.Writer) ([]ScorecardResult, error)

type ScorecardCheck

type ScorecardCheck struct {
	Name  string `json:"name"`
	Score int    `json:"score"`
}

type ScorecardRepo added in v0.84.0

type ScorecardRepo struct {
	Name string `json:"name"`
}

type ScorecardResult

type ScorecardResult struct {
	Score  float32          `json:"score" yaml:"score"`
	Checks []ScorecardCheck `json:"checks" yaml:"checks"`
	Repo   ScorecardRepo    `json:"repo"`
}

Jump to

Keyboard shortcuts

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