- Checkmarx Documentation
- SAST/SCA Integrations
- IDE Plugins
- Visual Studio Plugin
- Setting Up the Visual Studio Plugin
Setting Up the Visual Studio Plugin
Notice
The current version of the Visual Studio plugin supports Visual Studio 2019 and Visual Studio 2022.
The CxSAST Visual Studio plugin within the repository is only compatible with the latest CxSAST version. Therefore, any previous version of the CxSAST Visual Studio plugin must be upgraded to the current version by uninstalling it using Add/Remove Programs and Features.
To install and configure the CxSAST Visual Studio plugin:
Shut down the Microsoft Visual Studio application.
Navigate to https://www.checkmarx.com/plugins/ and download the CxSAST Visual Studio Plugin zip archive.
Extract the zip archive to a folder of your choice.
Navigate to and double-click the included .vsix file to install the Visual Studio plugin.
Confirm any security warnings and run the installation wizard. Make sure to select the relevant Visual Studio version or versions.
Once the installation is complete, start Visual Studio and go to Tools > Options > CxViewer > Authentication. The exact location of the Authentication section depends on the version in use. The Authentication window is displayed.
Enter the URL of the CxSAST server into the Server URL field, for example, http://<server_name>.
Click <Login> to authenticate. By default, the Access Control Login page appears in your browser.
Notice
In addition, the Visual Studio plugin supports authenticating via its login prompt.
To enable authentication via this login prompt:
Go to the File Explorer and navigate to the CxVSPlugin.conf file, which is located under \Visual Studio 2019\Settings.
Open CxVSPlugin.conf and add the following XML tag under the <LoginData> XML tag.
<AuthenticationType>username_password</AuthenticationType>
If the <AuthenticationType> tag is already present, change its value from access_control to username_password.
Restart Visual Studio.
Notice
The Logout button can log in using a different user or server.
To enable TLS Or SSL server certificate Validation:
Go to the File Explorer and navigate to the CxVSPlugin.conf file, which is located under \Visual Studio 2019\Settings or \Visual Studio 2022\Settings.
Open CxVSPlugin.conf and add the following XML tag under the <LoginData> XML tag: <EnableTLSOrSSLServerCertificateValidation>true</EnableTLSOrSSLServerCertificateValidation>
If the <EnableTLSOrSSLServerCertificateValidation> is already present, change its value to true or false.
If true, it will validate server-side certificate details.
If false, server-side certificate validation will skip.
By default, EnableTLSOrSSLServerCertificateValidation is true.
To validate the version of the installed plugin:
Navigate to Extensions > Manage Extensions and confirm that the correct version is listed.
To remove the Visual Studio plugin:
If you need to remove the plugin, unbind all projects and follow the instructions to uninstall the Checkmarx plugin.