neatlogs-cli 0.1.0-team-test.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/CHANGELOG.md +11 -0
- package/README.md +602 -0
- package/SECURITY.md +68 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +183470 -0
- package/docs/command-reference.md +290 -0
- package/package.json +58 -0
package/SECURITY.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# NeatLogs CLI security
|
|
2
|
+
|
|
3
|
+
## Credential handling
|
|
4
|
+
|
|
5
|
+
- Never pass access, refresh, service-account, or legacy API tokens as command
|
|
6
|
+
arguments. Use OAuth login for humans and `NEATLOGS_TOKEN` for unattended
|
|
7
|
+
automation.
|
|
8
|
+
- Stored OAuth credentials are bound to the normalized API host, OAuth issuer,
|
|
9
|
+
and profile. The CLI refuses to send them to a different host override.
|
|
10
|
+
- The primary store talks directly to the native OS vault: macOS Keychain,
|
|
11
|
+
Windows Credential Manager, or Linux Secret Service. The vault account is a
|
|
12
|
+
hash of the normalized binding; only strict credential JSON is stored as its
|
|
13
|
+
password. Secrets are never put in process arguments, service names, or
|
|
14
|
+
account names.
|
|
15
|
+
- Linux requires libsecret and an available Secret Service implementation. The
|
|
16
|
+
native adapter does not use the kernel keyring and does not choose a file
|
|
17
|
+
backend if Secret Service is missing.
|
|
18
|
+
- The CLI does not consult Git credential configuration and has no silent file
|
|
19
|
+
fallback. If the native vault cannot persist and read back the complete
|
|
20
|
+
credential, login fails closed.
|
|
21
|
+
- On POSIX, the plaintext file fallback requires
|
|
22
|
+
`--allow-file-credentials`; it uses an atomic write under a `0700` directory
|
|
23
|
+
and `0600` file and warns on login and every use. Windows rejects the file
|
|
24
|
+
fallback before filesystem access because equivalent ACL enforcement is not
|
|
25
|
+
implemented.
|
|
26
|
+
- Profiles contain only host, issuer, selected organization/project, and the
|
|
27
|
+
credential-store kind. They never contain tokens.
|
|
28
|
+
|
|
29
|
+
## OAuth handling
|
|
30
|
+
|
|
31
|
+
- Browser login uses Authorization Code with PKCE S256, a high-entropy state,
|
|
32
|
+
and a temporary exact `http://127.0.0.1:<port>/callback` listener. The listener
|
|
33
|
+
validates method, Host, path, state, parameter allowlist, and code shape.
|
|
34
|
+
- `auth login --device` is the explicit headless fallback and obeys the server
|
|
35
|
+
polling interval, `Retry-After`, `slow_down`, and expiry.
|
|
36
|
+
- OAuth requests have a 10-second network deadline, responses are byte bounded,
|
|
37
|
+
and redirects are rejected. Device verification links must match the exact
|
|
38
|
+
configured issuer. Tokens are never printed by login, status, diagnostics, or
|
|
39
|
+
errors.
|
|
40
|
+
- Access tokens are refreshed with rotation before expiry. Normal logout revokes
|
|
41
|
+
the refresh family before deleting local material. `--local-only` is explicit
|
|
42
|
+
and should be reserved for recovery when the server is unavailable.
|
|
43
|
+
- An authenticated profile cannot be deleted directly. Log it out first so the
|
|
44
|
+
server credential is revoked, then delete the remaining non-secret profile.
|
|
45
|
+
|
|
46
|
+
## Agent and CI use
|
|
47
|
+
|
|
48
|
+
Agents should use stable `--json` output, stdin for request bodies, and an
|
|
49
|
+
environment-provided service-account token. The CLI does not accept arbitrary
|
|
50
|
+
HTTP methods, paths, runtime schemas, or cross-origin redirects.
|
|
51
|
+
|
|
52
|
+
## Guest review tokens
|
|
53
|
+
|
|
54
|
+
Guest review tokens are capability secrets and must enter only through
|
|
55
|
+
strict JSON stdin for `neatlogs guest context --request-stdin` or `neatlogs guest
|
|
56
|
+
submit <item-id> --request-stdin`. They are never accepted through argv,
|
|
57
|
+
environment profiles, stored credentials, a URL, or the selected project.
|
|
58
|
+
They must never be emitted to stdout, stderr, diagnostics, or error details.
|
|
59
|
+
The CLI removes the token from the JSON request body and sends it only as the
|
|
60
|
+
`NeatLogsGuest` authorization value.
|
|
61
|
+
|
|
62
|
+
The generic `neatlogs api` executor is deliberately disabled for guest
|
|
63
|
+
operations. This prevents a profile, project, OAuth, service-account, or legacy
|
|
64
|
+
credential from becoming an accidental fallback. Use placeholders such as
|
|
65
|
+
`<guest-token>` in examples and issue reports, never live material.
|
|
66
|
+
|
|
67
|
+
Report suspected credential exposure privately to the NeatLogs security team;
|
|
68
|
+
do not include live tokens in logs or issue bodies.
|
package/dist/bin.d.ts
ADDED