@binclusive/cli 0.1.2 → 0.1.4
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.
- package/README.md +42 -2
- package/dist/bin.js +352 -165
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -35,13 +35,16 @@ Common flags:
|
|
|
35
35
|
| Flag | Description |
|
|
36
36
|
| --- | --- |
|
|
37
37
|
| `--project <id>` | Project to audit |
|
|
38
|
-
| `--journeys <id,id,...>` |
|
|
38
|
+
| `--journeys <id,id,...>` | Journey IDs to audit, comma-separated — or `all` for every journey in the project |
|
|
39
|
+
| `--org <id\|slug\|name>` | Override the saved organization (also `B8E_ORG_ID`) |
|
|
39
40
|
| `--config <path>` | Path to `.b8e.yml` (default: `./.b8e.yml`) |
|
|
40
|
-
| `--format <pretty\|json\|sarif>` | Output format |
|
|
41
|
+
| `--format <pretty\|json\|sarif>` | Output format (default: `pretty`) |
|
|
41
42
|
| `--fail-on <critical\|major\|minor>` | Exit non-zero at/above this severity |
|
|
42
43
|
| `--max-violations <n>` | Exit non-zero if violations exceed `n` |
|
|
43
44
|
| `--output <path>` | Write `json`/`sarif` output to a file |
|
|
45
|
+
| `--timeout <ms>` | Per-journey timeout (default: `600000`) |
|
|
44
46
|
| `--ci` | CI mode (non-interactive) |
|
|
47
|
+
| `--verbose` | Verbose logging |
|
|
45
48
|
|
|
46
49
|
The `sarif` output drops straight into GitHub code scanning and other SARIF
|
|
47
50
|
consumers. Run `b8e audit --help` for the full list.
|
|
@@ -75,11 +78,48 @@ b8e audit --ci --project "$PROJECT_ID" --fail-on major --format sarif --output a
|
|
|
75
78
|
Authenticate CI runs with a Binclusive API token via the environment rather than
|
|
76
79
|
`b8e login`. See the docs for token setup.
|
|
77
80
|
|
|
81
|
+
### Audit every journey
|
|
82
|
+
|
|
83
|
+
Pass `--journeys all` to audit every journey in the project without listing IDs:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
b8e audit --ci --project "$PROJECT_ID" --journeys all --fail-on major
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Journeys run one at a time. If one fails, the rest still run — the command prints
|
|
90
|
+
a summary of which journeys failed at the end and exits non-zero.
|
|
91
|
+
|
|
92
|
+
### Exit codes
|
|
93
|
+
|
|
94
|
+
| Code | Meaning |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `0` | All journeys passed and thresholds were met |
|
|
97
|
+
| `1` | A `--fail-on` or `--max-violations` threshold was exceeded |
|
|
98
|
+
| `2` | Not authenticated (run `b8e login`) |
|
|
99
|
+
| `3` | One or more journeys errored (timeout, no report) |
|
|
100
|
+
| `4` | Missing or invalid arguments (e.g. no `--project`/`--journeys`) |
|
|
101
|
+
| `5` | Browser engine not installed (see Browser setup) |
|
|
102
|
+
|
|
78
103
|
## Configuration
|
|
79
104
|
|
|
105
|
+
Flags can also live in a `.b8e.yml` file in the working directory (override the
|
|
106
|
+
path with `--config`). Flags passed on the command line take precedence.
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
project: proj_abc
|
|
110
|
+
journeys:
|
|
111
|
+
- journey_1
|
|
112
|
+
- journey_2 # or a single `all` entry for every journey
|
|
113
|
+
fail_on: major
|
|
114
|
+
max_violations: 0
|
|
115
|
+
format: sarif
|
|
116
|
+
timeout: 600000
|
|
117
|
+
```
|
|
118
|
+
|
|
80
119
|
| Environment variable | Purpose |
|
|
81
120
|
| --- | --- |
|
|
82
121
|
| `B8E_ORG_ID` | Override the saved organization (same as `--org`) |
|
|
122
|
+
| `CI` | Setting `CI=true` enables non-interactive mode (same as `--ci`) |
|
|
83
123
|
|
|
84
124
|
## Support
|
|
85
125
|
|