guacanalytics

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchDependentsFromStartPackage added in v0.1.2

func SearchDependentsFromStartPackage(ctx context.Context, gqlClient graphql.Client, startID string, stopID *string, maxDepth int) (map[string]BfsNode, []string, error)

func SearchForSBOMViaArtifact added in v0.8.9

func SearchForSBOMViaArtifact(ctx context.Context, gqlclient graphql.Client, searchString string, maxLength int) ([]string, []table.Row, error)

func SearchForSBOMViaPkg added in v0.8.5

func SearchForSBOMViaPkg(ctx context.Context, gqlclient graphql.Client, searchString string, maxLength int, isPurl bool) ([]string, []table.Row, error)

SearchForSBOMViaPkg takes in either a purl or URI for the initial value to find the hasSBOM node. From there is recursively searches through all the dependencies to determine if it contains hasSBOM nodes. It concurrent checks the package version node if it contains vulnerabilities and VEX data. The isPurl parameter is used to know whether the searchString is expected to be a PURL.

func TopoSortFromBfsNodeMap added in v0.1.2

func TopoSortFromBfsNodeMap(ctx context.Context, gqlClient graphql.Client, nodeMap map[string]BfsNode) (map[int][]string, []string, error)

TopoSortFromBfsNodeMap sorts the nodes such that it returns a map of level -> list of nodeIDs at that level

func VexSubjectString added in v0.8.5

Types

type BfsNode added in v0.1.2

type BfsNode struct {
	Expanded bool // true once all node neighbors are added to queue
	Parents  []string
	Depth    int
	Type     NodeType

	PointOfContact   model.AllPointOfContact
	NotInBlastRadius bool // true if it is solely an informational node, not to be included in the blast radius subgraph
	// contains filtered or unexported fields
}

type NodeType

type NodeType int
const (
	PackageName NodeType = iota
	PackageVersion
	SourceName
	Artifact
)

Jump to

Keyboard shortcuts

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