You scan a Node.js application using WhiteSource Bolt.
The scan finds numerous libraries with invalid licenses, but are only used during development.
You have to make sure that only production dependencies are scanned by WhiteSource Bolt.
Which of the following is a command you should run?
Click on the arrows to vote for the correct answer
A. B. C. D.C
https://whitesource.atlassian.net/wiki/spaces/WD/pages/34209870/NPM+Plugin https://nodejs.org/en/knowledge/getting-started/npm/what-is-the-file-package-jsonThe correct answer to this question is option A: npm edit.
Explanation:
WhiteSource Bolt is a tool that helps in identifying security vulnerabilities, outdated libraries, and non-compliant open-source licenses in your application. In this case, the scan has found numerous libraries with invalid licenses, but these libraries are only used during development and not in production.
To ensure that only production dependencies are scanned by WhiteSource Bolt, you need to edit the package.json file and remove the development dependencies from the file. The package.json file lists all the dependencies used by your Node.js application, including both production and development dependencies.
The npm edit command opens the package.json file in an editor, allowing you to make changes to the file. You can remove the development dependencies from the file and save the changes. Once you have removed the development dependencies, you can rerun the WhiteSource Bolt scan, and it will only scan the production dependencies.
The other options provided in the question are not relevant to this scenario:
Therefore, the correct answer is option A: npm edit.