residoo 0.8.5 → 0.8.6

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 56 high-confidence
100
+ - Scans your local AI-agent session transcripts for 59 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.5",
3
+ "version": "0.8.6",
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
@@ -20,8 +20,17 @@ const PATTERNS = [
20
20
  re: /\bASIA[0-9A-Z]{16}\b/g },
21
21
  { id: "private_key_block", label: "Private key block", confidence: "high",
22
22
  re: /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----/g },
23
+ // Widened twice from the original gh[pousr]_[A-Za-z0-9]{36,255}, both
24
+ // confirmed via GitHub's own docs (docs.github.com, authentication
25
+ // overview): (1) fine-grained PATs use an entirely disjoint literal
26
+ // prefix, github_pat_, not gh[pousr]_ at all -- the original regex
27
+ // could never match one; (2) GitHub's own 2026-04-24 changelog post
28
+ // shows App installation tokens (ghs_) rolling out to a new
29
+ // ghs_<appid>_<3-segment-JWT> shape, whose dots fell outside the old
30
+ // [A-Za-z0-9] body class. The distinctive prefix carries the FP
31
+ // protection, so widening the body to include . _ - is safe.
23
32
  { id: "github_pat", label: "GitHub personal access token", confidence: "high",
24
- re: /\bgh[pousr]_[A-Za-z0-9]{36,255}\b/g },
33
+ re: /\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_.-]{20,600}\b/g },
25
34
  { id: "gitlab_pat", label: "GitLab personal access token", confidence: "high",
26
35
  re: /\bglpat-[A-Za-z0-9_-]{20,100}\b/g },
27
36
  { id: "slack_token", label: "Slack token", confidence: "high",
@@ -163,8 +172,24 @@ const PATTERNS = [
163
172
  // ── Cloud / infra ──────────────────────────────────────────────────────
164
173
  { id: "digitalocean_token", label: "DigitalOcean access token", confidence: "high",
165
174
  re: /\b(?:dop|doo|dor)_v1_[a-f0-9]{64}\b/g },
175
+ // The optional v0_ infix is NOT confirmed by Supabase's own docs -- found
176
+ // via a gitleaks feature request (gitleaks/gitleaks#2225) whose author
177
+ // cites real tokens seen in the wild, and cross-checked that trufflehog's
178
+ // own supabase detector has the identical blind spot for the same
179
+ // reason. Same honesty tier as tailscale_auth_key: shipped despite
180
+ // imperfect vendor documentation because the addition is a narrow,
181
+ // low-risk optional segment, not a guessed body shape.
166
182
  { id: "supabase_token", label: "Supabase personal access token", confidence: "high",
167
- re: /\bsbp_[a-z0-9]{40}\b/g },
183
+ re: /\bsbp_(?:v0_)?[a-z0-9]{40}\b/g },
184
+ // Supabase's newer "secret key" replaces the JWT-based service_role key
185
+ // and, unlike it, bypasses Row Level Security -- full database/storage/
186
+ // auth access. Confirmed via supabase.com/docs/guides/api/api-keys,
187
+ // which names sb_secret_ explicitly ("not JWTs") but does not publish an
188
+ // exact suffix length, hence the generous floor/ceiling bound already
189
+ // used elsewhere in this file (cerebras_key, render_key) for the same
190
+ // situation.
191
+ { id: "supabase_secret_key", label: "Supabase secret API key", confidence: "high",
192
+ re: /\bsb_secret_[A-Za-z0-9_-]{20,200}\b/g },
168
193
  // Confirmed via planetscale.com/docs/api/reference/service-tokens: the
169
194
  // secret half of a service token pair. The id half (12 lowercase
170
195
  // alphanumeric characters, no prefix) is not a rule on its own for the
package/src/rotation.js CHANGED
@@ -517,6 +517,20 @@ const ROTATION_GUIDANCE = {
517
517
  ],
518
518
  revokeNote: "This is the account-level token (sbp_); a project's anon and service_role keys rotate separately in that project's API settings.",
519
519
  },
520
+ // supabase.com/docs/guides/api/api-keys (fetched 2026-09-04): sb_secret_
521
+ // is the newer replacement for the JWT-based service_role key, and
522
+ // bypasses Row Level Security the same way that key did.
523
+ supabase_secret_key: {
524
+ label: "Supabase secret API key",
525
+ consolePath: "supabase.com/dashboard > Project > Project Settings > API Keys",
526
+ steps: [
527
+ "Open the project's API Keys page",
528
+ "Revoke the leaked secret key",
529
+ "Generate a replacement and update whatever used the old one",
530
+ "Review recent database/storage/auth activity for anything unexpected while the key was live",
531
+ ],
532
+ revokeNote: "This key bypasses Row Level Security -- treat a leak as full database access, not a scoped credential.",
533
+ },
520
534
  // Fetched https://planetscale.com/docs/api/reference/service-tokens
521
535
  // (2026-09-03): tokens are managed and revoked from the organization's
522
536
  // Service tokens page in the PlanetScale dashboard.