residoo 0.8.4 → 0.8.5

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 CHANGED
@@ -97,7 +97,7 @@ while losing rows, then fixed in public against the classes it was losing
97
97
 
98
98
  ## What it does
99
99
 
100
- - Scans your local AI-agent session transcripts for 53 high-confidence
100
+ - Scans your local AI-agent session transcripts for 56 high-confidence
101
101
  secret patterns: cloud provider keys, private key blocks, OAuth/API
102
102
  tokens, database connection strings, and more. See
103
103
  [`src/patterns.js`](src/patterns.js).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "residoo",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "Find secrets leaking through your AI coding agent's session history. Zero network calls in the scan path, zero dependencies.",
5
5
  "license": "MIT",
6
6
  "author": "CloudRoam (https://cloudroam.io)",
package/src/patterns.js CHANGED
@@ -58,6 +58,34 @@ const PATTERNS = [
58
58
  // unlike a short/generic prefix where that same generosity would matter.
59
59
  { id: "stripe_webhook_secret", label: "Stripe webhook signing secret", confidence: "high",
60
60
  re: /\bwhsec_[A-Za-z0-9]{24,64}\b/g },
61
+ // Azure AD (Entra ID) client secret. Found missing by cross-checking
62
+ // gitleaks' own open-issue tracker (gitleaks/gitleaks#1687), which
63
+ // asked for Azure coverage generally -- gitleaks itself already has a
64
+ // rule (id "azure-ad-client-secret" in its own gitleaks.toml), so this
65
+ // is adapted directly from that battle-tested pattern rather than
66
+ // designed from scratch: 2-4 chars, one digit, the literal "Q~"
67
+ // marker, then 28-36 more chars. No capture group (unlike gitleaks'
68
+ // Go regex), to match every other rule in this file using the whole
69
+ // match as the value; zero-width lookaround used instead of gitleaks'
70
+ // literal delimiter character classes for the same reason -- the
71
+ // charset includes non-word characters (~ .) that a plain \b boundary
72
+ // can't reliably bound. Azure Storage Account keys were investigated
73
+ // and NOT added: they're a bare, unprefixed base64 blob (~88 chars,
74
+ // confirmed via learn.microsoft.com), the same unsafe generic shape
75
+ // already excluded for Weights & Biases' classic key format.
76
+ { id: "azure_ad_client_secret", label: "Azure AD (Entra ID) client secret", confidence: "high",
77
+ re: /(?<![A-Za-z0-9_.~-])[A-Za-z0-9_.~]{2,4}\dQ~[A-Za-z0-9_.~-]{28,36}(?![A-Za-z0-9_.~-])/g },
78
+ // Tailscale auth key. Found missing via gitleaks/gitleaks#1778 (still
79
+ // open there too). No fully authoritative current spec found: Tailscale's
80
+ // own kb/1085/auth-keys page shows an older bare "tskey-<hex>" example,
81
+ // while more recent third-party usage consistently shows a newer
82
+ // "tskey-auth-<id>-<secret>" two-segment form -- genuine format
83
+ // evolution, not a single confirmed shape. Covers both on the strength
84
+ // of the "tskey-" prefix alone, which carries negligible false-positive
85
+ // risk regardless of which era's exact body shape is present, same
86
+ // reasoning as whsec_ above.
87
+ { id: "tailscale_auth_key", label: "Tailscale auth key", confidence: "high",
88
+ re: /\btskey-(?:auth-)?[A-Za-z0-9-]{15,80}\b/g },
61
89
  // The negative lookahead keeps this rule mutually exclusive with anthropic_key
62
90
  // and openrouter_key below — without it, "sk-ant-..." or "sk-or-v1-..." match
63
91
  // BOTH this pattern and the more specific one, and get reported twice under
@@ -284,6 +312,25 @@ const PATTERNS = [
284
312
  // than a doc-confirmed exact count.
285
313
  { id: "posthog_key", label: "PostHog personal API key", confidence: "high",
286
314
  re: /\bphx_[A-Za-z0-9]{40,}\b/g },
315
+ // Claude Code Remote Control session URL -- not a vendor API key, a URL
316
+ // that IS a bearer credential: opening it in a browser grants full
317
+ // read/write/execute access to a live local Claude Code session, no
318
+ // further auth. Anthropic's own docs (code.claude.com/docs/en/remote-control,
319
+ // fetched 2026-09-04) confirm this URL is printed directly into the
320
+ // conversation ("Claude Code also posts the session URL in the
321
+ // conversation") -- i.e. this genuinely lands in the exact transcripts
322
+ // this project scans, not a hypothetical risk. Found via a gitleaks
323
+ // open-issue request (gitleaks/gitleaks#2094) that proposed a
324
+ // `session_<id>` prefix as "illustrative," unconfirmed. That guess was
325
+ // checked against this project's own installed `claude` binary (macOS,
326
+ // `strings /usr/local/bin/claude`) rather than assumed correct: the
327
+ // literal web-URL template is `` `/code/${sessionId}` `` with NO prefix
328
+ // at all, and `sessionId:mqH.randomUUID()` confirms the ID is a
329
+ // standard UUID v4 -- both directly present in the shipped binary's own
330
+ // strings, not inferred. The gitleaks issue's proposed pattern would
331
+ // have MISSED every real instance of this URL.
332
+ { id: "claude_code_remote_control_url", label: "Claude Code Remote Control session URL", confidence: "high",
333
+ re: /\bclaude\.ai\/code\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/g },
287
334
  // LangSmith personal access token (lsv2_pt_) / service key (lsv2_sk_).
288
335
  // Found missing by cross-checking agentsweep's own open-issue tracker.
289
336
  // The first segment (32 hex, UUID-shaped) is consistent across every
package/src/rotation.js CHANGED
@@ -216,6 +216,32 @@ const ROTATION_GUIDANCE = {
216
216
  ],
217
217
  revokeNote: "A leaked webhook secret alone can't drain funds or read data -- it only lets an attacker forge fake Stripe-Signature headers to a webhook endpoint that trusts them, so this is a spoofing/logic-bypass risk, not an account-access one. Still worth rolling promptly: it's what stands between a webhook handler and forged events.",
218
218
  },
219
+ // Fetched learn.microsoft.com (2026-09-04), Azure App Registration
220
+ // secret management docs: steps below are the documented
221
+ // create-update-verify-delete rotation flow, not guessed.
222
+ azure_ad_client_secret: {
223
+ label: "Azure AD (Entra ID) client secret",
224
+ consolePath: "Microsoft Entra ID > App registrations > [app] > Certificates & secrets",
225
+ steps: [
226
+ "Create a new client secret on the same app registration first (New client secret)",
227
+ "Update whatever used the old one with the new value, and verify it works",
228
+ "Only then delete the leaked secret (trash icon next to it), to minimize downtime",
229
+ ],
230
+ revokeNote: "Deletion is immediate. Prefer create-then-delete over delete-then-create if the app can tolerate two live secrets briefly -- it avoids an outage window for whatever depends on this secret.",
231
+ },
232
+ // Fetched tailscale.com/kb/1085/auth-keys (2026-09-04): exact console
233
+ // path and the important revoke-vs-deauthorize distinction are quoted
234
+ // from that page, not inferred.
235
+ tailscale_auth_key: {
236
+ label: "Tailscale auth key",
237
+ consolePath: "console.tailscale.com/admin/settings/keys",
238
+ steps: [
239
+ "Open the Keys page of the admin console",
240
+ "Find the key in the table and select Revoke",
241
+ "If a node already used this key to join your tailnet, also delete that node from the Machines page -- revoking the key alone does not deauthorize nodes already using it",
242
+ ],
243
+ revokeNote: "Revoking is immediate for future use of the key, but any node it already authorized stays connected until separately removed from Machines -- the two are not the same action.",
244
+ },
219
245
  // help.openai.com articles 5112595 and 8304786 exist (surfaced by search)
220
246
  // but the help center serves HTTP 403 to this project's fetcher, so no URL
221
247
  // is shipped: unverifiable end to end fails the bar above.
@@ -785,6 +811,21 @@ const ROTATION_GUIDANCE = {
785
811
  ],
786
812
  revokeNote: "Deletion is immediate; the key stops authenticating on the next request.",
787
813
  },
814
+ // Not a vendor API key with a console to rotate it in -- a session URL
815
+ // that IS the credential. Steps below per code.claude.com/docs/en/
816
+ // remote-control (fetched 2026-09-04): disconnect terminates the URL's
817
+ // access immediately; there is no separate "revoke" step to perform
818
+ // afterward the way there is for a leaked API key.
819
+ claude_code_remote_control_url: {
820
+ label: "Claude Code Remote Control session URL",
821
+ consolePath: "the terminal running the session, or claude.ai/code's session list",
822
+ steps: [
823
+ "In the terminal running the session, run /remote-control again to disconnect (or use the status panel's disconnect option)",
824
+ "If you no longer have terminal access, end the local session entirely -- Remote Control access ends with it",
825
+ "Start a fresh Remote Control session if you still need one; it gets a new, unrelated URL",
826
+ ],
827
+ revokeNote: "Disconnecting invalidates the URL immediately -- your local session keeps running in the terminal either way, only the remote-access link is torn down. There is no separate token to also revoke at a vendor console.",
828
+ },
788
829
  // Fetched docs.langchain.com/langsmith/create-account-api-key
789
830
  // (2026-09-04): both personal access tokens and service keys are
790
831
  // created and managed from the workspace's own API Keys settings page.