records

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencyInfo

type DependencyInfo struct {
	GroupID        string             `json:"groupId"`
	ArtifactID     string             `json:"artifactId"`
	Version        string             `json:"version"`
	Type           string             `json:"type"`
	Classifier     string             `json:"classifier,omitempty"`
	Scope          string             `json:"scope,omitempty"`
	Sha1           string             `json:"sha1,omitempty"`
	AdditionalSha1 string             `json:"additionalSha1,omitempty"`
	SystemPath     string             `json:"systemPath,omitempty"`
	Filename       string             `json:"filename,omitempty"`
	DependencyType string             `json:"dependencyType,omitempty"`
	DependencyFile string             `json:"dependencyFile,omitempty"`
	Deduped        bool               `json:"deduped"`
	Commit         string             `json:"commit,omitempty"`
	Checksums      *map[string]string `json:"checksums,omitempty"`
	Children       *[]DependencyInfo  `json:"children,omitempty"`
}

type EnhancedResult

type EnhancedResult struct {
	OperationResult
	Deps                *map[Id]DependencyInfo
	DepId2VulnerableLib map[Id]VulnerableLib
}

func (EnhancedResult) DependencyTree

func (er EnhancedResult) DependencyTree() []DependencyInfo

func (EnhancedResult) IsVulnerable

func (er EnhancedResult) IsVulnerable() bool

func (EnhancedResult) Print

func (er EnhancedResult) Print(w io.Writer)

type Id

type Id string

type LibScope

type LibScope int8

LibScope Enum type

const (
	LSDefault LibScope = iota
	LSEmpty
	LSCompile
	LSProvided
	LSRuntime
	LSSystem
	LSDev
	LSOptional
	LSOptionalDev
	LSTest
	LSImport
)

func LibScopeByText

func LibScopeByText(s string) LibScope

func (LibScope) String

func (ls LibScope) String() string

type LibType

type LibType int8

LibType Enum type

const (
	LTEmpty LibType = iota
	LTGolang
	LTJava
	LTFs
	LTRuby
)

func (LibType) String

func (lt LibType) String() string

type Library

type Library struct {
	Artifact string
	Version  string
	LScope   LibScope
	LType    LibType

	// the path to the library files
	SystemPath string
	// if it's a multi-module project wrapping
	IsProject bool
	// optional
	Commit string
	// mainly related to Java libraries
	GroupId string
}

type OperationResult

type OperationResult struct {
	// the manifest file from which the library discovered
	// e.g. go.mod, pom.xml, package-lock.json
	ManifestFile string

	// direct libraries found
	Direct *[]Id

	// mapping from each library to its direct transitive libraries
	LibraryToChildren *map[Id][]Id

	// info about all libraries found
	Libraries *map[Id]Library

	LType LibType

	// in case an error occurred for the specific scan
	Err error

	// how long it took to produce this operation result
	Elapsed time.Duration

	// Organ represents the organ type for this operation result
	Organ Organ
}

func (*OperationResult) Print

func (op *OperationResult) Print(w io.Writer)

func (*OperationResult) TrackTime

func (op *OperationResult) TrackTime(start time.Time)

TrackTime sets the total time that elapsed to

type Organ

type Organ int8

Organ Enum type

const (
	OMaven Organ = iota
	OGradle
	OFS
	ORuby
)

func (Organ) String

func (organ Organ) String() string

type VulnerableLib

type VulnerableLib struct {
	GroupId        string      `json:"groupId"`
	ArtifactId     string      `json:"artifactId"`
	PackageVersion interface{} `json:"packageVersion"`
	FileName       string      `json:"fileName"`
	Sha1           string      `json:"sha1"`
}

Jump to

Keyboard shortcuts

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