Set up preZero on a local workstation
This article shows you how to set up and configure Qwiet preZero so that it runs on a standalone workstation.
Register for a Qwiet account
Register for a Qwiet account if you haven't already.
You will be prompted to create an organization. Provide a name for your organization and click Create Organization to proceed.
Installing preZero
- Linux/macOS
- Windows
You can install and use preZero via the Qwiet CLI.
To install the Qwiet CLI, run the provided command-line command to download and adjust the permissions for the CLI:
curl https://cdn.shiftleft.io/download/sl > $HOME/sl && chmod a+rx $HOME/sl
To make the sl
executable globally accessible, move it into a directory that is part of your $PATH
, e.g., /usr/local/bin
:
sudo mv $HOME/sl /usr/local/bin/
You can install and use preZero via the Qwiet CLI.
To install the Qwiet CLI, download sl.exe. Unzip the executable, and move it to either a folder in your PATH or the folder where you plan to run Qwiet. When you run the executable for the first time, grant the permissions requested.
Alternatively, run the following Powershell command:
Invoke-WebRequest -Uri https://cdn.shiftleft.io/download/sl-latest-windows-x64.zip -UseBasicParsing -OutFile sl-latest-windows-x64.zip
Extract the contents of the archive:
Expand-Archive -Path sl-latest-windows-x64.zip -DestinationPath .
Authenticating with Qwiet
Once you have the Qwiet CLI installed, you need to associate the CLI with your Qwiet account. This step will accomplish two things: link the CLI running on your machine with your account using Qwiet's API (the token included is needed to call the API) and associate your applications with your organization.
First, you'll need your access token, which you can obtain in the Dashboard.
Once you have your access token, create an environment variable called SHIFTLEFT_ACCESS_TOKEN
and set its value to your access token.
If you're using Windows, be sure to set the environment variable at the user level, not the system level.
While setting an environment variable is the preferred method, you can use sl auth
instead to authenticate with Qwiet and associate your applications with your organization.
sl auth --token "YOUR_ACCESS_TOKEN"
# for Windows users
.\sl.exe auth --token "YOUR_ACCESS_TOKEN"
With the sl auth
method, you can confirm or update your auth values by reviewing the configuration file located at .shiftleft\config.json
. Note that this is a hidden file that is located in your home directory (e.g., <root>\Users\<username>\.shiftleft\config.json
for Windows users and /Users/<username>/.shiftleft/config.json
for macOS users).
Uninstall
To uninstall Qwiet:
- Delete the
sl
executable from/usr/local/bin/
(macOS/Linux) orsl.exe
(Windows) executable from the installation location - Delete the
.shiftleft
folder that's stored in your home directory
Next steps
Ensure that the workstation on which you run preZero has all of the dependencies required. When done, you are ready to run preZero. See the following articles for language-specific information on analyzing your application:
Back to overview.