How to use the snyk/lib/config.ROOT function in snyk

To help you get started, we’ve selected a few snyk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MitocGroup / recink / components / snyk / src / reporter / text-reporter.js View on Github external
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);

snyk

snyk library and cli utility

Apache-2.0
Latest version published 2 days ago

Package Health Score

76 / 100
Full package analysis