securenow 7.3.0 → 7.5.0

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.
@@ -16,7 +16,7 @@ Complete reference for all environment variables supported by SecureNow.
16
16
  | **SECURENOW_INSTANCE** | Optional | `https://freetrial.securenow.ai:4318` | OTLP collector base URL |
17
17
  | **SECURENOW_API_KEY** | Optional | from credentials file | API key (same UUID as APPID). Enables firewall. |
18
18
  | **SECURENOW_LOGGING_ENABLED** | Optional | `1` (on) | Forward `console.*` as OTLP logs. Set to `0` to disable. |
19
- | **SECURENOW_CAPTURE_BODY** | Optional | `1` (on) | Capture request body. Set to `0` for Fastify/Hapi/Hono. |
19
+ | **SECURENOW_CAPTURE_BODY** | Optional | `1` (on) | Capture request body. Set to `0` only for a local stream conflict. |
20
20
  | **SECURENOW_CAPTURE_MULTIPART** | Optional | `1` (on) | Capture multipart field/file metadata. |
21
21
  | **SECURENOW_MAX_BODY_SIZE** | Optional | `10240` | Max body size in bytes |
22
22
  | **SECURENOW_SENSITIVE_FIELDS** | Optional | - | Comma-separated extra fields to redact |
@@ -288,11 +288,12 @@ export SECURENOW_LOGGING_ENABLED=0
288
288
 
289
289
  **Format:** `1` (enabled) or `0` (disabled)
290
290
 
291
- **Default:** `0` (disabled)
291
+ **Default:** `1` (enabled)
292
292
 
293
293
  **Example:**
294
294
  ```bash
295
- export SECURENOW_CAPTURE_BODY=1
295
+ # Default is enabled. Use this only to opt out:
296
+ export SECURENOW_CAPTURE_BODY=0
296
297
  ```
297
298
 
298
299
  **Supported content types:**
@@ -300,8 +301,7 @@ export SECURENOW_CAPTURE_BODY=1
300
301
  - `application/x-www-form-urlencoded`
301
302
  - `application/graphql`
302
303
 
303
- **Not captured (unless separately enabled):**
304
- - `multipart/form-data` — requires `SECURENOW_CAPTURE_MULTIPART=1` (see below)
304
+ **Not captured:**
305
305
  - Bodies larger than `SECURENOW_MAX_BODY_SIZE`
306
306
 
307
307
  **Security:**
@@ -373,11 +373,12 @@ export SECURENOW_SENSITIVE_FIELDS="custom_secret,private_data,internal_id"
373
373
 
374
374
  **Format:** `1` (enabled) or `0` (disabled)
375
375
 
376
- **Default:** `0` (disabled)
376
+ **Default:** `1` (enabled)
377
377
 
378
378
  **Example:**
379
379
  ```bash
380
- export SECURENOW_CAPTURE_MULTIPART=1
380
+ # Default is enabled. Use this only to opt out:
381
+ export SECURENOW_CAPTURE_MULTIPART=0
381
382
  ```
382
383
 
383
384
  **What gets captured:**
@@ -405,7 +406,7 @@ export SECURENOW_CAPTURE_MULTIPART=1
405
406
 
406
407
  **Parts limit:** 100 parts maximum per request (safety guard).
407
408
 
408
- **Requires:** `SECURENOW_CAPTURE_BODY=1` must also be set (multipart capture is gated behind general body capture).
409
+ **Relationship to body capture:** multipart metadata capture has its own opt-out flag. Leave `SECURENOW_CAPTURE_MULTIPART` unset, `1`, or `true` to keep it enabled.
409
410
 
410
411
  **Since:** v5.8.0
411
412
 
@@ -533,7 +534,7 @@ export NODE_ENV=test
533
534
  export SECURENOW_API_KEY=snk_live_a1b2c3d4e5f6...
534
535
  ```
535
536
 
536
- **v7.1.0+:** the firewall also reads this key from `.securenow/credentials.json` (written by `securenow login` with firewall enabled, or by `securenow api-key set`). The env var only wins if it starts with `snk_live_` — otherwise the credentials file is used, so you can rely on the file for local dev without unsetting any stray env var. Setting an app UUID here (the old pre-7.1 habit) is ignored for firewall auth and would produce silent 401s; always use a `snk_live_...` key.
537
+ **v7.4.0+:** the firewall also reads this key from `.securenow/credentials.json` (written by `securenow login`, which enables the selected app firewall by default, or by `securenow api-key set`). The env var only wins if it starts with `snk_live_` — otherwise the credentials file is used, so you can rely on the file for local dev without unsetting any stray env var. Setting an app UUID here (the old pre-7.1 habit) is ignored for firewall auth and would produce silent 401s; always use a `snk_live_...` key.
537
538
 
538
539
  ---
539
540
 
@@ -47,10 +47,11 @@ All layers share the same in-memory blocklist, synced from the SecureNow API usi
47
47
  Two ways to get the firewall wired up — pick whichever fits:
48
48
 
49
49
  ```bash
50
- # (a) Zero-config (v7.1+): run login and choose "Enable firewall" in the browser.
51
- # The dashboard mints a key scoped firewall:read + blocklist:read + allowlist:read
52
- # and the CLI writes it to .securenow/credentials.json. No further config needed.
53
- npx securenow login
50
+ # (a) Zero-config (v7.4+): run login, pick/create an app, and connect.
51
+ # The selected app's firewall toggle is enabled automatically.
52
+ # The dashboard mints a key scoped firewall:read + blocklist:read + allowlist:read
53
+ # and the CLI writes it to .securenow/credentials.json. No further config needed.
54
+ npx securenow login
54
55
 
55
56
  # (b) Already have a key? Drop it into the credentials file directly:
56
57
  npx securenow api-key set snk_live_abc123...
@@ -0,0 +1,50 @@
1
+ # SecureNow MCP Guide
2
+
3
+ SecureNow ships an MCP server for agent clients such as Codex and Claude.
4
+
5
+ ## Local stdio MCP
6
+
7
+ Use this when the agent is running on the same machine as your project:
8
+
9
+ ```bash
10
+ npx securenow login
11
+ codex mcp add securenow -- npx securenow mcp
12
+ ```
13
+
14
+ You can also run the server directly:
15
+
16
+ ```bash
17
+ npx -p securenow securenow-mcp
18
+ ```
19
+
20
+ The local MCP server reads the same project-local `.securenow/credentials.json`
21
+ as the CLI and SDK. No production deployment is required.
22
+
23
+ ## Hosted MCP
24
+
25
+ For hosted clients, expose the secured API endpoint:
26
+
27
+ ```text
28
+ https://api.securenow.ai/mcp
29
+ ```
30
+
31
+ The hosted endpoint must be authenticated with `Authorization: Bearer ...`.
32
+ It accepts SecureNow JWT sessions and `snk_live_...` API keys through the same
33
+ API auth path used by the rest of SecureNow.
34
+
35
+ ## Security Model
36
+
37
+ - Read tools require the matching `*:read` scope.
38
+ - Write tools require the matching `*:write` scope or `applications:write` for
39
+ app firewall settings.
40
+ - Write tools also require `confirm: true` and a non-empty `reason`.
41
+ - Full tokens and API keys are never returned by tools or resources.
42
+ - Hosted MCP validates browser origins and rate-limits requests.
43
+ - Tool calls are proxied through existing API routes so tenant isolation and
44
+ scope enforcement stay centralized.
45
+
46
+ ## Tools
47
+
48
+ The MCP exposes applications, traces, logs, firewall, IP intelligence,
49
+ forensics, notifications, blocklist, allowlist, trusted IPs, analytics, bundled
50
+ docs resources, and setup prompts.