QuestionQ64

VerifiedDevSecOps Pipeline-Code Stage

Brett Ryan is a senior DevSecOps engineer at a multinational company that builds web applications. The development team's lead has asked Brett to identify insecure JavaScript libraries used in the web application code. Brett intends to perform this vulnerability scan using grunt-retire.

Which of the following commands would enable the grunt plugin?

Explanation

Grunt tasks that are packaged as npm modules (like grunt-retire) must be loaded into the Gruntfile using the Grunt API function loadNpmTasks, called as a method on the grunt object with dot notation: grunt.loadNpmTasks('grunt-retire');. This registers all tasks exposed by the grunt-retire plugin so they can be run. Using a hyphen instead of a dot (as in options A and D) is invalid JavaScript syntax, and loadNpmTask (singular, option C) is not a valid Grunt API method — the correct method name is plural: loadNpmTasks.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!