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=<Scanner API URL>
export SCANNER_API_KEY=<Scanner API key>
or provide them as arguments to the CLI:
scanner-cli <command> --api-url=<Scanner API URL> --api-key=<Scanner 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/errors.yaml -f detections/unauthorized_logins.yaml
To validate or run tests on directories:
scanner-cli <command> -d detections
This will only validate or run tests on YAML files with 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
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for scanner_cli-0.1.0rc5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8055bbc0b7f85cc566c09eb0f515b0d8200a1ad474c07efee9add8c456d254b5 |
|
MD5 | efd9cc93cad25907ee2d95a298fb6e41 |
|
BLAKE2b-256 | 2ca5a3e5b2d2274a745c35053ef359a4100386cb86349ea133b83b7785a877d2 |