grunt-snyk

0.1.1 • Public • Published

grunt-snyk

Test for dependency vulnerabilities using Snyk

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-snyk --save-dev

You need to set up your Snyk authentication (API key). Go to your account page and copy the API key. Then do the following commands

npm install -g snyk
snyk auth YOUR_API_KEY_HERE

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-snyk');

The "snyk" task

Overview

In your project's Gruntfile, add a section named snyk to the data object passed into grunt.initConfig().

grunt.initConfig({
  snyk: {
    options: {
      // Task-specific options go here. These will be passed directly to snyk
    }
  },
});

Options

The options are passed directly to the snyk.test function. For documentation on Snyk, go to the Snyk web page

Usage Examples

Default Options

In this example, the default options are used

grunt.initConfig({
  snyk: {
    options: {}
  }
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Readme

Keywords

Package Sidebar

Install

npm i grunt-snyk

Weekly Downloads

4

Version

0.1.1

License

none

Last publish

Collaborators

  • dylanb