Grunt plugin for retire.
This plugin requires Grunt
>=1.0.0. Version 0.3.12 is compatible with Grunt 0.4.
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-retire --save-dev
Run this task with the
grunt retire command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Example configuration below shows default option values and the correct syntax to use if you want to override any of them. If no options are provided, the default values as shown below are used.
retire:js: 'app/src/*.js' /** Which js-files to scan. **/node: 'node' /** Which node directories to scan (containing package.json). **/options:proxy: ''verbose: truepackageOnly: truejsRepository: ''nodeRepository: ''outputFile: './retire-output.json'ignore: 'documents,java'ignorefile: '.retireignore' /** list of files to ignore **/
proxy: url, proxy (supports basic auth).
verbose: true/false, default is
true. More verbose output (grunt -d may also be used for even more debug output).
packageOnly: true/false, default is
true. Only scan only dependencies in package.json, skip dependencies to dependencies.
jsRepository: String, default is
nodeRepository: String, default is
https://raw.github.com/RetireJS/retire.js/master/repository/npmrepository.json. JSON file which specifies where to retrieve Node vulnerability database.
outputFile: String, default is
false. Path to creation of output file report in JSON format.
retire:js: 'app/src/*' /** Scan js-files in app/src/ directory and subdirectories. **/options:
grunt retire will scan files in app/src/ for vulnerable libraries. If file sources for both node and js are specified, scanning js only is possible using
retire:node: 'module/' /** Scan node project in directory module/. Should be ['.'] for normal projects **/options:
grunt retire will scan all dependencies specified under
package.json for vulnerable libraries. If file sources for both node and js are specified, scanning node only is possible using
➜ grunt-retire git:(master) ✗ grunt retireRunning "retire:jsPath" (retire) taskJS repository loaded from:>> test-files/jquery-1.6.js>> ↳ jquery 1.6 has known vulnerabilities:Node repository loaded from:
➜ grunt-retire git:(master) ✗ grunt retireRunning "retire:jsPath" (retire) taskJS repository loaded from:Node repository loaded from:No vulnerabilities found.Done, without errors.