没有算法,只有人。
npm audit所做的是查看您正在使用的软件包及其版本,并将其与npm的漏洞数据库进行比较。这是该数据库的网页界面。
如果您单击任何“问题”,则会看到三个信息:问题描述、推荐解决方案和问题报告位置的链接。
至于npm如何确定问题的严重程度,它并没有确定。人们确定问题的严重性,几乎所有工作都由志愿者完成。这是开源的承诺之一:足够多的人审视您的非隐藏代码,即可发现漏洞。
npm audit是一个安全模块,用于查找npm软件包的漏洞, 漏洞数据库可在以下网站上找到: https://www.npmjs.com/advisories
漏洞格式如下:
{
"id": <vulnerability id>,
"created_at": <creation date>,
"updated_at": <update date>,
"title": <vulnerability title>,
"author": {
"name": <contributor name>,
"website": <contributor website>,
"username": <contributor username>
},
"module_name": <product name>,
"publish_date": <publication date>,
"cves": [
<cve name (if existing)>
],
"vulnerable_versions": <vulnerable version(s)>,
"patched_versions": <fix version(s)>,
"overview": <vulnerability description>,
"recommendation": <vendor advisory>,
"references": [
<source list>
],
"cvss_vector": <CVSS vector in format AV:x/AC:x/PR:x/UI:x/S:x/C:x/I:x/A:x>,
"cvss_score": <criticity score (between 0 and 10)>,
"coordinating_vendor": <editor information>
}
npm审计将匹配软件包信息与所有漏洞相匹配,并返回匹配漏洞。
关于评分,使用了CVSS评分方法,您可以在此处找到文档: https://www.first.org/cvss/specification-document