API Security CLI

Panoptica enables you to shift left your API security, by downloading a Command Line Interface (CLI) to proactively detect risks in your APIs. Applying our API Security in the CI/CD stage allows you to perform the following pre-production actions via CLI:

  • Run a spec analysis job, base on an OpenAPI Specification (OAS) that you provide
  • Run a 3rd party API scoring job, based on the URL of a 3rd party API that you provide
  • Run a fuzzing job on an API endpoint that is reachable from Panoptica's API Security Controller.

These jobs report summary results in formatted text, as well as detailed results in JSON. You can also set a job to fail if the results exceed the maximum allowed severity level.

Download the CLI

In order to run Panoptica's API Security from a command line, you need to download the CLI, and generate two keys.

To get started, select Settings in the left-side navigation pane, then API Security. Go to the API Security CLI tab.

  1. Select the operating system and architecture of your machine from the drop-down list.
  2. Click Download CLI, and take note of the folder where the file is saved.

πŸ“˜

MacOS Security

If you are using MacOS, execution of the CLI may be blocked for security reasons. If so, go to System Preferences --> Privacy & Security to permit using the binary.

  1. Click Generate CLI Keys, to create the Access key and the Secret key. Save them in a safe place.

Once the CLI is downloaded, relocate it to the Download folder in your terminal, and change the permission.

mv ${HOME}/Downloads/apisec_cli ${PWD}  
chmod u+x apisec_cli

Now you are ready to apply the API Security CLI in your environment to run a spec analysis job, run a 3rd party API scoring job, and run a fuzzing job on an API endpoint. See API Security CLI Jobs for details.

Explore the help menus of the CLI for syntax and usage:

./apisec_cli -h 
./apisec_cli apisec-job -h