Install
Ocular is installed via the Qwiet CLI. Follow these steps to get started:
Step 1: Install the Qwiet CLI
- Linux
- macOS
- Windows
curl https://cdn.shiftleft.io/download/sl >/usr/local/bin/sl && chmod a+rx /usr/local/bin/sl
curl https://cdn.shiftleft.io/download/sl >/usr/local/bin/sl && chmod a+rx /usr/local/bin/sl
Invoke-WebRequest -Uri 'https://cdn.shiftleft.io/download/sl-latest-windows-x64.zip' -OutFile sl-latest-windows-x64.zip
Step 2: Authenticate with your Qwiet account
Create an environment variable called SHIFTLEFT_ACCESS_TOKEN
and set its value to your access token (your access token is available in the Dashboard).
Alternatively, you can run the following, which will also create a configuration file located at .shiftleft\config.json
:
sl auth --org "${ORGANISATION_ID}" --token "${ACCESS_TOKEN}"
Step 3: Download Ocular
sl ocular
Step 4: Run Ocular
Use the same Qwiet CLI command to run Ocular:
sl ocular
Ocular requires Java Runtime Environment 8 (or later) to run.
If your default java is JDK8 (check with java -version
) and you want to scan C code, you need to have an environment variable JAVA_11_HOME
that points to a JDK11.
Otherwise, you need to have an environment variable JAVA_8_HOME
that points to a JDK8.
In doubt, just use ocular and follow the instructions in the error messages.
Background: some components (specifically java2cpg
) require Java 8 (exactly, not higher), while others (specifically c2cpg
) require Java >= 9.