Socket
Socket
Sign inDemoInstall

snyk-policy

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-policy - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

.nyc_output/3110.json

3

lib/filter/index.js

@@ -27,3 +27,4 @@ module.exports = filter;

vulns.vulnerabilities,
root
root,
policy.skipVerifyPatch ? true : false
);

@@ -30,0 +31,0 @@

@@ -10,3 +10,3 @@ module.exports = filterPatched;

// cwd is used for testing
function filterPatched(patched, vuln, cwd) {
function filterPatched(patched, vuln, cwd, skipVerifyPatch) {
if (!patched) {

@@ -47,2 +47,6 @@ return vuln;

// the target directory where our module name will live
if (skipVerifyPatch) {
return true;
}
var source = getVulnSource(vuln, cwd, true);

@@ -49,0 +53,0 @@

@@ -30,2 +30,3 @@ var fs = require('then-fs');

policy.save = save.bind(null, policy);
policy.toString = parse.export.bind(null, policy);
policy.demunge = parse.demunge.bind(null, policy);

@@ -32,0 +33,0 @@ return policy;

module.exports = {
import: imports,
export: exports,
demunge: demunge,
demunge: require('./demunge'),
};

@@ -52,35 +52,2 @@

return yaml.safeDump(data);
}
function demunge(policy, apiRoot) {
if (!apiRoot) {
apiRoot = '';
}
var res = ['ignore', 'patch'].reduce(function (acc, type) {
acc[type] = policy[type] ? Object.keys(policy[type]).map(function (id) {
var paths = policy[type][id].map(function (pathObj) {
var path = Object.keys(pathObj).pop();
var res = {
path: path,
};
if (type === 'ignore') {
res.reason = pathObj[path].reason;
res.expires = new Date(pathObj[path].expires);
}
return res;
});
return {
id: id,
url: apiRoot + '/vuln/' + id,
paths: paths,
};
}) : [];
return acc;
}, {});
res.version = policy.version;
return res;
}

@@ -42,3 +42,3 @@ {

},
"version": "1.1.2"
"version": "1.2.0"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc