@vigilbase/cli 0.1.4 → 0.2.1
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/CLOUDFLARE.md +3 -4
- package/COMMANDS.md +158 -83
- package/LOCAL.md +721 -0
- package/ONE.md +2 -4
- package/README.md +341 -123
- package/SECURITY.md +2 -2
- package/dist/auth/device-auth.d.ts +0 -1
- package/dist/auth/device-auth.js +13 -8
- package/dist/auth/index.d.ts +4 -2
- package/dist/auth/index.js +3 -2
- package/dist/auth/provider.d.ts +18 -0
- package/dist/auth/provider.js +71 -0
- package/dist/auth/refresh.d.ts +29 -0
- package/dist/auth/refresh.js +199 -0
- package/dist/auth/store.d.ts +103 -4
- package/dist/auth/store.js +400 -74
- package/dist/auth/token-metadata.d.ts +9 -0
- package/dist/auth/token-metadata.js +21 -0
- package/dist/auth/types.d.ts +8 -2
- package/dist/auth/types.js +0 -1
- package/dist/bin.d.ts +0 -1
- package/dist/bin.js +0 -1
- package/dist/cli.d.ts +4 -2
- package/dist/cli.js +45 -15
- package/dist/commands/account.d.ts +0 -1
- package/dist/commands/account.js +0 -1
- package/dist/commands/auth.d.ts +0 -1
- package/dist/commands/auth.js +82 -22
- package/dist/commands/billing.d.ts +0 -1
- package/dist/commands/billing.js +0 -1
- package/dist/commands/cloudflare.d.ts +1 -2
- package/dist/commands/cloudflare.js +6 -6
- package/dist/commands/helpers.d.ts +15 -1
- package/dist/commands/helpers.js +2 -3
- package/dist/commands/index.d.ts +3 -2
- package/dist/commands/index.js +6 -2
- package/dist/commands/legacy-validation.d.ts +0 -1
- package/dist/commands/legacy-validation.js +0 -1
- package/dist/commands/local.d.ts +35 -0
- package/dist/commands/local.js +1543 -0
- package/dist/commands/one.d.ts +0 -1
- package/dist/commands/one.js +6 -7
- package/dist/commands/public-tools.d.ts +0 -1
- package/dist/commands/public-tools.js +55 -17
- package/dist/commands/runs.d.ts +0 -1
- package/dist/commands/runs.js +0 -1
- package/dist/commands/security.d.ts +1 -2
- package/dist/commands/security.js +1 -2
- package/dist/commands/watchdog.d.ts +0 -1
- package/dist/commands/watchdog.js +0 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -2
- package/dist/lib/banner.d.ts +0 -1
- package/dist/lib/banner.js +0 -1
- package/dist/lib/client.d.ts +4 -2
- package/dist/lib/client.js +42 -18
- package/dist/lib/cloudflare-client.d.ts +0 -1
- package/dist/lib/cloudflare-client.js +0 -1
- package/dist/lib/config.d.ts +31 -3
- package/dist/lib/config.js +72 -13
- package/dist/lib/format.d.ts +2 -1
- package/dist/lib/format.js +27 -7
- package/dist/lib/help.d.ts +1 -2
- package/dist/lib/help.js +37 -17
- package/dist/lib/network.d.ts +10 -1
- package/dist/lib/network.js +33 -5
- package/dist/lib/one-client.d.ts +5 -3
- package/dist/lib/one-client.js +49 -3
- package/dist/lib/one-operations.d.ts +0 -1
- package/dist/lib/one-operations.js +0 -1
- package/dist/lib/open-url.d.ts +0 -1
- package/dist/lib/open-url.js +0 -1
- package/dist/lib/platform.d.ts +2 -0
- package/dist/lib/platform.js +4 -0
- package/dist/lib/progress.d.ts +0 -1
- package/dist/lib/progress.js +0 -1
- package/dist/lib/security-client.d.ts +1 -2
- package/dist/lib/security-client.js +0 -1
- package/dist/lib/skill-fetch.d.ts +0 -1
- package/dist/lib/skill-fetch.js +0 -1
- package/dist/lib/system-trust.d.ts +0 -1
- package/dist/lib/system-trust.js +0 -1
- package/dist/lib/tui.d.ts +308 -0
- package/dist/lib/tui.js +846 -0
- package/dist/local/cloudflare-checkup/cf/allowlist.d.ts +94 -0
- package/dist/local/cloudflare-checkup/cf/allowlist.js +183 -0
- package/dist/local/cloudflare-checkup/cf/auth-lifecycle.d.ts +112 -0
- package/dist/local/cloudflare-checkup/cf/auth-lifecycle.js +312 -0
- package/dist/local/cloudflare-checkup/cf/child-env.d.ts +31 -0
- package/dist/local/cloudflare-checkup/cf/child-env.js +80 -0
- package/dist/local/cloudflare-checkup/cf/install.d.ts +105 -0
- package/dist/local/cloudflare-checkup/cf/install.js +308 -0
- package/dist/local/cloudflare-checkup/cf/locate.d.ts +43 -0
- package/dist/local/cloudflare-checkup/cf/locate.js +227 -0
- package/dist/local/cloudflare-checkup/cf/run-cf.d.ts +88 -0
- package/dist/local/cloudflare-checkup/cf/run-cf.js +274 -0
- package/dist/local/cloudflare-checkup/collector.d.ts +47 -0
- package/dist/local/cloudflare-checkup/collector.js +295 -0
- package/dist/local/cloudflare-checkup/contract.d.ts +2804 -0
- package/dist/local/cloudflare-checkup/contract.js +1620 -0
- package/dist/local/cloudflare-checkup/email-verification.d.ts +124 -0
- package/dist/local/cloudflare-checkup/email-verification.js +211 -0
- package/dist/local/cloudflare-checkup/errors.d.ts +29 -0
- package/dist/local/cloudflare-checkup/errors.js +103 -0
- package/dist/local/cloudflare-checkup/output.d.ts +23 -0
- package/dist/local/cloudflare-checkup/output.js +88 -0
- package/dist/local/cloudflare-checkup/prompts.d.ts +40 -0
- package/dist/local/cloudflare-checkup/prompts.js +139 -0
- package/dist/local/cloudflare-checkup/rate-budget.d.ts +41 -0
- package/dist/local/cloudflare-checkup/rate-budget.js +79 -0
- package/dist/local/cloudflare-checkup/snapshot-file.d.ts +52 -0
- package/dist/local/cloudflare-checkup/snapshot-file.js +185 -0
- package/dist/local/cloudflare-checkup/submit-client.d.ts +112 -0
- package/dist/local/cloudflare-checkup/submit-client.js +395 -0
- package/dist/local/cloudflare-checkup/terminal-ui.d.ts +170 -0
- package/dist/local/cloudflare-checkup/terminal-ui.js +403 -0
- package/dist/types.d.ts +25 -3
- package/dist/types.js +16 -1
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -1
- package/package.json +12 -12
- package/dist/auth/device-auth.d.ts.map +0 -1
- package/dist/auth/device-auth.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/store.d.ts.map +0 -1
- package/dist/auth/store.js.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js.map +0 -1
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/account.d.ts.map +0 -1
- package/dist/commands/account.js.map +0 -1
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/billing.d.ts.map +0 -1
- package/dist/commands/billing.js.map +0 -1
- package/dist/commands/cloudflare.d.ts.map +0 -1
- package/dist/commands/cloudflare.js.map +0 -1
- package/dist/commands/helpers.d.ts.map +0 -1
- package/dist/commands/helpers.js.map +0 -1
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/legacy-validation.d.ts.map +0 -1
- package/dist/commands/legacy-validation.js.map +0 -1
- package/dist/commands/one.d.ts.map +0 -1
- package/dist/commands/one.js.map +0 -1
- package/dist/commands/public-tools.d.ts.map +0 -1
- package/dist/commands/public-tools.js.map +0 -1
- package/dist/commands/runs.d.ts.map +0 -1
- package/dist/commands/runs.js.map +0 -1
- package/dist/commands/security.d.ts.map +0 -1
- package/dist/commands/security.js.map +0 -1
- package/dist/commands/watchdog.d.ts.map +0 -1
- package/dist/commands/watchdog.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/banner.d.ts.map +0 -1
- package/dist/lib/banner.js.map +0 -1
- package/dist/lib/client.d.ts.map +0 -1
- package/dist/lib/client.js.map +0 -1
- package/dist/lib/cloudflare-client.d.ts.map +0 -1
- package/dist/lib/cloudflare-client.js.map +0 -1
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/format.d.ts.map +0 -1
- package/dist/lib/format.js.map +0 -1
- package/dist/lib/help.d.ts.map +0 -1
- package/dist/lib/help.js.map +0 -1
- package/dist/lib/network.d.ts.map +0 -1
- package/dist/lib/network.js.map +0 -1
- package/dist/lib/one-client.d.ts.map +0 -1
- package/dist/lib/one-client.js.map +0 -1
- package/dist/lib/one-operations.d.ts.map +0 -1
- package/dist/lib/one-operations.js.map +0 -1
- package/dist/lib/open-url.d.ts.map +0 -1
- package/dist/lib/open-url.js.map +0 -1
- package/dist/lib/progress.d.ts.map +0 -1
- package/dist/lib/progress.js.map +0 -1
- package/dist/lib/security-client.d.ts.map +0 -1
- package/dist/lib/security-client.js.map +0 -1
- package/dist/lib/skill-fetch.d.ts.map +0 -1
- package/dist/lib/skill-fetch.js.map +0 -1
- package/dist/lib/system-trust.d.ts.map +0 -1
- package/dist/lib/system-trust.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
package/CLOUDFLARE.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Cloudflare CLI reference
|
|
2
2
|
|
|
3
|
-
`vigilbase cf` and `vigilbase cloudflare` use the authenticated Vigilbase One API. Run `vigilbase login` first. Your organization, permissions, customer links, and allowed zones determine access. The CLI never requires a Cloudflare API key.
|
|
3
|
+
`vigilbase cf` and `vigilbase cloudflare` use the authenticated Vigilbase One API. Run `vigilbase login` first (signing in isn't supported on Windows yet). Your organization, permissions, customer links, and allowed zones determine access. The CLI never requires a Cloudflare API key.
|
|
4
|
+
|
|
5
|
+
`cf checkup` runs on One's servers. `cloudflare-checkup` (also `local cloudflare-checkup`) runs on your machine with Cloudflare's own `cf` CLI and needs no Vigilbase login: one command, `npx @vigilbase/cli cloudflare-checkup`, verifies your work email with a code, installs cf if needed, signs in read-only, collects and uploads after you confirm. It works while vigilbase.com has local checkups switched on; otherwise it says so before asking for your email and points you to the checkup in your browser at https://vigilbase.com/tools/cloudflare-checkup (see [LOCAL.md](https://app.unpkg.com/@vigilbase/cli@0.2.1/files/LOCAL.md)).
|
|
4
6
|
|
|
5
7
|
Customer provider access requires an `active` or `trialing` Cloudflare service
|
|
6
8
|
entitlement for the selected account. Historical/inactive rows and legacy account
|
|
@@ -107,6 +109,3 @@ Checkup progress reads once and does not poll automatically. Run the command aga
|
|
|
107
109
|
|
|
108
110
|
Malformed IDs, conflicting selections, extra positional arguments and unsupported scope combinations fail before a network request. Authentication, permission, HTTP and explicit `success:false` API failures return a nonzero exit status. Provider configuration writes, token management, cache purge, account deletion and DNS edits are not exposed by this command group.
|
|
109
111
|
|
|
110
|
-
## Verification
|
|
111
|
-
|
|
112
|
-
`pnpm --filter @vigilbase/cli test` runs command contract tests, including tenant filters, exact paths, bearer authentication, rejected input, permission failures and terminal text handling. Cloudflare fixtures in `scripts/fixtures/cloudflare.mjs` cover every command and workspace section for the compiled CLI end-to-end harness. These fixtures execute against a local HTTP server; the checkup-start case never contacts production.
|
package/COMMANDS.md
CHANGED
|
@@ -2,73 +2,118 @@
|
|
|
2
2
|
|
|
3
3
|
The CLI uses public scanner APIs on `vigilbase.com` and authenticated APIs on
|
|
4
4
|
`one.vigilbase.com`. Use `vigilbase <command> --help` or
|
|
5
|
-
`vigilbase help <command>` for built-in help. Examples below omit
|
|
6
|
-
|
|
5
|
+
`vigilbase help <command>` for built-in help. Examples below omit `--json`,
|
|
6
|
+
which every command supports.
|
|
7
7
|
|
|
8
8
|
## References
|
|
9
9
|
|
|
10
10
|
| Area | Complete command and API reference |
|
|
11
11
|
| --- | --- |
|
|
12
|
-
| Cloudflare | [CLOUDFLARE.md](
|
|
13
|
-
| Security | [SECURITY.md](
|
|
14
|
-
| Customers, organizations, monitoring, support | [ONE.md](
|
|
15
|
-
|
|
|
12
|
+
| Cloudflare | [CLOUDFLARE.md](https://app.unpkg.com/@vigilbase/cli@0.2.1/files/CLOUDFLARE.md) |
|
|
13
|
+
| Security | [SECURITY.md](https://app.unpkg.com/@vigilbase/cli@0.2.1/files/SECURITY.md) |
|
|
14
|
+
| Customers, organizations, monitoring, support | [ONE.md](https://app.unpkg.com/@vigilbase/cli@0.2.1/files/ONE.md) |
|
|
15
|
+
| Local Cloudflare Checkup (cf on your machine) | [LOCAL.md](https://app.unpkg.com/@vigilbase/cli@0.2.1/files/LOCAL.md) |
|
|
16
|
+
| Sign-in, credentials, configuration, troubleshooting | [README.md](https://app.unpkg.com/@vigilbase/cli@0.2.1/files/README.md) |
|
|
16
17
|
|
|
17
|
-
The references
|
|
18
|
-
|
|
19
|
-
supported API surface, not every internal endpoint in the monorepo.
|
|
18
|
+
The references list the supported operations, filters, response and pagination
|
|
19
|
+
behaviour, API endpoints and access requirements of the CLI.
|
|
20
20
|
|
|
21
21
|
## Global options
|
|
22
22
|
|
|
23
23
|
| Flag | Meaning |
|
|
24
24
|
| --- | --- |
|
|
25
|
-
| `--json`, `-j` | JSON on stdout; progress
|
|
25
|
+
| `--json`, `-j` | JSON on stdout; progress and browser instructions on stderr |
|
|
26
26
|
| `--help`, `-h` | Help for the named command; makes no API request |
|
|
27
|
-
| `--version`, `-V` |
|
|
27
|
+
| `--version`, `-V` | The installed version: the banner in a terminal, only the version number when stdout is a pipe or a file, `{"name":"@vigilbase/cli","version":"…"}` with `--json` |
|
|
28
28
|
| `--one-url <origin>` | One origin; default `https://one.vigilbase.com` |
|
|
29
|
+
| `--auth-url <origin>` | The Identity issuer to trust; default `https://auth.vigilbase.com`. Staging (`https://identity-staging.vigilbase.com`) or a loopback issuer is trusted only when set here or in `VIGILBASE_AUTH_URL` |
|
|
29
30
|
| `--base-url <origin>` | Public origin; default `https://vigilbase.com` |
|
|
30
31
|
| `--timeout <ms>` | Per-request timeout, integer 1–2147483647; default 60000 |
|
|
31
32
|
| `--client-id <id>` | Device authorization client; default `vigilbase-cli` |
|
|
32
33
|
|
|
33
|
-
Origins must be HTTP(S) URLs without credentials, paths, query strings
|
|
34
|
-
fragments. One requires HTTPS, except HTTP loopback development.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`--style` applies only
|
|
34
|
+
Origins must be HTTP(S) URLs without credentials, paths, query strings or
|
|
35
|
+
fragments. One requires HTTPS, except HTTP for loopback development.
|
|
36
|
+
`--customer-id` is a command-specific One customer UUID; it does not change the
|
|
37
|
+
session's permissions. API reads may still return 403 when the signed-in role
|
|
38
|
+
lacks access. Unknown flags, flags a command doesn't take (including scope
|
|
39
|
+
flags) and extra arguments fail before any API request. `--style` applies only
|
|
40
|
+
to `badge`.
|
|
39
41
|
|
|
40
42
|
## Authentication
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
Paths on One are relative to `--one-url`; Identity endpoints come from the
|
|
45
|
+
issuer's `/.well-known/openid-configuration` (for production,
|
|
46
|
+
`https://auth.vigilbase.com/api/auth/…`).
|
|
47
|
+
|
|
48
|
+
| Command | Options and behaviour | Requests |
|
|
43
49
|
| --- | --- | --- |
|
|
44
|
-
| `login` | Device
|
|
45
|
-
| `login --token-stdin` |
|
|
46
|
-
| `login --token <bearer>` |
|
|
47
|
-
| `whoami` |
|
|
48
|
-
| `logout` |
|
|
49
|
-
| `doctor` |
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
| `login` | Device sign-in; `--no-open` for remote terminals. Signing in again with Identity first revokes and removes the sign-in it replaces (before the new device code), unless that one's last refresh had an uncertain result | One `GET /.well-known/oauth-protected-resource`. Identity: discovery, `POST /api/auth/device/code`, polling the token endpoint, then userinfo; you approve at `https://auth.vigilbase.com/device`. Legacy: One `POST /api/auth/device/code`, `POST /api/auth/device/token`, `GET /api/auth/get-session`; you approve at One's `/device` |
|
|
51
|
+
| `login --token-stdin` | Check and save a token piped from a secret manager; the input is bounded and never echoed. A saved Identity sign-in is revoked and removed before the token is saved | One `GET /api/auth/get-session`; Identity revocation when a sign-in is saved |
|
|
52
|
+
| `login --token <bearer>` | Older input, discouraged because arguments can appear in process lists and history. `VIGILBASE_ONE_TOKEN` also works; neither combines with `--token-stdin` | Same as `--token-stdin` |
|
|
53
|
+
| `whoami` | Shows the saved session; signed out is a successful answer. Notes a CLI 0.2.0 `credentials.json` that is being ignored | Identity: discovery and userinfo (a refresh first if due). Legacy: One `GET /api/auth/get-session` |
|
|
54
|
+
| `logout` | Revokes every saved Identity sign-in, signs a legacy session out, then deletes the credential files. A sign-in Identity has already ended counts as revoked; any other failed Identity revocation keeps every file | Identity: discovery, then `POST /api/auth/oauth2/revoke` per saved sign-in. Legacy: One `POST /api/auth/sign-out` (best effort) |
|
|
55
|
+
| `doctor` | Checks the public API, your session and your saved sign-in independently; exits 1 if any check fails | `GET {base-url}/api/agent/tools`. Signed out or legacy: One `GET /api/auth/get-session`. Identity: `GET {issuer}/.well-known/openid-configuration`, then the userinfo endpoint it names (One is not contacted); a refresh at the token endpoint first if the access token expires within 60 seconds |
|
|
56
|
+
|
|
57
|
+
Credentials are saved atomically with owner-only permissions in
|
|
58
|
+
`identity-credentials.json` (Identity) or `credentials.json` (legacy One
|
|
59
|
+
sessions, shared with CLI 0.1.x), and are tied to the One origin and, for
|
|
60
|
+
Identity, the issuer, client and One resource they were issued for. Rotating
|
|
61
|
+
refresh tokens are coordinated across CLI processes by `credentials.json.lock`.
|
|
62
|
+
Login polling handles pending approval, denial, expiry and short network
|
|
63
|
+
failures. Access tokens never appear in CLI output. Signing in isn't supported
|
|
64
|
+
on Windows yet. The README covers the files, CLI 0.1.x/0.2.0 compatibility,
|
|
65
|
+
logout, directory checks and the config directory.
|
|
66
|
+
|
|
67
|
+
`doctor` JSON has `checks.publicApi`, `checks.one` and `checks.signIn`, each
|
|
68
|
+
`{ok, url?, error?, status?, code?}`. `checks.one.url` is the endpoint it
|
|
69
|
+
checked: One's `get-session`, the discovered userinfo endpoint, or the
|
|
70
|
+
issuer's discovery URL when discovery itself failed. `checks.signIn` has no
|
|
71
|
+
`url`.
|
|
55
72
|
|
|
56
73
|
## Public scanners and authenticated scans
|
|
57
74
|
|
|
58
75
|
| Command | Options | API |
|
|
59
76
|
| --- | --- | --- |
|
|
60
|
-
| `list` (alias `tools`) | Lists the public catalog and
|
|
61
|
-
| `run <tool> <target>` | `--via public\|one`; `--public` forces the public API | POST `/api/agent/tools/<tool>/execute` or One POST `/api/tools/<tool>/execute` |
|
|
77
|
+
| `list` (alias `tools`) | Lists the public catalog and the One-only scanners | GET `/api/agent/tools` |
|
|
78
|
+
| `run <tool> <target>` | `--via public\|one`; `--public` forces the public API | POST `/api/agent/tools/<tool>/execute` (anonymous) or One POST `/api/tools/<tool>/execute` |
|
|
62
79
|
| `headers <url>` | Shortcut for `run security-headers`; same routing options | Same as `run` |
|
|
63
80
|
| `email <domain>` | Shortcut for `run email-security`; same routing options | Same as `run` |
|
|
64
81
|
| `describe <tool>` | `--no-skill` skips fetching skill Markdown | Catalog plus the tool's published skill URL |
|
|
65
|
-
| `skill <tool>` | Prints the complete published skill; JSON includes URL
|
|
66
|
-
| `badge <domain>` | `--style default\|compact\|mini` |
|
|
82
|
+
| `skill <tool>` | Prints the complete published skill; JSON includes URL and content | Catalog plus the tool's skill URL |
|
|
83
|
+
| `badge <domain>` | `--style default\|compact\|mini` | None; builds the public badge URL locally |
|
|
84
|
+
|
|
85
|
+
Public tools: `security-headers`, `email-security`. One-only tools:
|
|
86
|
+
`website-security`, `react2shell`, `fortibleed-check`. Public scans use the
|
|
87
|
+
public API unless you add `--via one`; being signed in doesn't change that.
|
|
88
|
+
`--public` and `--via one` cannot be combined.
|
|
89
|
+
|
|
90
|
+
The public route is anonymous and never reads your saved sign-in, the
|
|
91
|
+
credentials lock or Identity, so sign-in problems cannot make it fail. Runs
|
|
92
|
+
that go through One (`--via one` and the One-only tools) need a sign-in.
|
|
93
|
+
Without one they stop with this error:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
Error: This tool needs a Vigilbase One sign-in: run `vigilbase login`.
|
|
97
|
+
```
|
|
67
98
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
99
|
+
Other sign-in errors keep their own message, with that sentence as the hint
|
|
100
|
+
unless the message already says to run `vigilbase login`.
|
|
101
|
+
|
|
102
|
+
`list` reads your saved sign-in from disk only (no refresh, no network, no wait
|
|
103
|
+
for the lock). In JSON, `authenticated` says whether it looks usable and
|
|
104
|
+
`oneExecutableTools` follows it. If it can't be used, `list` still prints the
|
|
105
|
+
catalog, shows you as signed out and prints one stderr line per run:
|
|
106
|
+
``Couldn't use your saved sign-in (<reason>); running anonymously. Run `vigilbase login` to fix.``
|
|
107
|
+
For an unsafe config path or credentials file, which `login` would refuse too,
|
|
108
|
+
the line ends with the fix instead, for example
|
|
109
|
+
``Couldn't use your saved sign-in (/tmp is a symbolic link); running anonymously. Set VIGILBASE_CONFIG_DIR to a private directory without symbolic links in its path.``
|
|
110
|
+
`list` and `doctor` ignore a config path that fails the checks when no
|
|
111
|
+
credentials file is there.
|
|
112
|
+
|
|
113
|
+
When a public scan fails and vigilbase.com explains why with a known error
|
|
114
|
+
code, the CLI prints `Error: <message> (<code>)` (JSON: `error`, `code`,
|
|
115
|
+
`status`), with the message cleaned to one line of at most 300 characters.
|
|
116
|
+
Otherwise it prints `Request failed (HTTP <status>).`
|
|
72
117
|
|
|
73
118
|
## Account and billing
|
|
74
119
|
|
|
@@ -81,21 +126,20 @@ that choice. `--public` and `--via one` cannot be combined.
|
|
|
81
126
|
| `account sessions` | `session` | GET `/api/account/sessions` |
|
|
82
127
|
| `account invites` | `invitations`; optional `list` or `ls` | GET `/api/auth/orgs/invitations` |
|
|
83
128
|
| `account invites create` | `add` alias; `--email <email>`, `--role <role>` (default member), required `--confirm` | POST `/api/auth/orgs/invite` |
|
|
84
|
-
| `account billing` |
|
|
129
|
+
| `account billing` | Same as the billing commands | Same as billing |
|
|
85
130
|
| `billing` | `summary`, `show`, `status` | GET `/api/account/billing` |
|
|
86
131
|
| `billing portal` | `open`; `--no-open` prints the portal URL without opening a browser | POST `/api/billing/portal` |
|
|
87
132
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
integration; the CLI does not
|
|
133
|
+
Creating an invitation sends it; `billing portal` starts a Stripe portal
|
|
134
|
+
session. Both are explicit actions. Billing data comes from One's Stripe
|
|
135
|
+
integration; the CLI does not store invoices or payment information.
|
|
91
136
|
|
|
92
|
-
Invitations
|
|
93
|
-
`operationId`
|
|
137
|
+
Invitations check the email and role locally and send a fresh UUID
|
|
138
|
+
`operationId` each time. Accepted roles: `admin`, `member`, `readonly`,
|
|
94
139
|
`partner_owner`, `partner_sales`, `partner_operations`, `partner_finance`,
|
|
95
|
-
`partner_readonly`, `billing_only
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
output, printing, or opening; Windows requires manual opening.
|
|
140
|
+
`partner_readonly`, `billing_only` and `sales_only`. One still checks whether
|
|
141
|
+
you may assign the role. `--confirm` is required. Portal URLs must be HTTPS on
|
|
142
|
+
Stripe's billing host before they are printed, opened or put in JSON.
|
|
99
143
|
|
|
100
144
|
## Run history and account Watchdog
|
|
101
145
|
|
|
@@ -103,45 +147,76 @@ output, printing, or opening; Windows requires manual opening.
|
|
|
103
147
|
| --- | --- | --- |
|
|
104
148
|
| `runs` | `list`, `ls`; `--tool <name>`, `--limit <n>` (1–200, default 50) | GET `/api/tool-runs` |
|
|
105
149
|
| `runs get <id>` | `show <id>` or `runs <UUID>` | GET `/api/tool-runs/<id>` |
|
|
106
|
-
| `runhistory` | Alias of the
|
|
150
|
+
| `runhistory` | Alias of the whole `runs` group | Same as runs |
|
|
107
151
|
| `watchdog` | `list`, `targets`, `status` | GET `/api/account/watchdog/targets` |
|
|
108
152
|
| `watchdog scans` | `scan`; `--target-id <UUID>`, `--limit <n>` (1–100, default 20) | GET `/api/account/watchdog/scans` |
|
|
109
153
|
|
|
110
|
-
Customer-specific Watchdog and monitoring views are
|
|
154
|
+
Customer-specific Watchdog and monitoring views are in ONE.md.
|
|
111
155
|
|
|
112
|
-
##
|
|
156
|
+
## Local Cloudflare Checkup (no sign-in)
|
|
113
157
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
`whoami` being signed out is not an API failure. A healthy `doctor` does not
|
|
117
|
-
require login. API error JSON retains status, code, and retry delay when available.
|
|
158
|
+
All vigilbase.com paths below are under
|
|
159
|
+
`https://vigilbase.com/api/v1/tools/cloudflare-checkup/local-session`.
|
|
118
160
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
or
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
161
|
+
| Command | Options | Requests |
|
|
162
|
+
| --- | --- | --- |
|
|
163
|
+
| `cloudflare-checkup` (≡ `local cloudflare-checkup [run]`) | `--email`, `--account-id`, `--out`, `--overwrite`, `--yes`, `--confirm`, `--no-open`, `--cf-auth auto\|profile\|env\|default` (default `auto`), `--profile`, `--cf-bin`, `--max-requests-per-5min`, `--base-url` (vigilbase.com or loopback), `--timeout` | In order: GET `…/availability` (before the email is asked for), POST `…/request` and `…/verify` (email verification), GET `…/local-session` (before cf runs), allowlisted read-only cf commands, GET `…/local-session` again and POST `…/local-session/snapshot` after you confirm. npm only to install the pinned cf when none is usable (asks first) |
|
|
164
|
+
| `cloudflare-checkup login` | `--profile`, `--no-open`, `--dry-run`, `--cf-bin` | Runs `cf auth create <profile> --scopes …` interactively |
|
|
165
|
+
| `cloudflare-checkup doctor` | `--cf-auth`, `--profile`, `--cf-bin` | Offline cf mapping check, one `cf auth whoami` |
|
|
166
|
+
| `cloudflare-checkup accounts` | `--cf-auth`, `--profile`, `--cf-bin` | `cf accounts list` (all pages) |
|
|
167
|
+
| `cloudflare-checkup collect` | `--out` (required), `--account-id`, `--overwrite`, `--dry-run`, `--max-requests-per-5min`, cf options | Allowlisted read-only cf commands; writes the snapshot |
|
|
168
|
+
| `cloudflare-checkup inspect <file>` | — | None |
|
|
169
|
+
| `cloudflare-checkup submit <file>` | `--email`, `--yes`/`--confirm`, `--no-open`, `--base-url`, `--timeout` | After checking the file: GET `…/availability`, POST `…/request` and `…/verify`, GET `…/local-session`, POST `…/local-session/snapshot` |
|
|
170
|
+
| `cloudflare-checkup logout` | `--profile`, `--cf-bin` | Runs `cf auth delete <profile>` interactively, then removes the cf Vigilbase installed |
|
|
171
|
+
|
|
172
|
+
Each subcommand also works as `local cloudflare-checkup <subcommand>`.
|
|
173
|
+
|
|
174
|
+
The one command and `submit` first ask vigilbase.com whether local checkups are
|
|
175
|
+
available (no email, no credentials). When they are switched off, the command
|
|
176
|
+
stops before asking for your email with
|
|
177
|
+
`Local checkups aren't available right now.` and the hint
|
|
178
|
+
`Run the Cloudflare Checkup in your browser instead: https://vigilbase.com/tools/cloudflare-checkup`
|
|
179
|
+
(`LOCAL_MODE_DISABLED`). When vigilbase.com needs a newer CLI, it stops with
|
|
180
|
+
`CLI_UPGRADE_REQUIRED`, also before any email. If vigilbase.com doesn't answer
|
|
181
|
+
the check, the command goes on.
|
|
182
|
+
|
|
183
|
+
Then they verify your work email: the CLI asks for it (or takes `--email`),
|
|
184
|
+
vigilbase.com emails a 6-digit code, and the CLI asks for the code (without a
|
|
185
|
+
terminal, both are read from stdin, one line each; add `--yes`). In a terminal
|
|
186
|
+
both show an interactive timeline on stderr (inputs, arrow-key questions,
|
|
187
|
+
spinners, a collection progress bar); pipes, CI, `TERM=dumb` and `--json` keep
|
|
188
|
+
plain lines and prompts. Ctrl-C exits 130. The address, the code and the
|
|
189
|
+
session code are never echoed, logged, stored or passed to cf or npm. cf output
|
|
190
|
+
and stderr are never echoed; failures carry a stable `code` and a `hint` that
|
|
191
|
+
usually says to run the same command again. See LOCAL.md for the email
|
|
192
|
+
verification, the managed cf install, the allowlist, the environment policy,
|
|
193
|
+
the uploaded data and the error codes.
|
|
194
|
+
|
|
195
|
+
## Output and effects
|
|
196
|
+
|
|
197
|
+
Exit codes: **0** success, **1** validation, API, network or sign-in failure,
|
|
198
|
+
**2** HTTP 429 rate limiting. A completed scan whose result is unsuccessful
|
|
199
|
+
also exits 1. A signed-out `whoami` is not a failure, and a healthy `doctor`
|
|
200
|
+
does not need a sign-in. API error JSON keeps the status, code and retry delay
|
|
201
|
+
when available.
|
|
202
|
+
|
|
203
|
+
Security and customer operations keep JSON response envelopes and pagination
|
|
204
|
+
fields. Cloudflare inventory commands may apply the account or zone filter you
|
|
205
|
+
asked for locally as well as sending it to One; zone detail returns the
|
|
206
|
+
selected object. Text output is for people; use JSON for automation and
|
|
207
|
+
evidence export.
|
|
208
|
+
|
|
209
|
+
Provider credentials, signed delegation claims, internal bearer tokens and
|
|
210
|
+
organization overrides are never CLI inputs. Commands use named One routes,
|
|
211
|
+
with two exceptions. Local provider reads: `vigilbase cloudflare-checkup` runs
|
|
212
|
+
Cloudflare's own `cf` CLI on your machine with a fixed allowlist of read-only
|
|
213
|
+
commands; cf owns your Cloudflare login, and the Vigilbase CLI never reads,
|
|
214
|
+
prints, stores or uploads it. And the vigilbase.com local-session routes, which
|
|
215
|
+
are the checkup's only Vigilbase requests: GET `…/availability`, POST
|
|
216
|
+
`…/request` and POST `…/verify` without a credential, then GET `…/local-session`
|
|
217
|
+
and, after you confirm, POST `…/local-session/snapshot` with the exact snapshot
|
|
218
|
+
file, both authorized by the session code the email verification returned (see
|
|
219
|
+
LOCAL.md). Webhooks, cron and admin repair endpoints, interactive OAuth
|
|
220
|
+
handoffs, streaming or binary downloads, and endpoints that create records on
|
|
221
|
+
GET are not exposed. Remediation that needs durable approval and receipts stays
|
|
222
|
+
in its existing One and Vigil flows.
|