scorecard

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package scorecard provides a client for the OpenSSF Scorecard API. It returns repo-level security scores rather than package metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Name   string
	Score  int
	Reason string
}

Check contains a single scorecard check result.

type Client

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

Client queries the OpenSSF Scorecard API.

func New

func New(userAgent ...string) *Client

New creates a new scorecard client.

func (*Client) GetScore

func (c *Client) GetScore(ctx context.Context, repoURL string) (*Result, error)

GetScore fetches the scorecard for a repository. The repoURL should be in the form "github.com/owner/repo".

type Result

type Result struct {
	Score  float64
	Date   string
	Checks []Check
}

Result contains the scorecard result for a repository.

Jump to

Keyboard shortcuts

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