Visual Studio integration

Leveraging the Prelude CLI inside a familiar IDE

The Prelude CLI can be used within Visual Studio's built-in terminal - allowing you to create custom Verified Security Tests inside a familiar, and full-featured, editor.

Before completing this tutorial, please review the docs on Verified Security Tests (VST).

You need to install the Prelude CLI and register for a free account before continuing.

Start by opening your editor and going to View -> Terminal to open the terminal next to your code.


Verified Security Tests (VST) are written in Go, so you should have the latest version of GoLang installed on your machine, along with any desired linting plugins in Visual Studio.

Creating tests

Creating tests has two parts: creating the metadata and writing the source code.

To create a new test, start by reserving a namespace for it with the following command:

prelude build create-test "safety check" --unit health

This will generate a new test directory with the template source code inside. Now comes the hard part: write, compile and test locally until you are satisfied.

Uploading tests

In order to schedule your new test, you first have to upload it to the Prelude Service.

Uploading saves the test in a private cloud directory that only you - and any users you add to your account with Build permissions - can access.

Upload your test by entering one of the following:

prelude build upload <UUID>.go  # upload just the test file
prelude build upload <UUID>  # upload the entire test directory

The source code is sent to the Prelude Compute service, which compiles the code for every applicable operating system and stores the final binaries in your cloud directory (which are the artifacts that probes download and execute).

Downloading tests

You can download tests to your local system at any time. Downloaded tests will include the source code and any other files you uploaded with them. Think of downloading as git clone.

While Prelude-supplied tests are downloadable, you cannot upload a modified version of them unless you change their identifier - effectively forking it.

Download tests using prelude detect download <TEST_ID>.

Deleting tests

You can delete a test - which is an irreversible action - using prelude build delete-test <TEST_ID>.