scorecard

package
v0.0.0-...-0ae052c Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package scorecard handles sharing a Scorecard githubrepo client across multiple Allstar policies. The Allstar policy interface does not handle passing a reference to this, so we will store a master state here and look it up each time. We don't want to keep the tarball around forever, or we will run out of disk space. This is intended to be setup once for a repo, then all policies run, then closed for that repo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(fullRepo string)

Function Close will close the scorecard clients. This cleans up the downloaded tarball.

Types

type ScClient

type ScClient struct {
	ScRepo       clients.Repo
	ScRepoClient clients.RepoClient
}

Type ScClient is returned from Get. It contains the clients needed to call scorecard checks.

func Get

func Get(ctx context.Context, fullRepo string, tr http.RoundTripper) (*ScClient, error)

Function Get will get the scorecard clients and create them if they don't exist. The github repo is initialized, which means the tarball is downloaded.

Jump to

Keyboard shortcuts

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