Run a Greenlight scan in VS Code
You can use Veracode Greenlight for VS Code to scan either a single file or all files in a folder.
The C# for Visual Studio Code extension enables C# compilation for Visual Studio Code. Veracode Greenlight for VS Code uses the extension to generate binaries for Greenlight scans.
Before you begin:
- Confirm that you meet the Greenlight prerequisites.
- To avoid caching issues, ensure any files you want to scan are not currently open in the editor. Close the open files and re-open a folder from the activity bar.
- Before you can scan C# projects, you must install the C# for Visual Studio Code extension.
To complete this task:
-
Select Open Folder from the Visual Studio Code Explorer menu.
-
Select a folder or a file.
-
Choose one of the following options to start the scan:
- Select the V icon.
- Use the shortkey, Ctrl+Shift+\.
- Right-click the file and select Scan with Greenlight.
- Open the Command Palette and enter
Veracode: Scan with Greenlight
.