Scroll to navigation

Debian::PkgJs::SimpleAudit(3pm) User Contributed Perl Documentation Debian::PkgJs::SimpleAudit(3pm)

NAME

Debian::PkgJS::SimpleAudit - Perl module to get security advisories from NPM registry

SYNOPSIS

  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;
  }

DESCRIPTION

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

EXPORT

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:

COPYRIGHT AND LICENSE

Copyright Yadd <yadd@debian.org>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

On Debian systems, the complete text of version 2 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. If not, see <http://www.gnu.org/licenses/>.

2022-03-09 perl v5.32.1