securenow 8.8.0 → 8.10.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/cli.js CHANGED
@@ -188,16 +188,54 @@ const COMMANDS = {
188
188
  },
189
189
  defaultSub: 'list',
190
190
  },
191
- logs: {
191
+ logs: {
192
192
  desc: 'View application logs',
193
193
  usage: 'securenow logs [options]',
194
194
  sub: {
195
195
  list: { desc: 'List recent logs', flags: { app: 'App key', env: 'Environment (production, staging, preview, local, or all)', environment: 'Alias for --env', limit: 'Max results (default 200)', since: 'Time window (e.g. 30m, 6h, 2d)', minutes: 'Time window in minutes (alias for --since Nm)', level: 'Filter by level (error, warn, info, debug)', start: 'Start time (ISO 8601)', end: 'End time (ISO 8601)' }, run: (a, f) => require('./cli/monitor').logsList(a, f) },
196
196
  trace: { desc: 'Show logs for a trace', usage: 'securenow logs trace <traceId>', flags: { app: 'App key', env: 'Environment', environment: 'Alias for --env' }, run: (a, f) => require('./cli/monitor').logsTrace(a, f) },
197
197
  },
198
- defaultSub: 'list',
199
- },
200
- notifications: {
198
+ defaultSub: 'list',
199
+ },
200
+ telemetry: {
201
+ desc: 'Inspect the alert-SQL telemetry contract and fields observed for an app',
202
+ usage: 'securenow telemetry <schema|fields> [options]',
203
+ flags: {
204
+ app: 'With fields: application key (defaults to connected/default app)',
205
+ env: 'With fields: environment or all (default: production)',
206
+ since: 'With fields: observation window such as 30m, 24h, or 7d (maximum 30d)',
207
+ source: 'Schema section or live signal source',
208
+ limit: 'With fields: maximum fields per signal (1-500, default 200)',
209
+ json: 'Machine-readable output',
210
+ },
211
+ sub: {
212
+ schema: {
213
+ desc: 'Print the packaged ClickHouse tables, fields, mappings, and SQL requirements',
214
+ usage: 'securenow telemetry schema [all|logs|traces|events] [--json]',
215
+ flags: {
216
+ source: 'Schema section: all, logs, traces, or events',
217
+ json: 'Output the machine-readable contract as JSON',
218
+ },
219
+ run: (a, f) => require('./cli/telemetry').schema(a, f),
220
+ },
221
+ fields: {
222
+ desc: 'Discover fields and custom event types actually emitted by an app',
223
+ usage: 'securenow telemetry fields [--app <key>] [--env production] [--since 24h] [--source all] [--limit 200] [--json]',
224
+ flags: {
225
+ app: 'Application key (defaults to connected/default app)',
226
+ env: 'Environment, comma-separated environments, or all (default: production)',
227
+ environment: 'Alias for --env',
228
+ since: 'Observation window such as 30m, 24h, or 7d (maximum 30d)',
229
+ source: 'Signal source: all, logs, or traces',
230
+ limit: 'Maximum fields per signal (1-500, default 200)',
231
+ json: 'Output JSON for agents and scripts',
232
+ },
233
+ run: (a, f) => require('./cli/telemetry').fields(a, f),
234
+ },
235
+ },
236
+ defaultSub: 'schema',
237
+ },
238
+ notifications: {
201
239
  desc: 'Manage notifications',
202
240
  usage: 'securenow notifications <subcommand> [options]',
203
241
  sub: {
@@ -473,6 +511,8 @@ const COMMANDS = {
473
511
  add: { desc: 'Block an IP', usage: 'securenow blocklist add <ip> [--route /admin*] [--mode prefix] [--method GET] [--app <key>] [--env production] [--duration 24h] [--reason <reason>]', run: (a, f) => require('./cli/security').blocklistAdd(a, f) },
474
512
  unblock: { desc: 'Unblock an IP and keep block history', usage: 'securenow blocklist unblock <id> [--reason <reason>]', run: (a, f) => require('./cli/security').blocklistRemove(a, f) },
475
513
  remove: { desc: 'Unblock an IP (compatibility alias)', usage: 'securenow blocklist remove <id> [--reason <reason>]', run: (a, f) => require('./cli/security').blocklistRemove(a, f) },
514
+ approve: { desc: 'Approve a pending block (enforce the IP)', usage: 'securenow blocklist approve <pending-block-id> [--reason <reason>] [--yes]', run: (a, f) => require('./cli/security').blocklistApprove(a, f) },
515
+ reject: { desc: 'Reject a pending block (clear the IP, record a scoped no-block decision)', usage: 'securenow blocklist reject <pending-block-id> [--reason <reason>] [--yes]', run: (a, f) => require('./cli/security').blocklistReject(a, f) },
476
516
  stats: { desc: 'Blocklist statistics', run: (a, f) => require('./cli/security').blocklistStats(a, f) },
477
517
  },
478
518
  defaultSub: 'list',
@@ -763,7 +803,7 @@ function showHelp(commandName) {
763
803
  'Investigate': ['ip', 'forensics'],
764
804
  'Firewall': ['firewall'],
765
805
  'Remediation': ['automation', 'ratelimit', 'challenge', 'blocklist', 'revoke', 'allowlist', 'trusted'],
766
- 'Telemetry': ['log', 'event', 'test-span'],
806
+ 'Telemetry': ['telemetry', 'log', 'event', 'test-span'],
767
807
  'Utilities': ['redact', 'cidr', 'doctor', 'env', 'mcp'],
768
808
  'Settings': ['instances', 'config', 'version'],
769
809
  };