Key Features
- Real-Time Vulnerability Detection: Instantly identifies security issues as you write code.
- LLM API Integration: Compatible with both Anthropic and ChatGPT APIs.
- Knowledge Base Integration: Pulls context-rich vulnerability data from the SecureFlag Knowledge Base.
- Context-Aware Analysis: Focuses analysis on the active section of code you're working on.
- Educational Resources: Displays links to related articles and hands-on labs.
Installation
- Open Visual Studio Code.
- Click the Extensions icon on the left sidebar.
- Search for SecureFlag Analyzer.
- Click Install.
The extension will now be added to your IDE.
Configuration
After installation, follow these steps to configure the extension:
- Open the Command Palette:
- Ctrl+Shift+P (Windows/Linux)
- Cmd+Shift+P (macOS)
- Search for and select SecureFlag: Open Settings.
- Configure the following options:
- API Type: Choose your preferred LLM provider (ChatGPT or Anthropic).
- API Keys: Enter your API keys for ChatGPT and/or Anthropic.
- LLM Model: Run the command SecureFlag: Select LLM Model from the Command Palette to set or change the model of your choice.
- Auto Analysis: Enable or disable automatic analysis on short cursor pause.
- Proxy: Configure if required for your network.
Note: Running the SecureFlag: Select LLM Model command lets you select a model based on the chosen LLM provider and the corresponding API key provided.
Usage
Manual Analysis
- Open a code file.
- Place the cursor in the section of code you want to analyze.
- Open the Command Palette and run SecureFlag: Analyze Code.
The SecureFlag Analysis Panel will appear on the right side, displaying potential vulnerabilities and relevant learning resources.
Auto Analysis
If Auto Analysis is enabled in the settings, the extension will automatically scan for vulnerabilities after a short cursor pause. Results will appear in the same analysis panel.
Results Interpretation
The analysis panel includes:
- Vulnerability Ranking: Top 3 potential issues detected in the active code section.
- Training Articles: Direct links to SecureFlag Knowledge Base articles.
- Lab Links: Interactive labs to help you practice and understand each vulnerability.
Stay secure and informed, let SecureFlag Analyzer be your in-editor security assistant.