Skip to main content

Python command-line interface for Scanner API

Project description

scanner-cli

This is a Python CLI for the Scanner API.

Usage

To install the CLI, run

pip install scanner-cli

You will need to provide the API URL of your Scanner instance and an API key. Go to Settings > API Keys to find your API URL and API key.

You can either set these values as environment variables:

export SCANNER_API_URL=<your API URL>
export SCANNER_API_KEY=<your API key>

or provide them as arguments to the CLI:

scanner-cli <command> --api-url=<your API url> --api-key=<your API key>

Commands

Available commands are

  • run-tests - run tests on detection rules as code
  • validate - validate detection rules as code

To validate or run tests on files

scanner-cli <command> -f detections/src/errors.yaml -f detections/src/unauthorized_logins.yaml

To validate or run tests on directories

scanner-cli <command> -d detections/src

This will validate or run tests on all YAML files in the directory that have the correct schema header.

A file or directory must be provided. Multiple files and/or directories can be provided.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

scanner_cli-0.1.0rc4-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page