@i4ctime/q-ring 0.3.2 → 0.9.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/README.md +519 -10
- package/dist/chunk-5JBU7TWN.js +1576 -0
- package/dist/chunk-5JBU7TWN.js.map +1 -0
- package/dist/chunk-WG4ZKN7Q.js +1632 -0
- package/dist/chunk-WG4ZKN7Q.js.map +1 -0
- package/dist/{dashboard-X3ONQFLV.js → dashboard-JT5ZNLT5.js} +41 -16
- package/dist/dashboard-JT5ZNLT5.js.map +1 -0
- package/dist/{dashboard-QQWKOOI5.js → dashboard-Q5OQRQCX.js} +41 -16
- package/dist/dashboard-Q5OQRQCX.js.map +1 -0
- package/dist/index.js +1878 -39
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +1610 -21
- package/dist/mcp.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3WTTWJYU.js +0 -653
- package/dist/chunk-3WTTWJYU.js.map +0 -1
- package/dist/chunk-F4SPZ774.js +0 -675
- package/dist/chunk-F4SPZ774.js.map +0 -1
- package/dist/dashboard-QQWKOOI5.js.map +0 -1
- package/dist/dashboard-X3ONQFLV.js.map +0 -1
package/README.md
CHANGED
|
@@ -104,15 +104,22 @@ qring health
|
|
|
104
104
|
|
|
105
105
|
### Observer Effect — Audit Everything
|
|
106
106
|
|
|
107
|
-
Every secret read, write, and delete is logged. Access patterns are tracked for anomaly detection.
|
|
107
|
+
Every secret read, write, and delete is logged with a tamper-evident hash chain. Access patterns are tracked for anomaly detection.
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
110
|
# View audit log
|
|
111
111
|
qring audit
|
|
112
112
|
qring audit --key OPENAI_KEY --limit 50
|
|
113
113
|
|
|
114
|
-
# Detect anomalies (burst access, unusual hours)
|
|
114
|
+
# Detect anomalies (burst access, unusual hours, chain tampering)
|
|
115
115
|
qring audit --anomalies
|
|
116
|
+
|
|
117
|
+
# Verify audit chain integrity
|
|
118
|
+
qring audit:verify
|
|
119
|
+
|
|
120
|
+
# Export audit log
|
|
121
|
+
qring audit:export --format json --since 2026-03-01
|
|
122
|
+
qring audit:export --format csv --output audit-report.csv
|
|
116
123
|
```
|
|
117
124
|
|
|
118
125
|
### Quantum Noise — Secret Generation
|
|
@@ -138,6 +145,9 @@ qring entangle API_KEY API_KEY_BACKUP
|
|
|
138
145
|
|
|
139
146
|
# Now updating API_KEY also updates API_KEY_BACKUP
|
|
140
147
|
qring set API_KEY "new-value"
|
|
148
|
+
|
|
149
|
+
# Unlink entangled secrets
|
|
150
|
+
qring disentangle API_KEY API_KEY_BACKUP
|
|
141
151
|
```
|
|
142
152
|
|
|
143
153
|
### Tunneling — Ephemeral Secrets
|
|
@@ -170,6 +180,420 @@ cat bundle.txt | qring teleport unpack
|
|
|
170
180
|
qring teleport unpack <bundle> --dry-run
|
|
171
181
|
```
|
|
172
182
|
|
|
183
|
+
### Import — Bulk Secret Ingestion
|
|
184
|
+
|
|
185
|
+
Import secrets from `.env` files directly into q-ring. Supports standard dotenv syntax including comments, quoted values, and escape sequences.
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Import all secrets from a .env file
|
|
189
|
+
qring import .env
|
|
190
|
+
|
|
191
|
+
# Import to project scope, skipping existing keys
|
|
192
|
+
qring import .env --project --skip-existing
|
|
193
|
+
|
|
194
|
+
# Preview what would be imported
|
|
195
|
+
qring import .env --dry-run
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Selective Export
|
|
199
|
+
|
|
200
|
+
Export only the secrets you need using key names or tag filters.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Export specific keys
|
|
204
|
+
qring export --keys "API_KEY,DB_PASS,REDIS_URL"
|
|
205
|
+
|
|
206
|
+
# Export by tag
|
|
207
|
+
qring export --tags "backend"
|
|
208
|
+
|
|
209
|
+
# Combine with format
|
|
210
|
+
qring export --keys "API_KEY,DB_PASS" --format json
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Secret Search and Filtering
|
|
214
|
+
|
|
215
|
+
Filter `qring list` output by tag, expiry state, or key pattern.
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Filter by tag
|
|
219
|
+
qring list --tag backend
|
|
220
|
+
|
|
221
|
+
# Show only expired secrets
|
|
222
|
+
qring list --expired
|
|
223
|
+
|
|
224
|
+
# Show only stale secrets (75%+ decay)
|
|
225
|
+
qring list --stale
|
|
226
|
+
|
|
227
|
+
# Glob pattern on key name
|
|
228
|
+
qring list --filter "API_*"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Project Secret Manifest
|
|
232
|
+
|
|
233
|
+
Declare required secrets in `.q-ring.json` and validate project readiness with a single command.
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# Validate project secrets against the manifest
|
|
237
|
+
qring check
|
|
238
|
+
|
|
239
|
+
# See which secrets are present, missing, expired, or stale
|
|
240
|
+
qring check --project-path /path/to/project
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Env File Sync
|
|
244
|
+
|
|
245
|
+
Generate a `.env` file from the project manifest, resolving each key from q-ring with environment-aware superposition collapse.
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Generate to stdout
|
|
249
|
+
qring env:generate
|
|
250
|
+
|
|
251
|
+
# Write to a file
|
|
252
|
+
qring env:generate --output .env
|
|
253
|
+
|
|
254
|
+
# Force a specific environment
|
|
255
|
+
qring env:generate --env staging --output .env.staging
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Secret Liveness Validation
|
|
259
|
+
|
|
260
|
+
Test if a secret is actually valid with its target service. q-ring auto-detects the provider from key prefixes (`sk-` → OpenAI, `ghp_` → GitHub, etc.) or accepts an explicit provider name.
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Validate a single secret
|
|
264
|
+
qring validate OPENAI_API_KEY
|
|
265
|
+
|
|
266
|
+
# Force a specific provider
|
|
267
|
+
qring validate SOME_KEY --provider stripe
|
|
268
|
+
|
|
269
|
+
# Validate all secrets with detectable providers
|
|
270
|
+
qring validate --all
|
|
271
|
+
|
|
272
|
+
# Only validate manifest-declared secrets
|
|
273
|
+
qring validate --all --manifest
|
|
274
|
+
|
|
275
|
+
# List available providers
|
|
276
|
+
qring validate --list-providers
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Built-in providers:** OpenAI, Stripe, GitHub, AWS (format check), Generic HTTP.
|
|
280
|
+
|
|
281
|
+
Output:
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
✓ OPENAI_API_KEY valid (openai, 342ms)
|
|
285
|
+
✗ STRIPE_KEY invalid (stripe, 128ms) — API key has been revoked
|
|
286
|
+
⚠ AWS_ACCESS_KEY error (aws, 10002ms) — network timeout
|
|
287
|
+
○ DATABASE_URL unknown — no provider detected
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Hooks — Callbacks on Secret Change
|
|
291
|
+
|
|
292
|
+
Register webhooks, shell commands, or process signals that fire when secrets are created, updated, or deleted. Supports key matching, glob patterns, tag filtering, and scope constraints.
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# Run a shell command when a secret changes
|
|
296
|
+
qring hook add --key DB_PASS --exec "docker restart app"
|
|
297
|
+
|
|
298
|
+
# POST to a webhook on any write/delete
|
|
299
|
+
qring hook add --key API_KEY --url "https://hooks.example.com/rotate"
|
|
300
|
+
|
|
301
|
+
# Trigger on all secrets tagged "backend"
|
|
302
|
+
qring hook add --tag backend --exec "pm2 restart all"
|
|
303
|
+
|
|
304
|
+
# Signal a process when DB secrets change
|
|
305
|
+
qring hook add --key-pattern "DB_*" --signal-target "node"
|
|
306
|
+
|
|
307
|
+
# List all hooks
|
|
308
|
+
qring hook list
|
|
309
|
+
|
|
310
|
+
# Remove a hook
|
|
311
|
+
qring hook remove <id>
|
|
312
|
+
|
|
313
|
+
# Enable/disable
|
|
314
|
+
qring hook enable <id>
|
|
315
|
+
qring hook disable <id>
|
|
316
|
+
|
|
317
|
+
# Dry-run test a hook
|
|
318
|
+
qring hook test <id>
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Hooks are fire-and-forget: a failing hook never blocks secret operations. The hook registry is stored at `~/.config/q-ring/hooks.json`.
|
|
322
|
+
|
|
323
|
+
**SSRF protection:** HTTP hook URLs targeting private/loopback IP ranges (`127.0.0.0/8`, `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `169.254.0.0/16`, `::1`, `fc00::/7`) are blocked by default. DNS resolution is checked before the request is sent. To allow hooks targeting local services (e.g. during development), set the environment variable `Q_RING_ALLOW_PRIVATE_HOOKS=1`.
|
|
324
|
+
|
|
325
|
+
### Configurable Rotation
|
|
326
|
+
|
|
327
|
+
Set a rotation format per secret so the agent auto-rotates with the correct value shape.
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Store a secret with rotation format metadata
|
|
331
|
+
qring set STRIPE_KEY "sk-..." --rotation-format api-key --rotation-prefix "sk-"
|
|
332
|
+
|
|
333
|
+
# Store a password with password rotation format
|
|
334
|
+
qring set DB_PASS "..." --rotation-format password
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Secure Execution & Auto-Redaction
|
|
338
|
+
|
|
339
|
+
Run commands with secrets securely injected into the environment. All known secret values are automatically redacted from stdout and stderr to prevent leaking into terminal logs or agent transcripts. Exec profiles restrict which commands may be run.
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
# Execute a deployment script with secrets injected
|
|
343
|
+
qring exec -- npm run deploy
|
|
344
|
+
|
|
345
|
+
# Inject only specific tags
|
|
346
|
+
qring exec --tags backend -- node server.js
|
|
347
|
+
|
|
348
|
+
# Run with a restricted profile (blocks curl/wget/ssh, 30s timeout)
|
|
349
|
+
qring exec --profile restricted -- npm test
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Codebase Secret Scanner
|
|
353
|
+
|
|
354
|
+
Migrating a legacy codebase? Quickly scan directories for hardcoded credentials using regex heuristics and Shannon entropy analysis.
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
# Scan current directory
|
|
358
|
+
qring scan .
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Output:
|
|
362
|
+
```
|
|
363
|
+
✗ src/db/connection.js:12
|
|
364
|
+
Key: DB_PASSWORD
|
|
365
|
+
Entropy: 4.23
|
|
366
|
+
Context: const DB_PASSWORD = "..."
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Composite / Templated Secrets
|
|
370
|
+
|
|
371
|
+
Store complex connection strings that dynamically resolve other secrets. If `DB_PASS` rotates, `DB_URL` is automatically correct without manual updates.
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
qring set DB_USER "admin"
|
|
375
|
+
qring set DB_PASS "supersecret"
|
|
376
|
+
qring set DB_URL "postgres://{{DB_USER}}:{{DB_PASS}}@localhost/mydb"
|
|
377
|
+
|
|
378
|
+
# Resolves embedded templates automatically
|
|
379
|
+
qring get DB_URL
|
|
380
|
+
# Output: postgres://admin:supersecret@localhost/mydb
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### User Approvals (Zero-Trust Agent)
|
|
384
|
+
|
|
385
|
+
Protect sensitive production secrets from being read autonomously by the MCP server without explicit user approval. Each approval token is HMAC-verified, scoped, reasoned, and time-limited.
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# Mark a secret as requiring approval
|
|
389
|
+
qring set PROD_DB_URL "..." --requires-approval
|
|
390
|
+
|
|
391
|
+
# Temporarily grant MCP access for 1 hour with a reason
|
|
392
|
+
qring approve PROD_DB_URL --for 3600 --reason "deploying v2.0"
|
|
393
|
+
|
|
394
|
+
# List all approvals with verification status
|
|
395
|
+
qring approvals
|
|
396
|
+
|
|
397
|
+
# Revoke an approval
|
|
398
|
+
qring approve PROD_DB_URL --revoke
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Just-In-Time (JIT) Provisioning
|
|
402
|
+
|
|
403
|
+
Instead of storing static credentials, configure `q-ring` to dynamically generate short-lived tokens on the fly when requested (e.g. AWS STS, generic HTTP endpoints).
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
# Store the STS role configuration
|
|
407
|
+
qring set AWS_TEMP_KEYS '{"roleArn":"arn:aws:iam::123:role/AgentRole", "durationSeconds":3600}' --jit-provider aws-sts
|
|
408
|
+
|
|
409
|
+
# Resolving the secret automatically assumes the role and caches the temporary token
|
|
410
|
+
qring get AWS_TEMP_KEYS
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### Project Context for AI Agents
|
|
414
|
+
|
|
415
|
+
A safe, redacted overview of the project's secrets, configuration, and state. Designed to be fed into an AI agent's system prompt without ever exposing secret values.
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
# Human-readable summary
|
|
419
|
+
qring context
|
|
420
|
+
|
|
421
|
+
# JSON output (for MCP / programmatic use)
|
|
422
|
+
qring context --json
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Secret-Aware Linter
|
|
426
|
+
|
|
427
|
+
Scan specific files for hardcoded secrets with optional auto-fix. When `--fix` is used, detected secrets are replaced with `process.env.KEY` references and stored in q-ring.
|
|
428
|
+
|
|
429
|
+
```bash
|
|
430
|
+
# Lint files for hardcoded secrets
|
|
431
|
+
qring lint src/config.ts src/db.ts
|
|
432
|
+
|
|
433
|
+
# Auto-fix: replace hardcoded values and store in q-ring
|
|
434
|
+
qring lint src/config.ts --fix
|
|
435
|
+
|
|
436
|
+
# Scan entire directory with auto-fix
|
|
437
|
+
qring scan . --fix
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### Agent Memory
|
|
441
|
+
|
|
442
|
+
Encrypted, persistent key-value store that survives across AI agent sessions. Useful for remembering rotation history, project decisions, or context.
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
# Store a memory
|
|
446
|
+
qring remember last_rotation "Rotated STRIPE_KEY on 2026-03-21"
|
|
447
|
+
|
|
448
|
+
# Retrieve it
|
|
449
|
+
qring recall last_rotation
|
|
450
|
+
|
|
451
|
+
# List all memories
|
|
452
|
+
qring recall
|
|
453
|
+
|
|
454
|
+
# Forget
|
|
455
|
+
qring forget last_rotation
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
### Pre-Commit Secret Scanning
|
|
459
|
+
|
|
460
|
+
Install a git pre-commit hook that automatically blocks commits containing hardcoded secrets.
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
# Install the hook
|
|
464
|
+
qring hook:install
|
|
465
|
+
|
|
466
|
+
# Uninstall
|
|
467
|
+
qring hook:uninstall
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
### Secret Analytics
|
|
471
|
+
|
|
472
|
+
Analyze usage patterns and get optimization suggestions for your secrets.
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
qring analyze
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Output includes most accessed secrets, unused/stale secrets, scope optimization suggestions, and rotation recommendations.
|
|
479
|
+
|
|
480
|
+
### Service Setup Wizard
|
|
481
|
+
|
|
482
|
+
Quickly set up a new service integration with secrets, manifest entries, and hooks in one command.
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
# Create secrets for a new Stripe integration
|
|
486
|
+
qring wizard stripe --keys STRIPE_KEY,STRIPE_SECRET --provider stripe --tags payment
|
|
487
|
+
|
|
488
|
+
# With a hook to restart the app on change
|
|
489
|
+
qring wizard myservice --hook-exec "pm2 restart app"
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### Governance Policy
|
|
493
|
+
|
|
494
|
+
Define project-level governance rules in `.q-ring.json` to control which MCP tools can be used, which keys are accessible, and which commands can be executed. Policy is enforced at both the MCP server and keyring level.
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
# View the active policy
|
|
498
|
+
qring policy
|
|
499
|
+
|
|
500
|
+
# JSON output
|
|
501
|
+
qring policy --json
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
Example policy in `.q-ring.json`:
|
|
505
|
+
|
|
506
|
+
```json
|
|
507
|
+
{
|
|
508
|
+
"policy": {
|
|
509
|
+
"mcp": {
|
|
510
|
+
"denyTools": ["delete_secret"],
|
|
511
|
+
"deniedKeys": ["PROD_DB_PASSWORD"],
|
|
512
|
+
"deniedTags": ["production"]
|
|
513
|
+
},
|
|
514
|
+
"exec": {
|
|
515
|
+
"denyCommands": ["curl", "wget", "ssh"],
|
|
516
|
+
"maxRuntimeSeconds": 30
|
|
517
|
+
},
|
|
518
|
+
"secrets": {
|
|
519
|
+
"requireApprovalForTags": ["production"],
|
|
520
|
+
"maxTtlSeconds": 86400
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### Exec Profiles
|
|
527
|
+
|
|
528
|
+
Restrict command execution with named profiles that control allowed commands, network access, timeouts, and environment sanitization.
|
|
529
|
+
|
|
530
|
+
```bash
|
|
531
|
+
# Run with the "restricted" profile (blocks curl, wget, ssh; 30s timeout)
|
|
532
|
+
qring exec --profile restricted -- npm test
|
|
533
|
+
|
|
534
|
+
# Run with the "ci" profile (5min timeout, allows network)
|
|
535
|
+
qring exec --profile ci -- npm run deploy
|
|
536
|
+
|
|
537
|
+
# Default: unrestricted
|
|
538
|
+
qring exec -- echo "hello"
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
**Built-in profiles:** `unrestricted`, `restricted` (no network tools, 30s limit), `ci` (5min limit, blocks destructive commands).
|
|
542
|
+
|
|
543
|
+
### Tamper-Evident Audit
|
|
544
|
+
|
|
545
|
+
Every audit event includes a SHA-256 hash of the previous event, creating a tamper-evident chain. Verify integrity and export logs in multiple formats.
|
|
546
|
+
|
|
547
|
+
```bash
|
|
548
|
+
# Verify the entire audit chain
|
|
549
|
+
qring audit:verify
|
|
550
|
+
|
|
551
|
+
# Export as JSON
|
|
552
|
+
qring audit:export --format json --since 2026-03-01
|
|
553
|
+
|
|
554
|
+
# Export as CSV
|
|
555
|
+
qring audit:export --format csv --output audit-report.csv
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Team & Org Scopes
|
|
559
|
+
|
|
560
|
+
Extend beyond `global` and `project` scopes with `team` and `org` scopes for shared secrets across groups. Resolution order: project → team → org → global (most specific wins).
|
|
561
|
+
|
|
562
|
+
```bash
|
|
563
|
+
# Store a secret in team scope
|
|
564
|
+
qring set SHARED_API_KEY "sk-..." --team my-team
|
|
565
|
+
|
|
566
|
+
# Store in org scope
|
|
567
|
+
qring set ORG_LICENSE "lic-..." --org acme-corp
|
|
568
|
+
|
|
569
|
+
# Resolution cascades: project > team > org > global
|
|
570
|
+
qring get API_KEY --team my-team --org acme-corp
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### Issuer-Native Rotation
|
|
574
|
+
|
|
575
|
+
Attempt provider-native secret rotation (for providers that support it) or fall back to local generation.
|
|
576
|
+
|
|
577
|
+
```bash
|
|
578
|
+
# Rotate via the detected provider
|
|
579
|
+
qring rotate STRIPE_KEY
|
|
580
|
+
|
|
581
|
+
# Force a specific provider
|
|
582
|
+
qring rotate API_KEY --provider openai
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
### CI Secret Validation
|
|
586
|
+
|
|
587
|
+
Batch-validate all secrets against their providers in a CI-friendly mode. Returns a structured pass/fail report with exit code 1 on failure.
|
|
588
|
+
|
|
589
|
+
```bash
|
|
590
|
+
# Validate all secrets (CI mode)
|
|
591
|
+
qring ci:validate
|
|
592
|
+
|
|
593
|
+
# JSON output for pipeline parsing
|
|
594
|
+
qring ci:validate --json
|
|
595
|
+
```
|
|
596
|
+
|
|
173
597
|
### Agent Mode — Autonomous Monitoring
|
|
174
598
|
|
|
175
599
|
A background daemon that continuously monitors secret health, detects anomalies, and optionally auto-rotates expired secrets.
|
|
@@ -204,17 +628,21 @@ qring status --no-open
|
|
|
204
628
|
|
|
205
629
|
## MCP Server
|
|
206
630
|
|
|
207
|
-
q-ring includes a full MCP server with
|
|
631
|
+
q-ring includes a full MCP server with 44 tools for AI agent integration.
|
|
208
632
|
|
|
209
633
|
### Core Tools
|
|
210
634
|
|
|
211
635
|
| Tool | Description |
|
|
212
636
|
|------|-------------|
|
|
213
637
|
| `get_secret` | Retrieve with superposition collapse + observer logging |
|
|
214
|
-
| `list_secrets` | List keys with quantum metadata
|
|
215
|
-
| `set_secret` | Store with optional TTL, env state, tags |
|
|
638
|
+
| `list_secrets` | List keys with quantum metadata, filterable by tag/expiry/pattern |
|
|
639
|
+
| `set_secret` | Store with optional TTL, env state, tags, rotation format |
|
|
216
640
|
| `delete_secret` | Remove a secret |
|
|
217
641
|
| `has_secret` | Boolean check (respects decay) |
|
|
642
|
+
| `export_secrets` | Export as .env/JSON with optional key and tag filters |
|
|
643
|
+
| `import_dotenv` | Parse and import secrets from .env content |
|
|
644
|
+
| `check_project` | Validate project secrets against `.q-ring.json` manifest |
|
|
645
|
+
| `env_generate` | Generate .env content from the project manifest |
|
|
218
646
|
|
|
219
647
|
### Quantum Tools
|
|
220
648
|
|
|
@@ -224,6 +652,7 @@ q-ring includes a full MCP server with 20 tools for AI agent integration.
|
|
|
224
652
|
| `detect_environment` | Wavefunction collapse — detect current env context |
|
|
225
653
|
| `generate_secret` | Quantum noise — generate and optionally save secrets |
|
|
226
654
|
| `entangle_secrets` | Link two secrets for synchronized rotation |
|
|
655
|
+
| `disentangle_secrets` | Remove entanglement between two secrets |
|
|
227
656
|
|
|
228
657
|
### Tunneling Tools
|
|
229
658
|
|
|
@@ -241,15 +670,60 @@ q-ring includes a full MCP server with 20 tools for AI agent integration.
|
|
|
241
670
|
| `teleport_pack` | Encrypt secrets into a portable bundle |
|
|
242
671
|
| `teleport_unpack` | Decrypt and import a bundle |
|
|
243
672
|
|
|
673
|
+
### Validation Tools
|
|
674
|
+
|
|
675
|
+
| Tool | Description |
|
|
676
|
+
|------|-------------|
|
|
677
|
+
| `validate_secret` | Test if a secret is valid with its target service (OpenAI, Stripe, GitHub, etc.) |
|
|
678
|
+
| `list_providers` | List all available validation providers |
|
|
679
|
+
|
|
680
|
+
### Hook Tools
|
|
681
|
+
|
|
682
|
+
| Tool | Description |
|
|
683
|
+
|------|-------------|
|
|
684
|
+
| `register_hook` | Register a shell/HTTP/signal callback on secret changes |
|
|
685
|
+
| `list_hooks` | List all registered hooks with match criteria and status |
|
|
686
|
+
| `remove_hook` | Remove a registered hook by ID |
|
|
687
|
+
|
|
688
|
+
### Execution & Scanning Tools
|
|
689
|
+
|
|
690
|
+
| Tool | Description |
|
|
691
|
+
|------|-------------|
|
|
692
|
+
| `exec_with_secrets` | Run a shell command securely with secrets injected, auto-redacted output, and exec profile enforcement |
|
|
693
|
+
| `scan_codebase_for_secrets` | Scan a directory for hardcoded secrets using regex heuristics and entropy analysis |
|
|
694
|
+
| `lint_files` | Lint specific files for hardcoded secrets with optional auto-fix |
|
|
695
|
+
|
|
696
|
+
### AI Agent Tools
|
|
697
|
+
|
|
698
|
+
| Tool | Description |
|
|
699
|
+
|------|-------------|
|
|
700
|
+
| `get_project_context` | Safe, redacted overview of project secrets, environment, manifest, and activity |
|
|
701
|
+
| `agent_remember` | Store a key-value pair in encrypted agent memory (persists across sessions) |
|
|
702
|
+
| `agent_recall` | Retrieve from agent memory, or list all stored keys |
|
|
703
|
+
| `agent_forget` | Delete a key from agent memory |
|
|
704
|
+
| `analyze_secrets` | Usage analytics: most accessed, stale, unused, and rotation recommendations |
|
|
705
|
+
|
|
244
706
|
### Observer & Health Tools
|
|
245
707
|
|
|
246
708
|
| Tool | Description |
|
|
247
709
|
|------|-------------|
|
|
248
710
|
| `audit_log` | Query access history |
|
|
249
711
|
| `detect_anomalies` | Scan for unusual access patterns |
|
|
712
|
+
| `verify_audit_chain` | Verify tamper-evident hash chain integrity |
|
|
713
|
+
| `export_audit` | Export audit events in jsonl, json, or csv format |
|
|
250
714
|
| `health_check` | Full health report |
|
|
715
|
+
| `status_dashboard` | Launch the quantum status dashboard via MCP |
|
|
251
716
|
| `agent_scan` | Run autonomous agent scan |
|
|
252
717
|
|
|
718
|
+
### Governance & Policy Tools
|
|
719
|
+
|
|
720
|
+
| Tool | Description |
|
|
721
|
+
|------|-------------|
|
|
722
|
+
| `check_policy` | Check if an action (tool use, key read, exec) is allowed by project policy |
|
|
723
|
+
| `get_policy_summary` | Get a summary of the project's governance policy configuration |
|
|
724
|
+
| `rotate_secret` | Attempt issuer-native rotation via detected or specified provider |
|
|
725
|
+
| `ci_validate_secrets` | CI-oriented batch validation of all secrets with structured pass/fail report |
|
|
726
|
+
|
|
253
727
|
### Cursor / Kiro Configuration
|
|
254
728
|
|
|
255
729
|
Add to `.cursor/mcp.json` or `.kiro/mcp.json`:
|
|
@@ -315,14 +789,25 @@ qring CLI ─────┐
|
|
|
315
789
|
├──▶ Core Engine ──▶ @napi-rs/keyring ──▶ OS Keyring
|
|
316
790
|
MCP Server ────┘ │
|
|
317
791
|
├── Envelope (quantum metadata)
|
|
318
|
-
├── Scope Resolver (global / project)
|
|
319
|
-
├── Collapse (env detection)
|
|
320
|
-
├── Observer (audit
|
|
792
|
+
├── Scope Resolver (global / project / team / org)
|
|
793
|
+
├── Collapse (env detection + branchMap globs)
|
|
794
|
+
├── Observer (tamper-evident audit chain)
|
|
795
|
+
├── Policy (governance-as-code engine)
|
|
321
796
|
├── Noise (secret generation)
|
|
322
797
|
├── Entanglement (cross-secret linking)
|
|
798
|
+
├── Validate (provider-based liveness + rotation)
|
|
799
|
+
├── Hooks (shell/HTTP/signal callbacks)
|
|
800
|
+
├── Import (.env file ingestion)
|
|
801
|
+
├── Exec (profile-restricted injection + redaction)
|
|
802
|
+
├── Scan (codebase entropy heuristics)
|
|
803
|
+
├── Provision (JIT ephemeral credentials)
|
|
804
|
+
├── Approval (HMAC-verified zero-trust tokens)
|
|
805
|
+
├── Context (safe redacted project view)
|
|
806
|
+
├── Linter (secret-aware code scanning)
|
|
807
|
+
├── Memory (encrypted agent persistence)
|
|
323
808
|
├── Tunnel (ephemeral in-memory)
|
|
324
809
|
├── Teleport (encrypted sharing)
|
|
325
|
-
├── Agent (autonomous monitor)
|
|
810
|
+
├── Agent (autonomous monitor + rotation)
|
|
326
811
|
└── Dashboard (live status via SSE)
|
|
327
812
|
```
|
|
328
813
|
|
|
@@ -337,11 +822,35 @@ Optional per-project configuration:
|
|
|
337
822
|
"branchMap": {
|
|
338
823
|
"main": "prod",
|
|
339
824
|
"develop": "dev",
|
|
340
|
-
"staging": "staging"
|
|
825
|
+
"staging": "staging",
|
|
826
|
+
"release/*": "staging",
|
|
827
|
+
"feature/*": "dev"
|
|
828
|
+
},
|
|
829
|
+
"secrets": {
|
|
830
|
+
"OPENAI_API_KEY": { "required": true, "description": "OpenAI API key", "format": "api-key", "prefix": "sk-", "provider": "openai" },
|
|
831
|
+
"DATABASE_URL": { "required": true, "description": "Postgres connection string", "validationUrl": "https://api.example.com/health" },
|
|
832
|
+
"SENTRY_DSN": { "required": false, "description": "Sentry error tracking" }
|
|
833
|
+
},
|
|
834
|
+
"policy": {
|
|
835
|
+
"mcp": {
|
|
836
|
+
"denyTools": ["delete_secret"],
|
|
837
|
+
"deniedKeys": ["PROD_DB_PASSWORD"],
|
|
838
|
+
"deniedTags": ["production"]
|
|
839
|
+
},
|
|
840
|
+
"exec": {
|
|
841
|
+
"denyCommands": ["curl", "wget"],
|
|
842
|
+
"maxRuntimeSeconds": 60
|
|
843
|
+
}
|
|
341
844
|
}
|
|
342
845
|
}
|
|
343
846
|
```
|
|
344
847
|
|
|
848
|
+
- **`branchMap`** supports glob patterns with `*` wildcards (e.g., `release/*` matches `release/v1.0`)
|
|
849
|
+
- **`secrets`** declares the project's required secrets — use `qring check` to validate, `qring env:generate` to produce a `.env` file
|
|
850
|
+
- **`provider`** associates a liveness validation provider with a secret (e.g., `"openai"`, `"stripe"`, `"github"`) — use `qring validate` to test
|
|
851
|
+
- **`validationUrl`** configures the generic HTTP provider's endpoint for custom validation
|
|
852
|
+
- **`policy`** defines governance rules for MCP tool gating, key access restrictions, exec allowlists, and secret lifecycle requirements
|
|
853
|
+
|
|
345
854
|
## 📜 License
|
|
346
855
|
|
|
347
856
|
[AGPL-3.0](LICENSE) - Free to use, modify, and share. Any derivative work or hosted service must release its source code under the same license.
|