Chrome Extension, TypeScript and Visual Studio Code
- node + npm (Current Version)
- TypeScript
- Webpack
- React
- Jest
- src/typescript: TypeScript source files
- src/assets: static files
- dist: Chrome Extension directory
- dist/js: Generated JavaScript files
npm install
npm run build
npm run watch
or
type Ctrl + Shift + B (vsCode)
Load dist
directory
npx jest
or npm run test
Start context_page.html in Chrome with extension installed through launch-file:
'Run and Debug' tab (Ctrl+Shift+D) -> play
or
vsCode menu => Run => 'Start Debugging' (F5)
When started, 'context_page_minimal.html' opens in Chrome (Chrome must be installed). To open 'context_page.html', change the 'file' parameter in 'launch.json'.
If the extension is in 'dataset mode', the HTML page is cleared, and dataset information is injected into the page.
LLM API keys can be added through the extension menu (right-click the extension icon and select "Options").
Menu dialog:
In this menu, you can also activate 'dataset mode' and switch between LLMs and strategies.
Switching to another LLM and activating 'dataset mode' can also be done through the popup dialog (click the extension icon).
Popup dialog:
This repository is the technical result of the master thesis: "Insecure code detection with LLMs", which can be downloaded here.