npm

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisory

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

Advisory encapsulate Node vulnerability source

func NewAdvisory

func NewAdvisory() *Advisory

NewAdvisory is the factory method for Node Advisory

func (*Advisory) DetectVulnerabilities

func (a *Advisory) DetectVulnerabilities(pkgName, pkgVer string) ([]types.DetectedVulnerability, error)

DetectVulnerabilities scans and return vulnerability using Node package scanner

type Comparer

type Comparer struct{}

Comparer represents a comparer for npm

func (Comparer) IsVulnerable

func (n Comparer) IsVulnerable(ver string, advisory dbTypes.Advisory) bool

IsVulnerable checks if the package version is vulnerable to the advisory.

Jump to

Keyboard shortcuts

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