securenow 6.0.2 → 6.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.
Files changed (87) hide show
  1. package/CONSUMING-APPS-GUIDE.md +455 -0
  2. package/NPM_README.md +2029 -0
  3. package/README.md +297 -40
  4. package/SKILL-API.md +634 -0
  5. package/SKILL-CLI.md +454 -0
  6. package/cidr.js +83 -0
  7. package/cli/apps.js +585 -0
  8. package/cli/auth.js +280 -0
  9. package/cli/client.js +115 -0
  10. package/cli/config.js +173 -0
  11. package/cli/diagnostics.js +387 -0
  12. package/cli/firewall.js +100 -0
  13. package/cli/fp.js +638 -0
  14. package/cli/init.js +201 -0
  15. package/cli/monitor.js +440 -0
  16. package/cli/run.js +148 -0
  17. package/cli/security.js +980 -0
  18. package/cli/ui.js +386 -0
  19. package/cli/utils.js +127 -0
  20. package/cli.js +466 -455
  21. package/console-instrumentation.js +147 -136
  22. package/docs/ALL-FRAMEWORKS-QUICKSTART.md +1377 -455
  23. package/docs/API-KEYS-GUIDE.md +233 -0
  24. package/docs/ARCHITECTURE.md +3 -3
  25. package/docs/AUTO-BODY-CAPTURE.md +1 -1
  26. package/docs/AUTO-SETUP-SUMMARY.md +331 -0
  27. package/docs/AUTO-SETUP.md +4 -4
  28. package/docs/AUTOMATIC-IP-CAPTURE.md +5 -5
  29. package/docs/BODY-CAPTURE-FIX.md +261 -0
  30. package/docs/BODY-CAPTURE-QUICKSTART.md +2 -2
  31. package/docs/CHANGELOG-NEXTJS.md +1 -35
  32. package/docs/COMPLETION-REPORT.md +408 -0
  33. package/docs/CUSTOMER-GUIDE.md +16 -16
  34. package/docs/EASIEST-SETUP.md +5 -5
  35. package/docs/ENVIRONMENT-VARIABLES.md +880 -652
  36. package/docs/EXPRESS-BODY-CAPTURE.md +13 -12
  37. package/docs/EXPRESS-SETUP-GUIDE.md +719 -720
  38. package/docs/FINAL-SOLUTION.md +335 -0
  39. package/docs/FIREWALL-GUIDE.md +426 -0
  40. package/docs/IMPLEMENTATION-SUMMARY.md +410 -0
  41. package/docs/INDEX.md +22 -4
  42. package/docs/LOGGING-GUIDE.md +701 -708
  43. package/docs/LOGGING-QUICKSTART.md +234 -255
  44. package/docs/NEXTJS-BODY-CAPTURE-COMPARISON.md +323 -0
  45. package/docs/NEXTJS-BODY-CAPTURE.md +2 -2
  46. package/docs/NEXTJS-GUIDE.md +14 -14
  47. package/docs/NEXTJS-QUICKSTART.md +1 -1
  48. package/docs/NEXTJS-SETUP-COMPLETE.md +795 -0
  49. package/docs/NEXTJS-WRAPPER-APPROACH.md +1 -1
  50. package/docs/NUXT-GUIDE.md +166 -0
  51. package/docs/QUICKSTART-BODY-CAPTURE.md +2 -2
  52. package/docs/REDACTION-EXAMPLES.md +1 -1
  53. package/docs/REQUEST-BODY-CAPTURE.md +19 -10
  54. package/docs/SOLUTION-SUMMARY.md +312 -0
  55. package/docs/VERCEL-OTEL-MIGRATION.md +3 -3
  56. package/examples/README.md +6 -6
  57. package/examples/instrumentation-with-auto-capture.ts +1 -1
  58. package/examples/nextjs-env-example.txt +2 -2
  59. package/examples/nextjs-instrumentation.js +1 -1
  60. package/examples/nextjs-instrumentation.ts +1 -1
  61. package/examples/nextjs-with-logging-example.md +6 -6
  62. package/examples/nextjs-with-options.ts +1 -1
  63. package/examples/test-nextjs-setup.js +1 -1
  64. package/firewall-cloud.js +212 -0
  65. package/firewall-iptables.js +139 -0
  66. package/firewall-only.js +38 -0
  67. package/firewall-tcp.js +74 -0
  68. package/firewall.js +720 -0
  69. package/free-trial-banner.js +174 -0
  70. package/nextjs-auto-capture.js +199 -207
  71. package/nextjs-middleware.js +186 -181
  72. package/nextjs-webpack-config.js +88 -53
  73. package/nextjs-wrapper.js +158 -158
  74. package/nextjs.d.ts +1 -1
  75. package/nextjs.js +639 -647
  76. package/nuxt-server-plugin.mjs +423 -0
  77. package/nuxt.d.ts +60 -0
  78. package/nuxt.mjs +75 -0
  79. package/package.json +186 -164
  80. package/postinstall.js +6 -6
  81. package/register.d.ts +1 -1
  82. package/register.js +39 -4
  83. package/resolve-ip.js +77 -0
  84. package/tracing.d.ts +2 -1
  85. package/tracing.js +295 -34
  86. package/web-vite.mjs +239 -156
  87. package/LICENSE +0 -15
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SecureNow
2
2
 
3
- OpenTelemetry instrumentation for Node.js and Next.js applications - send **traces and logs** to SigNoz or any OTLP-compatible backend.
3
+ OpenTelemetry instrumentation for Node.js, Next.js, and Nuxt applications - send **traces and logs** to any OTLP-compatible backend (including SecureNow).
4
4
 
5
5
  **Official npm package:** [securenow](http://securenow.ai/)
6
6
 
@@ -8,73 +8,152 @@ OpenTelemetry instrumentation for Node.js and Next.js applications - send **trac
8
8
 
9
9
  ## 🚀 Quick Start
10
10
 
11
- ### For Next.js Applications
12
-
13
- **The easiest way to add observability to Next.js!**
11
+ ### For Any Node.js App (Express, Fastify, NestJS, Koa, Hapi, etc.)
14
12
 
15
13
  ```bash
16
- # Just install - setup is automatic!
14
+ # 1. Install
17
15
  npm install securenow
16
+
17
+ # 2. Set env vars
18
+ export SECURENOW_APPID=my-app
19
+ export SECURENOW_INSTANCE=https://freetrial.securenow.ai:4318
20
+
21
+ # 3. Add -r securenow/register to your start command
22
+ node -r securenow/register src/app.js
23
+ ```
24
+
25
+ That's it. One `-r` flag is all you need — ESM and CJS apps are handled automatically (Node >=20.6 auto-registers the ESM loader hook).
26
+
27
+ > **package.json** example:
28
+ > ```json
29
+ > "scripts": {
30
+ > "start": "node -r securenow/register src/index.js",
31
+ > "dev": "node -r securenow/register --watch src/index.js"
32
+ > }
33
+ > ```
34
+
35
+ You can also use `NODE_OPTIONS` so your existing scripts stay unchanged:
36
+ ```bash
37
+ NODE_OPTIONS="-r securenow/register" npm start
18
38
  ```
19
39
 
20
- **🎉 The installer will automatically:**
21
- - Detect your Next.js project
22
- - Create `instrumentation.ts` (or `.js`)
23
- - Create `.env.local` template
40
+ See the [All Frameworks Quick Start](./docs/ALL-FRAMEWORKS-QUICKSTART.md) for tested setup guides.
24
41
 
25
- **Just answer "Y" when prompted!**
42
+ ---
26
43
 
27
- Then configure your `.env.local`:
44
+ ### For Next.js Applications
28
45
 
29
46
  ```bash
30
- SECURENOW_APPID=my-nextjs-app
31
- SECURENOW_INSTANCE=http://your-signoz-server:4318
47
+ # 1. Install
48
+ npm install securenow
49
+
50
+ # 2. Auto-scaffold instrumentation files
51
+ npx securenow init --key snk_live_abc123...
52
+ ```
53
+
54
+ This creates `instrumentation.ts` and tells you to wrap your `next.config.js`:
55
+
56
+ ```javascript
57
+ // next.config.js
58
+ const { withSecureNow } = require('securenow/nextjs-webpack-config');
59
+
60
+ module.exports = withSecureNow({
61
+ // your existing config
62
+ });
32
63
  ```
33
64
 
34
- **Alternative:** Use the CLI command
65
+ `withSecureNow()` auto-detects Next.js 14 vs 15 and sets the correct externalization config. No manual `serverExternalPackages` list needed.
66
+
67
+ Configure `.env.local`:
68
+
35
69
  ```bash
36
- npx securenow init
70
+ SECURENOW_APPID=my-nextjs-app
71
+ SECURENOW_INSTANCE=http://your-otlp-collector:4318
72
+ SECURENOW_API_KEY=snk_live_abc123...
37
73
  ```
38
74
 
39
- **Done!** 🎉 See [Next.js Complete Guide](./docs/NEXTJS-GUIDE.md) for details.
75
+ **Done!** See [Next.js Complete Guide](./docs/NEXTJS-GUIDE.md) for details.
40
76
 
41
77
  ---
42
78
 
43
- ### For Node.js Applications (Express, Fastify, NestJS, etc.)
44
-
45
- #### Tracing Only
79
+ ### For Nuxt 3 Applications
46
80
 
47
81
  ```bash
48
82
  # 1. Install
49
83
  npm install securenow
84
+ ```
50
85
 
51
- # 2. Set environment variables
52
- export SECURENOW_APPID=my-app
53
- export SECURENOW_INSTANCE=http://your-signoz-server:4318
86
+ Add the module to your `nuxt.config.ts`:
54
87
 
55
- # 3. Run with preload
56
- NODE_OPTIONS="-r securenow/register" node app.js
57
- # or
58
- NODE_OPTIONS="-r securenow/register" npm start
88
+ ```ts
89
+ export default defineNuxtConfig({
90
+ modules: ['securenow/nuxt'],
91
+ });
59
92
  ```
60
93
 
61
- #### Tracing + Logging (Recommended)
94
+ Set environment variables in `.env`:
62
95
 
63
96
  ```bash
64
- # 1. Install
65
- npm install securenow
97
+ SECURENOW_APPID=my-nuxt-app
98
+ SECURENOW_INSTANCE=https://freetrial.securenow.ai:4318
99
+ ```
66
100
 
67
- # 2. Set environment variables
68
- export SECURENOW_APPID=my-app
69
- export SECURENOW_INSTANCE=http://your-signoz-server:4318
70
- export SECURENOW_LOGGING_ENABLED=1
101
+ **Done!** All server-side requests are now traced automatically. The firewall also activates automatically when `SECURENOW_API_KEY` is set. See the [Nuxt 3 Complete Guide](./docs/NUXT-GUIDE.md) for details.
102
+
103
+ ---
104
+
105
+ ### CLI -- Manage Everything from the Terminal
106
+
107
+ ```bash
108
+ # Set up your project (auto-detects framework, creates instrumentation files)
109
+ npx securenow init --key snk_live_abc123...
110
+
111
+ # Authenticate
112
+ npx securenow login
113
+
114
+ # Create an app and get the key
115
+ npx securenow apps create my-app
116
+
117
+ # Set it as default so you don't need --app every time
118
+ npx securenow config set defaultApp <key>
71
119
 
72
- # 3. Run with preload (adds logging)
73
- NODE_OPTIONS="-r securenow/register -r securenow/console-instrumentation" node app.js
120
+ # View traces, logs
121
+ npx securenow traces
122
+ npx securenow logs
74
123
 
75
- # Now all console.log/info/warn/error automatically go to SigNoz!
124
+ # IP intelligence, forensic queries, blocklist
125
+ npx securenow ip 1.2.3.4
126
+ npx securenow forensics "show top attacking IPs in the last hour"
127
+ npx securenow blocklist add 1.2.3.4 --reason "scanner"
128
+
129
+ # Firewall — automatic IP blocking
130
+ npx securenow firewall status
131
+ npx securenow firewall test-ip 1.2.3.4
132
+
133
+ # False-positive triage from the terminal (full parity with the dashboard)
134
+ npx securenow fp ai-fill --description "Stripe webhook POST to /api/stripe/webhook"
135
+ npx securenow fp mark <notification-id> <ip> --reason "Known partner IP"
136
+
137
+ # Telemetry from scripts/CI — no SDK boot required
138
+ npx securenow log send "Deploy succeeded" --level info --attrs version=1.2.3
139
+ npx securenow test-span # verify collector connectivity
140
+
141
+ # Diagnostics & utilities
142
+ npx securenow doctor # probe OTLP + API endpoints
143
+ npx securenow env # show resolved config
144
+ npx securenow redact '{"user":"a","password":"s"}' # preview redaction
145
+ npx securenow cidr match 10.0.0.5 10.0.0.0/8 # exit 0 = hit, 2 = miss
146
+
147
+ # Full dashboard overview
148
+ npx securenow status
76
149
  ```
77
150
 
151
+ Run `npx securenow help` for all commands. See the [CLI Reference](#cli-reference) below.
152
+
153
+ > **Full CLI/SDK parity (v6.1.0+).** Every SDK export has a CLI counterpart: `redactSensitiveData` → `securenow redact`, `createMatcher` → `securenow cidr match`, `getLogger().emit()` → `securenow log send`, `SECURENOW_TEST_SPAN` → `securenow test-span`, `node -r securenow/firewall-only` → `securenow run --firewall-only`.
154
+
155
+ ---
156
+
78
157
  ---
79
158
 
80
159
  ## 📦 Installation
@@ -97,9 +176,9 @@ pnpm add securenow
97
176
  # Required: Your application identifier
98
177
  SECURENOW_APPID=my-app-name
99
178
 
100
- # Optional: Your SigNoz/OTLP collector endpoint
179
+ # Optional: Your OTLP collector endpoint
101
180
  # Default: https://freetrial.securenow.ai:4318
102
- SECURENOW_INSTANCE=http://your-signoz-server:4318
181
+ SECURENOW_INSTANCE=http://your-otlp-collector:4318
103
182
 
104
183
  # Optional: Enable Logging
105
184
  SECURENOW_LOGGING_ENABLED=1 # Enable automatic log collection
@@ -114,6 +193,9 @@ OTEL_EXPORTER_OTLP_HEADERS="x-api-key=..." # Authentication headers
114
193
  SECURENOW_CAPTURE_BODY=1 # Capture request bodies in traces
115
194
  SECURENOW_MAX_BODY_SIZE=10240 # Max body size in bytes
116
195
  SECURENOW_SENSITIVE_FIELDS="field1,field2" # Additional fields to redact
196
+
197
+ # Optional: Multipart body capture (file upload metadata)
198
+ SECURENOW_CAPTURE_MULTIPART=1 # Capture multipart field names, values & file metadata
117
199
  ```
118
200
 
119
201
  ### Legacy Environment Variables (still supported)
@@ -131,6 +213,7 @@ SecureNow automatically instruments:
131
213
 
132
214
  ### Web Frameworks
133
215
  - ✅ Next.js (App Router & Pages Router)
216
+ - ✅ Nuxt 3 (Nitro server)
134
217
  - ✅ Express.js
135
218
  - ✅ Fastify
136
219
  - ✅ NestJS
@@ -161,10 +244,14 @@ SecureNow automatically instruments:
161
244
 
162
245
  ### Quick Starts
163
246
  - **[Next.js Quick Start](./docs/NEXTJS-QUICKSTART.md)** - Get started in 30 seconds
247
+ - **[Nuxt 3 Guide](./docs/NUXT-GUIDE.md)** - One-line Nuxt module setup
164
248
  - **[Logging Quick Start](./docs/LOGGING-QUICKSTART.md)** - Add logging in 2 minutes
165
249
 
166
250
  ### Complete Guides
251
+ - **[Firewall Guide](./docs/FIREWALL-GUIDE.md)** - Automatic multi-layer IP blocking
252
+ - **[API Keys Guide](./docs/API-KEYS-GUIDE.md)** - API key management and scopes
167
253
  - **[Next.js Complete Guide](./docs/NEXTJS-GUIDE.md)** - Full Next.js integration guide
254
+ - **[Nuxt 3 Complete Guide](./docs/NUXT-GUIDE.md)** - Full Nuxt 3 integration guide
168
255
  - **[Logging Complete Guide](./docs/LOGGING-GUIDE.md)** - Full logging setup for all frameworks
169
256
  - **[📚 Complete Documentation](./docs/INDEX.md)** - All guides and references
170
257
 
@@ -173,7 +260,177 @@ SecureNow automatically instruments:
173
260
 
174
261
  ---
175
262
 
176
- ## 🆘 Support
263
+ ## CLI Reference
264
+
265
+ After installing the package, the `securenow` CLI is available via `npx securenow` or globally after `npm install -g securenow`.
266
+
267
+ ### Run (convenience wrapper)
268
+
269
+ | Command | Description |
270
+ |---------|-------------|
271
+ | `securenow run <script>` | Run a Node.js app with `-r securenow/register` injected |
272
+ | `securenow run --watch <script>` | Same, with Node.js watch mode |
273
+
274
+ Most users won't need this — just add `-r securenow/register` to your existing start script.
275
+
276
+ ### Authentication
277
+
278
+ | Command | Description |
279
+ |---------|-------------|
280
+ | `securenow login` | Log in via browser (opens OAuth flow) |
281
+ | `securenow login --token <TOKEN>` | Log in with a token (for CI/headless) |
282
+ | `securenow login --local` | Log in and save credentials to the current project only |
283
+ | `securenow logout` | Clear stored credentials |
284
+ | `securenow logout --local` | Clear project-local credentials only |
285
+ | `securenow whoami` | Show current session info (including auth source) |
286
+
287
+ ### Applications
288
+
289
+ | Command | Description |
290
+ |---------|-------------|
291
+ | `securenow apps` | List all applications |
292
+ | `securenow apps create <name>` | Create app and get the app key |
293
+ | `securenow apps info <id>` | Show application details |
294
+ | `securenow apps delete <id>` | Delete an application |
295
+ | `securenow apps default <key>` | Set default app for all commands |
296
+
297
+ ### Observability
298
+
299
+ | Command | Description |
300
+ |---------|-------------|
301
+ | `securenow traces --app <key>` | List recent traces |
302
+ | `securenow traces show <traceId>` | Show trace spans |
303
+ | `securenow traces analyze <traceId>` | AI security analysis of a trace |
304
+ | `securenow logs --app <key>` | View logs (with `--minutes`, `--level`) |
305
+ | `securenow logs trace <traceId>` | View logs for a specific trace |
306
+ | `securenow analytics` | Response code analytics overview |
307
+ | `securenow status` | Full dashboard summary |
308
+
309
+ ### Detect & Respond
310
+
311
+ | Command | Description |
312
+ |---------|-------------|
313
+ | `securenow notifications` | List notifications |
314
+ | `securenow notifications unread` | Show unread count |
315
+ | `securenow notifications read <id>` | Mark notification as read |
316
+ | `securenow notifications read-all` | Mark all as read |
317
+ | `securenow alerts rules` | List alert rules (status, applications, schedule) |
318
+ | `securenow alerts rules show <id>` | Show one rule (includes all-apps vs explicit apps) |
319
+ | `securenow alerts rules update <id> --applications-all` | Set rule to all current & future apps |
320
+ | `securenow alerts rules update <id> --apps k1,k2` | Scope rule to specific app keys |
321
+ | `securenow alerts channels` | List alert channels |
322
+ | `securenow alerts history` | View alert history |
323
+
324
+ ### Investigate
325
+
326
+ | Command | Description |
327
+ |---------|-------------|
328
+ | `securenow ip <address>` | IP intelligence lookup (geo, abuse score, verdict) |
329
+ | `securenow ip traces <address>` | Show traces originating from an IP |
330
+ | `securenow forensics "<query>"` | Natural language forensic query (NL to SQL) |
331
+ | `securenow forensics library` | View saved query library |
332
+ | `securenow api-map` | View discovered API endpoints |
333
+ | `securenow api-map stats` | API map statistics |
334
+
335
+ ### Firewall
336
+
337
+ | Command | Description |
338
+ |---------|-------------|
339
+ | `securenow firewall status` | Show firewall status, active layers, and API key info |
340
+ | `securenow firewall test-ip <ip>` | Check if an IP would be blocked by the current blocklist |
341
+ | `securenow run --firewall-only <script>` | Run a Node.js app with the firewall preloaded but **no** OTel tracing overhead |
342
+
343
+ ### Remediation
344
+
345
+ | Command | Description |
346
+ |---------|-------------|
347
+ | `securenow blocklist` | List blocked IPs |
348
+ | `securenow blocklist add <ip>` | Block an IP (`--reason <reason>`) |
349
+ | `securenow blocklist remove <id>` | Remove from blocklist |
350
+ | `securenow blocklist stats` | Blocklist statistics |
351
+ | `securenow allowlist` | List allowed IPs (restrict-mode) |
352
+ | `securenow allowlist add <ip>` | Allow an IP (`--label`, `--reason`) |
353
+ | `securenow allowlist remove <id>` | Remove from allowlist |
354
+ | `securenow trusted` | List trusted IPs |
355
+ | `securenow trusted add <ip>` | Add trusted IP (`--label <label>`) |
356
+ | `securenow trusted remove <id>` | Remove trusted IP |
357
+
358
+ ### False-Positive Management
359
+
360
+ Full false-positive triage without leaving the terminal — mirrors the web dashboard one-for-one.
361
+
362
+ | Command | Description |
363
+ |---------|-------------|
364
+ | `securenow fp` / `securenow fp list` | List all exclusion rules |
365
+ | `securenow fp show <id>` | Show rule details (conditions, scope, match mode) |
366
+ | `securenow fp create --conditions '[...]'` | Create a raw exclusion rule |
367
+ | `securenow fp create --path /api/events --method POST --path-safe standard --ua-safe standard --reason "..."` | Create with safe-value presets |
368
+ | `securenow fp edit <id> [--active true\|false] [--conditions '[...]']` | Edit an existing rule |
369
+ | `securenow fp delete <id> [--yes]` | Delete a rule |
370
+ | `securenow fp test-body '<json>' --conditions '[...]'` | Test conditions against a request body |
371
+ | `securenow fp dry-run --conditions '[...]'` | Dry-run against the last 3 days of live traces |
372
+ | `securenow fp ai-fill --description "Stripe webhook POST to /api/stripe/webhook"` | AI-generate exclusion conditions |
373
+ | `securenow fp mark <notification-id> <ip>` | Mark an IP as false positive on a specific notification |
374
+
375
+ ### Telemetry
376
+
377
+ Emit OTLP logs and spans from the shell — for cron jobs, CI pipelines, and scripts. No SDK boot required.
378
+
379
+ | Command | Description |
380
+ |---------|-------------|
381
+ | `securenow log send "<message>" [--level info\|warn\|error] [--attrs k=v,k=v]` | Send a single log record via OTLP/HTTP |
382
+ | `securenow test-span [<name>]` | Emit a test span to verify collector connectivity |
383
+
384
+ ### Utilities
385
+
386
+ SDK helpers surfaced as CLI commands — debug redaction, test CIDR matching, inspect config without writing Node.
387
+
388
+ | Command | Description |
389
+ |---------|-------------|
390
+ | `securenow redact '<json>' [--fields f1,f2]` | Redact sensitive fields (also accepts `@file.json`) |
391
+ | `securenow cidr match <ip> <cidr1,cidr2>` | Check if an IP matches a CIDR list (exit `0` hit / `2` miss) |
392
+ | `securenow cidr parse <cidr>` | Parse a CIDR — print network, broadcast, mask, size |
393
+ | `securenow env [--json]` | Show resolved config (service name, endpoints, env vars) |
394
+ | `securenow doctor [--json]` | End-to-end diagnostic: probe OTLP + API, check config |
395
+
396
+ ### Settings
397
+
398
+ | Command | Description |
399
+ |---------|-------------|
400
+ | `securenow instances` | List ClickHouse instances |
401
+ | `securenow instances test <id>` | Test instance connection |
402
+ | `securenow config get` | Show all config values |
403
+ | `securenow config set <key> <value>` | Set a config value |
404
+ | `securenow config path` | Show config file locations |
405
+ | `securenow init [--key <KEY>]` | Auto-scaffold instrumentation for your framework |
406
+ | `securenow version` | Show CLI version |
407
+
408
+ ### Global Flags
409
+
410
+ | Flag | Description |
411
+ |------|-------------|
412
+ | `--json` | Output as JSON (works on every command) |
413
+ | `--help` | Show help for any command |
414
+ | `--app <key>` | Specify app key (or set default with `config set defaultApp`) |
415
+ | `--local` | Save/clear credentials per-project (login/logout only) |
416
+
417
+ ### Configuration
418
+
419
+ Credentials and settings are stored in `~/.securenow/` (global) or `.securenow/` (per-project):
420
+
421
+ | File | Purpose |
422
+ |------|---------|
423
+ | `~/.securenow/config.json` | API URL, default app, preferences |
424
+ | `~/.securenow/credentials.json` | Auth token — global (restricted permissions) |
425
+ | `.securenow/credentials.json` | Auth token — project-local (use `login --local`) |
426
+
427
+ **Credential resolution order:** `SECURENOW_TOKEN` env var → project `.securenow/credentials.json` → global `~/.securenow/credentials.json`.
428
+
429
+ Override the API URL with `securenow config set apiUrl <url>` or the `SECURENOW_API_URL` environment variable.
430
+
431
+ ---
432
+
433
+ ## Support
177
434
 
178
435
  - **Website:** [securenow.ai](http://securenow.ai/)
179
436
  - **Issues:** Report bugs and request features
@@ -181,6 +438,6 @@ SecureNow automatically instruments:
181
438
 
182
439
  ---
183
440
 
184
- ## 📄 License
441
+ ## License
185
442
 
186
443
  ISC