Click the "Analyze Code for Vulnerabilities" button in the editor title bar or run the command from the command palette (Ctrl+Shift+P > Analyze Code for Vulnerabilities).
Review the Vulnerability Report:
After analysis, a new "Vulnerability Report" window opens on the right.
The report includes: vulnerable code fragment, vulnerability type, CWE, CVSS, explanation, and recommended solution.
Vulnerable code is highlighted in orange in the source file.
If no vulnerabilities are found, this is indicated in the Report along an explanation. This Report was generated using GPT-4.1 model and may vary when using other models. If there is no useful explanation about why the code is safe a information message is shown instead.
Navigate vulnerabilities:
Click the vulnerability title in the report to jump directly to the corresponding line in your code.
Change AI model:
Use the "Change Model Configuration" command or button to select a different provider or model.
Tips:
Free models are available on OpenRouter (e.g., openai/gpt-oss-20b:free, google/gemini-2.0-flash-exp:free).
You can re-analyze the file after making code changes.
The tool was tested and evaluated using OpenAI’s gpt-4.1-2025-04-14 model, other models may produce inaccurate results.
Interpreting Results
Vulnerable Fragment: The exact code lines detected as vulnerable.