flow

package
v0.0.1-pre1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBackend

func WithBackend(tb api.TriageBackend) initFunc

func WithPublisher

func WithPublisher(p api.VexPublisher) initFunc

func WithSSH

func WithSSH(use bool) initFunc

func WithScanner

func WithScanner(s api.Scanner) initFunc

Types

type Manager

type Manager struct {
	Options Options

	Branches []*api.Branch
	// contains filtered or unexported fields
}

Manager is the main object. It handles the lifecycle of a vulnerability's impact on a project

func New

func New(fn ...initFunc) (*Manager, error)

New creates a new flow manager

func (*Manager) AssembleBranchDocument

func (mgr *Manager) AssembleBranchDocument(branch *api.Branch, subjects ...*gointoto.ResourceDescriptor) (*vex.VEX, error)

AssembleBranchDocument gathers all VEX data applicable to vulnerabilities present in the branch. This is intended to be run at build time, to compile all exploitability data for the project.

func (*Manager) CloseOpenTriages

func (mgr *Manager) CloseOpenTriages(triages []*api.Triage) error

func (*Manager) CreateTriage

func (mgr *Manager) CreateTriage(branch *api.Branch, vuln *api.Vulnerability) (*api.Triage, error)

CreateTriage opens a new triage process a vulnerability in the specified branch

func (*Manager) ListBranchTriages

func (mgr *Manager) ListBranchTriages(branch *api.Branch) ([]*api.Triage, error)

func (*Manager) ListOpenBranchTriages

func (mgr *Manager) ListOpenBranchTriages(branch *api.Branch) ([]*api.Triage, error)

func (*Manager) LocalRepoToResourceDescriptor

func (m *Manager) LocalRepoToResourceDescriptor(path string) (*gointoto.ResourceDescriptor, error)

LocalRepoToResourceDescriptor reads a local repository and returns the

func (*Manager) PublishStatements

func (mgr *Manager) PublishStatements(triages []*api.Triage) error

PublishStatements generates the VEX documents for the open triages and releases them using the configured publisher.

func (*Manager) ScanBranchCode

func (m *Manager) ScanBranchCode(branch *api.Branch) ([]*api.Vulnerability, error)

func (*Manager) ScanRemoteBranch

func (mgr *Manager) ScanRemoteBranch(branch *api.Branch) ([]*api.Vulnerability, error)

ScanRemoteBranch clones a remote repo, scans for vulnerabilities and remove the local copy

func (*Manager) UpdateBranchFlow

func (mgr *Manager) UpdateBranchFlow(branch *api.Branch) error

func (*Manager) UpdateBranchFlowWithScan

func (mgr *Manager) UpdateBranchFlowWithScan(branch *api.Branch) error

UpdateBranchFlowWithScan updates the flows open at the repository and creates new ones based on the latest vulnerability reports available.

func (*Manager) VulnsToAttestation

func (m *Manager) VulnsToAttestation(subject *gointoto.ResourceDescriptor, vulns []*api.Vulnerability) (attestation.Statement, error)

VulnsToAttestation reads a list of vulnerabilities and generates a

func (*Manager) VulnsToOSV

func (m *Manager) VulnsToOSV(vulns []*api.Vulnerability) (*osv.Results, error)

VulnsToOSV reads a list of vulnerabilities and returns a list of results formateed in the results set from OSV scanner. Note that this only creates the list, the results origin does not get populated.

type Options

type Options struct {
	UseSSH bool
}

Jump to

Keyboard shortcuts

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