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 codevalidate
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for scanner_cli-0.1.0rc4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a4119fb566c8e6f5084b02ba9d5d47d394d6265a5ddec3e5a599b526892e50e |
|
MD5 | cbede5789d8cc14a22d871b086d005fd |
|
BLAKE2b-256 | efca8f1b0da80f8e45ac108c06ea94c418f4a42653c90f977eacdb0bcb9df827 |