This entension instantly informs users about critical vulnerabilities impacting their code.
Disclaimer: This is not raw live on VSCode Marketplace so to run this user will have to follow the steps as a developer
- Node.js
- Yeoman
- VS Code Extension Generator
Commands to download Yeoman and VS Code Extension Generator
npm install -g yo generator-code
The current api endpoint the extension query from is http://paws-backend.ap-southeast-2.elasticbeanstalk.com/threat/search. This maybe taken down hence please change line 32 and 54 in ./src/extension.ts
from let r = await fetch("http://paws-backend.ap-southeast-2.elasticbeanstalk.com/threat/search", {method:"POST", body:JSON.stringify({"package_manager_type":"npm", "package_list" : [item] , "level": 0, "severity": ["CRITICAL"], "date": "None"}), headers:{"Content-Type": "application/json"}});
to
let r = await fetch("http://127.0.0.1:5000/threat/search", {method:"POST", body:JSON.stringify({"package_manager_type":"npm", "package_list" : [item] , "level": 0, "severity": ["CRITICAL"], "date": "None"}), headers:{"Content-Type": "application/json"}});
and ensure the backend located at https://github.com/UNSW-pAWS/webapp-backend is up and running before proceeding to how to operate.
- Open up the root folder of this project in VS Code (If not the first time running of project please proceed to step 3)
- Open up command line and type
npm i
- In your command line type
npm run watch
- Open up
src/extension.ts
and PressF5
(Another VS Code will open up. This is to simulate the Extension running enviroment) may need to chooseVS Code Extension Development
if running for first time - Run the extension (Press "Ctrl" + "Shift" + "P") and Choose "Dependency Monitor"