Repository navigation
fix: support console clipboard copy fallback and unredacted auth tokens by default - #41
Merged
Merged
Conversation
… default
- Add fallback using document.execCommand('copy') when navigator.clipboard or window.isSecureContext is unavailable (e.g. over plain HTTP on LAN)
- Route copyStateJson and copyTableCsv through copyToClipboard with user toast feedback
- Remove authorization headers and Bearer regex pattern from default redaction policy to allow inspecting and copying authorization tokens by default during debugging
- Update documentation in SECURITY_AND_REDACTION.md and THREAT_MODEL.md
- Update unit tests across SDK modules and add regression tests for clipboard copy fallback
Fixes #40
Both list surfaces rendered only the captured path, so two calls to the same endpoint -- /orders?status=open and /orders?status=all -- were two identical rows and had to be opened one by one to be told apart. The query was captured and redacted all along; it just never reached the row. - Add NetworkUrl.queryString (the redacted `a=1&b=2` form display already built inline) and emit it as "query" beside "path" in the network list summary JSON, mirrored byte-for-byte in the evidence snapshot - Web: rowHtml gains an optional mainSub, and Network rows pass the query into it -- dimmed after the path, with a title carrying both in full, so the endpoint stays the part that survives the row's ellipsis - Device: pathWithQuery() reads the query back off the transaction url and titles the traffic row with it; traffic search matches the query, and the two url.ifBlank fallbacks no longer drop it path itself stays bare everywhere: mock-rule prefill escapes it into a regex, and the path= filter and path facets group on the endpoint alone. InspectorTransactionUi deliberately gains no field for the same reason -- widening that data class would break its constructor and copy signatures for every compiled caller, and url already carries the query. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPxRnPJNgsb3y455VCrDGU
maksudur03
approved these changes
Sep 6, 2026
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
Fixes #40
This PR addresses two issues reported in #40:
navigator.clipboardrequires a secure context (window.isSecureContext— HTTPS or localhost). When accessing the DevConsole dashboard over LAN HTTP (e.g.,http://192.168.x.x:8080), callingnavigator.clipboard.writeTextthrew an error and toasted "Clipboard access was denied.".RedactionPolicy.buildDefault()includedauthorization,proxy-authorization,www-authenticate, andauthenticationinsensitiveFieldNamesas well as a regex pattern forBearer <token>intextPatterns. This caused Authorization headers and tokens to be masked with<redacted>by default, preventing developers from inspecting and copying authorization tokens during debugging.Key Changes
dashboard.js):document.execCommand('copy')fallback incopyToClipboard()whennavigator.clipboardorwindow.isSecureContextis unavailable.copyStateJson()andcopyTableCsv()to usecopyToClipboard().RedactionEngine.kt):Bearerpattern from default redaction policy so authorization headers are visible and copyable by default.docs/SECURITY_AND_REDACTION.mdanddocs/THREAT_MODEL.mdto reflect the updated default policy.copyToClipboard provides document execCommand copy fallback for insecure contextsinDashboardAssetsTest.kt../gradlew test,./gradlew detekt ktlintCheck, and./gradlew check.