Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
badge = this.logger.emoji.moon_empty;
break;
case 'medium':
badge = this.logger.emoji.moon_half;
break;
case 'low':
badge = this.logger.emoji.moon_full;
break;
}
res += badge;
res += red(` ${ severity } severity ${ issue } found on `);
res += grayBold(`${ name }\n`);
res += ` ${ gray('description:') } ${ vuln.title }\n`;
res += ` ${ gray('info:') } `;
res += blueUnderline(`${ snykConfig.ROOT }/vuln/${ vuln.id }\n`);
if (showVulnPaths) {
res += ` ${ gray('package:') } ${ vuln.from.join(' > ') }\n`;
}
if (vuln.note) {
res += ` ${ gray('note:') } ${ vuln.note }\n`;
}
// none of the output past this point is relevant if we're not displaying
// vulnerable paths
if (!showVulnPaths) {
return res.trim();
}
const upgradeSteps = (vuln.upgradePath || []).filter(Boolean);