scanner

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MAX_DEPTH = 150

Variables

This section is empty.

Functions

This section is empty.

Types

type Inventory

type Inventory struct {
	Packages []*models.PackageInsights
	// contains filtered or unexported fields
}

func NewInventory

func NewInventory(opa *opa.Opa, pkgsupplyClient ReputationClient) *Inventory

func (*Inventory) AddPackage

func (i *Inventory) AddPackage(ctx context.Context, pkg *models.PackageInsights, workdir string) error

func (*Inventory) Findings

func (i *Inventory) Findings(ctx context.Context) (*opa.FindingsResult, error)

func (*Inventory) Purls

func (i *Inventory) Purls() []string

func (*Inventory) Reputation

func (i *Inventory) Reputation(ctx context.Context) (*pkgsupply.ReputationResponse, error)

type ReputationClient

type ReputationClient interface {
	GetReputation(ctx context.Context, purls []string) (*pkgsupply.ReputationResponse, error)
}

type Scanner

type Scanner struct {
	Path          string
	Package       *models.PackageInsights
	ResolvedPurls map[string]bool
}

func NewScanner

func NewScanner(path string) Scanner

func (*Scanner) GithubActionsMetadata

func (s *Scanner) GithubActionsMetadata() ([]models.GithubActionsMetadata, error)

func (*Scanner) GithubWorkflows

func (s *Scanner) GithubWorkflows() ([]models.GithubActionsWorkflow, error)

func (*Scanner) GitlabciConfigs

func (s *Scanner) GitlabciConfigs() ([]models.GitlabciConfig, error)

func (*Scanner) Run

func (s *Scanner) Run(ctx context.Context, o *opa.Opa) error

Jump to

Keyboard shortcuts

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