npm

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package npm provides the npm/Node.js ecosystem plugin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct{}

Plugin implements the npm ecosystem.

func (*Plugin) Detect

func (p *Plugin) Detect(ctx context.Context, path string) bool

Detect checks if this is an npm project with a scannable lock file.

func (*Plugin) GetFix

GetFix returns the npm command to fix a vulnerability.

func (*Plugin) Info

func (p *Plugin) Info() ecosystem.PluginInfo

Info returns plugin metadata.

func (*Plugin) NativeAudit

func (p *Plugin) NativeAudit(ctx context.Context, path string) (*ecosystem.ScanResult, error)

NativeAudit runs npm audit and returns findings.

func (*Plugin) Scan

func (p *Plugin) Scan(ctx context.Context, path string) (*ecosystem.ScanResult, error)

Scan parses package-lock.json and checks for vulnerabilities.

Jump to

Keyboard shortcuts

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