brava-cli 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- brava_cli-0.3.0/.gitignore +5 -0
- brava_cli-0.3.0/PKG-INFO +36 -0
- brava_cli-0.3.0/README.md +25 -0
- brava_cli-0.3.0/pyproject.toml +43 -0
- brava_cli-0.3.0/src/brava_cli/__init__.py +0 -0
- brava_cli-0.3.0/src/brava_cli/__main__.py +6 -0
- brava_cli-0.3.0/src/brava_cli/app.py +626 -0
- brava_cli-0.3.0/src/brava_cli/auth.py +37 -0
- brava_cli-0.3.0/src/brava_cli/client.py +281 -0
- brava_cli-0.3.0/src/brava_cli/context.py +173 -0
- brava_cli-0.3.0/src/brava_cli/duration.py +23 -0
- brava_cli-0.3.0/src/brava_cli/environments.py +113 -0
- brava_cli-0.3.0/src/brava_cli/hygiene.py +342 -0
- brava_cli-0.3.0/src/brava_cli/hygiene_results.py +84 -0
- brava_cli-0.3.0/src/brava_cli/siems.py +29 -0
- brava_cli-0.3.0/src/brava_cli/types.py +26 -0
brava_cli-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: brava-cli
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Brava Security CLI
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Requires-Dist: httpx>=0.28.0
|
|
7
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
8
|
+
Requires-Dist: rich>=13.0.0
|
|
9
|
+
Requires-Dist: typer>=0.15.0
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# Brava CLI
|
|
13
|
+
|
|
14
|
+
Command-line access to the [Brava Security](https://brava.security) platform for attack simulation and SIEM hygiene, built for terminals and CI.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install brava-cli # or: uv tool install brava-cli
|
|
18
|
+
export BRAVA_URL=https://console.brava.security
|
|
19
|
+
export BRAVA_API_TOKEN=brava_… # API key from Settings → API Keys
|
|
20
|
+
brava doctor # shows which products your key can read
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or store credentials once with `brava auth login --token <key>` (`--url` defaults to `https://console.brava.security`); `BRAVA_URL` / `BRAVA_API_TOKEN` override stored values.
|
|
24
|
+
|
|
25
|
+
| Product | API key scopes | Commands |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Attack simulation | `simulations:run` | `brava catalog`, `brava run simulation`, `brava run goal` |
|
|
28
|
+
| Hygiene | `hygiene:read`, `hygiene:detections:test` | `brava siems list`, `brava run sweep`, `brava run test` |
|
|
29
|
+
|
|
30
|
+
With an API key, `brava run simulation|goal …` work when `--account-id` is the Brava environment UUID; `brava accounts list` and lookup by name or cloud account id are not available to API keys yet.
|
|
31
|
+
|
|
32
|
+
`brava doctor` marks a product NO ACCESS when the key lacks that product's read scope (`simulations:run`, `hygiene:read`); it exits `0` only when no check fails and at least one product is accessible (HTTP 200).
|
|
33
|
+
|
|
34
|
+
`brava run sweep watch` and `brava run test watch` exit `0` pass, `1` request, auth or validation error (e.g. a bad `--timeout`, missing URL/token), `2` gate failed (a hygiene check failed or a finding at/above `--fail-on`, default `high`) or a usage error caught while parsing arguments (e.g. `--fail-on bogus`, a missing run id), `3` timed out (run continues), `4` no answer (run FAILED/CANCELLED, verdict UNKNOWN, or an injection test (not a dry run) INCONCLUSIVE/NOT_TELEMETRY_DRIVEN). A sweep's log-type and feed warnings never change the exit code. `brava run test create --dry-run` runs the hygiene checks only and is judged like a sweep.
|
|
35
|
+
|
|
36
|
+
Documentation: https://docs.brava.security/cli/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Brava CLI
|
|
2
|
+
|
|
3
|
+
Command-line access to the [Brava Security](https://brava.security) platform for attack simulation and SIEM hygiene, built for terminals and CI.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install brava-cli # or: uv tool install brava-cli
|
|
7
|
+
export BRAVA_URL=https://console.brava.security
|
|
8
|
+
export BRAVA_API_TOKEN=brava_… # API key from Settings → API Keys
|
|
9
|
+
brava doctor # shows which products your key can read
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Or store credentials once with `brava auth login --token <key>` (`--url` defaults to `https://console.brava.security`); `BRAVA_URL` / `BRAVA_API_TOKEN` override stored values.
|
|
13
|
+
|
|
14
|
+
| Product | API key scopes | Commands |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| Attack simulation | `simulations:run` | `brava catalog`, `brava run simulation`, `brava run goal` |
|
|
17
|
+
| Hygiene | `hygiene:read`, `hygiene:detections:test` | `brava siems list`, `brava run sweep`, `brava run test` |
|
|
18
|
+
|
|
19
|
+
With an API key, `brava run simulation|goal …` work when `--account-id` is the Brava environment UUID; `brava accounts list` and lookup by name or cloud account id are not available to API keys yet.
|
|
20
|
+
|
|
21
|
+
`brava doctor` marks a product NO ACCESS when the key lacks that product's read scope (`simulations:run`, `hygiene:read`); it exits `0` only when no check fails and at least one product is accessible (HTTP 200).
|
|
22
|
+
|
|
23
|
+
`brava run sweep watch` and `brava run test watch` exit `0` pass, `1` request, auth or validation error (e.g. a bad `--timeout`, missing URL/token), `2` gate failed (a hygiene check failed or a finding at/above `--fail-on`, default `high`) or a usage error caught while parsing arguments (e.g. `--fail-on bogus`, a missing run id), `3` timed out (run continues), `4` no answer (run FAILED/CANCELLED, verdict UNKNOWN, or an injection test (not a dry run) INCONCLUSIVE/NOT_TELEMETRY_DRIVEN). A sweep's log-type and feed warnings never change the exit code. `brava run test create --dry-run` runs the hygiene checks only and is judged like a sweep.
|
|
24
|
+
|
|
25
|
+
Documentation: https://docs.brava.security/cli/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "brava-cli"
|
|
3
|
+
version = "0.3.0"
|
|
4
|
+
description = "Brava Security CLI"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"httpx>=0.28.0",
|
|
9
|
+
"python-dotenv>=1.0.0",
|
|
10
|
+
"typer>=0.15.0",
|
|
11
|
+
"rich>=13.0.0",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[project.scripts]
|
|
15
|
+
brava = "brava_cli.app:app"
|
|
16
|
+
|
|
17
|
+
[dependency-groups]
|
|
18
|
+
dev = [
|
|
19
|
+
"pyright>=1.1.408",
|
|
20
|
+
"pytest>=9.0.3",
|
|
21
|
+
"ruff>=0.15.9",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[build-system]
|
|
25
|
+
requires = ["hatchling"]
|
|
26
|
+
build-backend = "hatchling.build"
|
|
27
|
+
|
|
28
|
+
[tool.pyright]
|
|
29
|
+
typeCheckingMode = "strict"
|
|
30
|
+
pythonVersion = "3.10"
|
|
31
|
+
|
|
32
|
+
[tool.pytest.ini_options]
|
|
33
|
+
testpaths = ["tests"]
|
|
34
|
+
python_files = ["test_*.py"]
|
|
35
|
+
python_functions = ["test_*"]
|
|
36
|
+
|
|
37
|
+
[tool.hatch.build.targets.wheel]
|
|
38
|
+
packages = ["src/brava_cli"]
|
|
39
|
+
|
|
40
|
+
# The repo is private: the source archive on PyPI carries only the package
|
|
41
|
+
# (hatchling always adds pyproject.toml, README.md, .gitignore and PKG-INFO).
|
|
42
|
+
[tool.hatch.build.targets.sdist]
|
|
43
|
+
only-include = ["src"]
|
|
File without changes
|