Skip to main content
coudard
Staff
Staff
September 2, 2026

Technical Tip: How to troubleshoot FortiCNAPP VS Code extension

  • September 2, 2026
  • 0 replies
  • 36 views

Description

This article describes the steps to install and troubleshoot the FortiCNAPP Visual Studio Code extension, which is a tool to detect vulnerabilities in code before committing changes.

Scope

FortiCNAPP, Visual Studio Code.

This article is aimed towards FortiCNAPP Code Security users who want to use the Visual Studio Code extension for Software Composition Analysis (SCA), Static Application Security Testing (SAST), and Infrastructure as Code (IaC) scanning in a local development environment.

Solution

Running scans and results:

Open the project workspace in Visual Studio Code, and select FortiCNAPP extension icon.

2a4625b9.png


Start all scans via the Scan button, or run scan independently (IaC, SAST, or SCA or Run all scans).

4b02d06c.png


Review results in the Problem View, and navigate to files by using the Issues tree view that allows opening related files.

09918f6f.png


Troubleshooting:

  • When trying to scan, the following message appear at the lower right corner: 'You must install the IaC component within the Lacework CLI before you can run a scan'.


c2e816c6.png


It is still possible to run the scans without upgrading to the latest updates, but scans will not benefit from the latest release features.

  • If an error occurs while running scans, extract the extension logs: go the Output panel: In Visual Studio Code, go to View -> Output -> Select 'Extension Host' from the drop-down. Then use the 'save output as' or 'export Logs' option to get full logs.


56b1b7f7.png


  • If any issue occurs while scanning, verify this independently in the FortiCNAPP CLI. The following is an example for an SCA scan that saves output in FortiCNAPP the JSON format, and saves the file for investigation.


lacework sca scan <directory> -f lw-json -o <output location and filename>


Related document:
For instructions on how to install the extension, see VS Code in the documentation.

Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!