securenow 8.0.2 → 8.1.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.
package/NPM_README.md CHANGED
@@ -260,7 +260,15 @@ npx securenow notifications read-all
260
260
  ### Alerting
261
261
 
262
262
  ```bash
263
- # View alert rules, channels, and history
263
+ # Create a custom detection rule from your own SQL (new in 8.1)
264
+ npx securenow alerts rules create \
265
+ --name "Auth: magic-link brute force" \
266
+ --sql @rule.sql \
267
+ --apps <app-key> \
268
+ --severity high \
269
+ --nlp "single IP flooding /api/auth/signin or /api/auth/callback"
270
+
271
+ # View / manage alert rules, channels, and history
264
272
  npx securenow alerts rules
265
273
  npx securenow alerts rules show <rule-id>
266
274
  npx securenow alerts rules update <rule-id> --applications-all
@@ -271,6 +279,8 @@ npx securenow alerts channels
271
279
  npx securenow alerts history --limit 20
272
280
  ```
273
281
 
282
+ Your detection SQL scopes app keys with the `__USER_APP_KEYS__` placeholder and selects an `ip` column for per-IP aggregation and remediation. SecureNow stores the query, runs it on the rule's schedule (default every 15 min), and routes matches to your in-app channel (override with `--channel <id>`). Requires an API key with `alerts:write`.
283
+
274
284
  ### IP Intelligence & Blocklist
275
285
 
276
286
  ```bash
package/README.md CHANGED
@@ -66,7 +66,7 @@ Runtime credentials look like:
66
66
  }
67
67
  ```
68
68
 
69
- The SDK reads the runtime file at boot, sends traces/logs through the SecureNow ingest gateway, routes by `app.key`, and authenticates with the runtime API key. When you rotate with `npx securenow api-key create`, the CLI defaults to the current app in `.securenow/runtime.json`, resolves that app UUID to the server app id, creates a one-app `runtime_app` key, and stores the plaintext key back into runtime credentials. `npx securenow init` also fills the config block with secure defaults plus an `_securenow.explanations` section so users can see what every setting does. Local credential files are auto-added to `.gitignore` so they never land in git.
69
+ The SDK reads the runtime file at boot, sends traces/logs through the SecureNow ingest gateway, routes by `app.key`, and authenticates with the runtime API key. When you rotate with `npx securenow api-key create`, the CLI defaults to the current app in `.securenow/runtime.json`, resolves that app UUID to the server app id, creates a one-app `runtime_app` key, and stores the plaintext key back into runtime credentials. `npx securenow init` also fills the config block with secure defaults plus an `_securenow.explanations` section so users can see what every setting does.
70
70
 
71
71
  ---
72
72
 
@@ -81,7 +81,7 @@ npx securenow login
81
81
  Then ask your coding agent to wire each app with this prompt:
82
82
 
83
83
  ```text
84
- I already ran npx securenow login from the repo root. For every Node.js or Next.js app under this repo: install securenow@latest, run or merge npx securenow init, create or reuse a SecureNow app, write local .securenow/runtime.json plus tokenless .securenow/credentials.production.json, gitignore only SecureNow credential files, enable traces, logs, body capture, multipart metadata, and firewall, then verify with npx securenow env --json, npx securenow test-span, npx securenow log send, and a local HTTP smoke test where possible. Do not print secrets.
84
+ I already ran npx securenow login from the repo root. For every Node.js or Next.js app under this repo: install securenow@latest, run or merge npx securenow init, create or reuse a SecureNow app, write local .securenow/runtime.json plus tokenless .securenow/credentials.production.json for secret-file deployment, enable traces, logs, body capture, multipart metadata, and firewall, then verify with npx securenow env --json, npx securenow test-span, npx securenow log send, and a local HTTP smoke test where possible. Do not print secrets.
85
85
  ```
86
86
 
87
87
  For production, deploy the tokenless runtime credentials as a secret file mounted at `<app-root>/.securenow/credentials.json`.
@@ -169,7 +169,7 @@ SecureNow does not export metrics by default. The preload sets `OTEL_METRICS_EXP
169
169
 
170
170
  ## Production Without Env Vars
171
171
 
172
- Production uses the same file structure. Do not commit `.securenow/`; instead deploy a tokenless runtime credentials file as a secret file and mount/copy it to:
172
+ Production uses the same file structure. Deploy a tokenless runtime credentials file as a secret file and mount/copy it to:
173
173
 
174
174
  ```text
175
175
  <app-root>/.securenow/credentials.json
package/SKILL-API.md CHANGED
@@ -70,7 +70,7 @@ npx securenow app connect # pick/create app; runtime API key is minted au
70
70
  npx securenow api-key set snk_live_abc123...
71
71
  ```
72
72
 
73
- Both paths write the key to `.securenow/runtime.json` (gitignored via credential-file patterns, not a whole-directory `.securenow/` ignore) and the firewall activates on next start. For production, run `npx securenow credentials runtime --env production` and mount/copy the tokenless file as `.securenow/credentials.json` or `.securenow/credentials.<env>.json`.
73
+ Both paths write the key to `.securenow/runtime.json` and the firewall activates on next start. For production, run `npx securenow credentials runtime --env production` and mount/copy the tokenless file as `.securenow/credentials.json` or `.securenow/credentials.<env>.json`.
74
74
 
75
75
  The automatically created key is scoped to the selected app only. Its
76
76
  `runtime_app` scopes are `traces:write`, `logs:write`, `firewall:read`,
@@ -224,7 +224,7 @@ On Vercel it uses `@vercel/otel`; self-hosted uses vanilla `@opentelemetry/sdk-n
224
224
  }
225
225
  ```
226
226
 
227
- Local development and production do not need `.env.local`; `npx securenow app connect` and `npx securenow init` keep `.securenow/runtime.json` filled and gitignored. For production, run `npx securenow credentials runtime --env production` and mount/copy the generated JSON as `.securenow/credentials.json` or `.securenow/credentials.production.json`.
227
+ Local development and production do not need `.env.local`; `npx securenow app connect` and `npx securenow init` keep `.securenow/runtime.json` filled with runtime credentials and secure defaults. For production, run `npx securenow credentials runtime --env production` and mount/copy the generated JSON as `.securenow/credentials.json` or `.securenow/credentials.production.json`.
228
228
 
229
229
  #### Next.js Body Capture
230
230
 
@@ -595,7 +595,7 @@ npm install securenow@latest
595
595
  npx securenow login
596
596
  ```
597
597
 
598
- No `.env` is needed. `npx securenow app connect` writes app identity, runtime API key, and secure defaults to `.securenow/runtime.json`; the SDK uses the default SecureNow ingestion gateway and the gateway routes by `app.key` while authenticating with the runtime API key. `npx securenow init` makes sure the file has explanations and is gitignored without ignoring the whole `.securenow/` directory.
598
+ No `.env` is needed. `npx securenow app connect` writes app identity, runtime API key, and secure defaults to `.securenow/runtime.json`; the SDK uses the default SecureNow ingestion gateway and the gateway routes by `app.key` while authenticating with the runtime API key. `npx securenow init` makes sure the file has explanations and secure SDK defaults.
599
599
 
600
600
  Update `package.json`:
601
601
  ```json
@@ -611,7 +611,7 @@ npm install securenow@latest
611
611
  npx securenow app connect # pick/create app; runtime API key is minted automatically
612
612
  ```
613
613
 
614
- `securenow app connect` enables the selected app's firewall toggle and writes app/runtime config plus the runtime API key to `.securenow/runtime.json` (gitignored via credential-file patterns, not a whole-directory `.securenow/` ignore). Traces, logs, request body capture, multipart metadata capture, and firewall enforcement are enabled by default. Then run `npx securenow init`; it creates `instrumentation.ts`, patches `next.config.*` when safe, or prints exact Codex/Claude merge instructions for existing files.
614
+ `securenow app connect` enables the selected app's firewall toggle and writes app/runtime config plus the runtime API key to `.securenow/runtime.json`. Traces, logs, request body capture, multipart metadata capture, and firewall enforcement are enabled by default. Then run `npx securenow init`; it creates `instrumentation.ts`, patches `next.config.*` when safe, or prints exact Codex/Claude merge instructions for existing files.
615
615
 
616
616
  ### Enable Firewall With Zero Tracing Overhead
617
617