Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function display(policy) {
const p = demunge(policy, config.ROOT);
let res =
chalk.bold(
'Current Snyk policy, read from ' + policy.__filename + ' file',
) + '\n';
res += 'Modified: ' + policy.__modified + '\n';
res += 'Created: ' + policy.__created + '\n';
res += p.patch.map(displayRule('Patch vulnerability')).join('\n');
if (p.patch.length && p.ignore.length) {
res += '\n\n------------------------\n';
}
res += p.ignore.map(displayRule('Ignore')).join('\n');
return Promise.resolve(res);
}