Skip to content

feat(security): cross-session blast radius for leaked credentials#324

Merged
graydawnc merged 1 commit into
mainfrom
feat/security-blast-radius
May 26, 2026
Merged

feat(security): cross-session blast radius for leaked credentials#324
graydawnc merged 1 commit into
mainfrom
feat/security-blast-radius

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

What

A high-severity (credential) finding now carries a quiet "Also in N other sessions" line that expands to the per-session list — each row a source dot + session title + project — showing everywhere the same leaked value appears across the whole archive.

Why

Spool already dedupes a value within a session (the ×N badge). The uniquely-Spool insight is cross-session reach: a key that surfaces in 4 other sessions is a far bigger exposure than one confined to where you're looking. The headline is framed around OTHER sessions (the current one is excluded — the in-session ×N badge already covers it), so the line only appears when the secret actually escaped elsewhere.

How it connects

  • occurrencesByValueHash in core groups active findings by session (joining sources so each row renders with the standard source dot used across the sidebar / library / shares).
  • New OccurrenceBySession type; the component reads live and debounce-refetches on onChange, so a purge/dismiss elsewhere shrinks the radius.
  • Rendered only on the credential tier — identity/PII recurring across sessions is expected and not actionable.
  • Boundary honesty preserved: this is about Spool's own surfaces (search / AI / browse); the original ~/.claude session files are never touched.
  • i18n plural keys across all 7 locales.

Test plan

  • Unit (blast-radius.test.ts): per-session aggregation, project/title/uuid/source carried, active-only counting, ordering, empty result.
  • e2e: credential finding shows the radius (1 other session / 1 project), expands to the other session tagged with its source dot; PII shows none.
  • Core security suite green (132 tests); typecheck clean.

🤖 Generated with Claude Code

@graydawnc graydawnc force-pushed the feat/security-rotation-links branch from fd88b46 to d9fe71f Compare May 26, 2026 16:49
@graydawnc graydawnc force-pushed the feat/security-blast-radius branch from ea197f0 to 6f7ecc7 Compare May 26, 2026 16:49
Base automatically changed from feat/security-rotation-links to main May 26, 2026 16:54
@graydawnc graydawnc force-pushed the feat/security-blast-radius branch from 6f7ecc7 to d4c1f2a Compare May 26, 2026 16:56
A leaked credential rarely lives in one session. Spool already collapses
repeated occurrences of a value WITHIN a session into one ×N row; this
extends that view across the whole archive: a credential finding now
shows 'Appears in N sessions across M projects', expandable to the
per-session list. This is uniquely possible because Spool indexes every
session — the user sees the full Spool-surface exposure of one secret in
one place.

- Core: occurrencesByValueHash(db, kind, valueHash) aggregates ACTIVE
  findings sharing a (kind, value_hash) across all sessions/projects,
  with per-session count + project + lastSeen, ordered most-recent.
  Dismissed/purged occurrences are excluded (they no longer leak).
- IPC channel + preload + renderer api adapter + OccurrenceBySession
  type threaded through.
- UI: BlastRadius component on SecurityPage credential finding rows
  (high-severity only — identity/PII recurrence across sessions is
  expected, not actionable). Collapsed quiet line → expandable list,
  DESIGN-compliant (Lucide 14/12px stroke 1.5, sentence case, warm
  tokens). Refetches on findings-changed so a purge elsewhere shrinks
  the radius live.
- i18n across all 7 locales.
- Tests: core blast-radius.test.ts (cross-session/project counts,
  active-only, kind-keyed, ordering); IPC OCCURRENCES_BY_VALUE_HASH
  test; e2e shows the 2-session radius and expands the list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@graydawnc graydawnc force-pushed the feat/security-blast-radius branch from d4c1f2a to 1e309f6 Compare May 26, 2026 17:02
@graydawnc graydawnc added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit 182f2db May 26, 2026
3 checks passed
@graydawnc graydawnc deleted the feat/security-blast-radius branch May 26, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant