Add a credential-leak example to the demo data - #343
Merged
Conversation
The secret scanner (#327) has no fixture that trips it, so the exposed- credentials warning banner, count badge, recommendations entry, and timeline marker are all invisible in the public demo. Add one scenario turn where Rachel pastes a Slack bot token to test a webhook directly (obviously fabricated — sequential digits, never issued — but shaped to match the slack-bot-token rule; joined from parts rather than one literal so it doesn't read as a real token to GitHub's own push-protection secret scanning). That alone isn't enough: the demo builds MaterializeSession records directly and calls store.materializeSessions(), bypassing toMaterializeSessions in src/indexing/pipeline.ts, the only place the inline secret scan runs. Wire the same scan into the demo generator so seeded sessions carry secretFindings like real indexed sessions do. Verified with `bun run scripts/demo.ts --no-serve --seed 42`: one slack_token finding lands on the intended session/interaction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The secret scanner (#327) has no fixture that trips it, so the exposed-credentials warning banner, count badge, recommendations entry, and timeline marker are all invisible in the public demo — there's nothing to demonstrate the feature with.
What
sales-agent-opsproject → "Set up the HubSpot MCP server for the outreach agent"): Rachel pastes a Slack bot token into the terminal to test a webhook directly. The token is fabricated (sequential digits, never issued) but shaped to match theslack-bot-tokenrule, and is joined from string parts rather than written as one literal so it doesn't read as a real token to GitHub's own push-protection secret scanning.scanSessionForSecretsintoMaterializeSessions) intoscripts/demo/generate.ts. The demo buildsMaterializeSessionrecords directly and callsstore.materializeSessions()without going throughtoMaterializeSessions, so without this the scenario text alone would never produce a finding — the scan just never ran on demo data.Testing
bun run scripts/demo.ts --no-serve --seed 42, then queried the seeded store directly:secret_scan_versionstamped.bun test test/secret-scan.test.ts test/demo.test.tsandtsc --noEmitare clean.