Debian::PkgJs::SimpleAudit(3pm)

Debian::PkgJs::SimpleAudit3pm

Perl module to get security advisories from npm registry

Usage

  use Debian::PkgJS::SimpleAudit;
  
  my $audit = advisories('/path/to/nodejs/module');
  # OR
  my $audit = advisories('@babel/runtime', '0.7.16');
  
  if($audit) {
      print STDERR $audit;
      exit 1;
  }

Overview

Debian::PkgJS::SimpleAudit provides a single function to get security advisories from NPM registry.

Export

advisories()

This function build a query to get all NPM security advisories for the given JS module. It returns a string in the same format than ""npm audit"" (empty if no advisories are available).

advisories() takes one or two arguments:

advisories('/path/to/module'): use name and version found in package.json (or package.yaml).
advisories($name,$version): use given module name and version

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

From dh-nodejs 0.15.23 in Debian 13 (Trixie). Parsed by carta from the page's man source.