Add debug logging to Slack cookie extraction pipeline#37
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
The cookie extraction has many silent failure paths (file not found, SQL query empty, decryption failed, Keychain denied) that all return empty string with no indication of what went wrong. Add an optional debugLog callback that logs at each decision point.
Pass a debugLog callback when --debug is set so cookie extraction failure details appear in the debug output.
f1c9c0d to
f5f5d66
Compare
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.
Summary
''with no indication of what went wrong. Add an optionaldebugLogcallback toTokenExtractorthat logs at each decision point in the cookie pipeline.auth extract --debugso users can see exactly where cookie extraction fails.Changes
src/platforms/slack/token-extractor.tsdebugLogcallback parameter to constructor.debug()helper that calls the callback when set.extractCookieFromSQLite()andreadCookieFromDB(): file not found, copy failure, no row, plaintext vs encrypted, decryption success/failure.getDerivedKeyAsync().src/platforms/slack/commands/auth.tsdebugLogcallback toTokenExtractorwhen--debugis set.src/platforms/slack/token-extractor.test.tsdebugLogcallback receives messages during extraction.debugLogdoes not throw.Verified
bun test— 264 pass, 0 fail (all Slack tests).bun typecheck— clean.bun lint— clean.Summary by cubic
Add optional debug logging to the Slack cookie extraction pipeline so users can see why extraction fails. The auth extract command now forwards --debug to print step-by-step logs.
Written for commit f5f5d66. Summary will update on new commits.