-
Notifications
You must be signed in to change notification settings - Fork 319
feat: add GitHub Copilot OAuth provider UI #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Joshf225
wants to merge
5
commits into
spacedriveapp:main
Choose a base branch
from
Joshf225:github-copilot-oauth-integration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
959161d
feat: add GitHub Copilot OAuth device code flow
Joshf225 771c738
feat: add GitHub Copilot OAuth provider UI
Joshf225 47c6f1b
fix: use VS Code Copilot client ID for copilot_internal/v2/token exch…
Joshf225 ca12976
fix(interface): eliminate per-keystroke re-render lag in WebChatPanel
Joshf225 229c96e
style: cargo fmt fixes after rebase onto upstream
Joshf225 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,3 +30,4 @@ docs/phases/ | |
| docs/specs/ | ||
| PROJECT-STATUS.md | ||
| .worktrees/ | ||
| .spacebot-dev/ | ||
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
For react-markdown 10.1.0, what is the recommended secure setup when using rehype-raw, and is rehype-sanitize required to prevent XSS from untrusted markdown?💡 Result:
For react-markdown 10.1.0, the recommended secure posture is:
rehype-raw. React-markdown “typically escapes HTML … because it is dangerous” and is “secure by default” as long as you don’t introduce unsafe plugins / components /urlTransformoverrides. (github.com)rehype-raw:rehype-rawexplicitly warns that improper use can enable XSS and says to either not combine it with user content or userehype-sanitize. (app.unpkg.com)Recommended secure setup when using
rehype-rawUse
rehype-sanitizeafterrehype-raw(and after any other “unsafe” steps), and customize the schema as needed:React-markdown’s own security guidance: “To make sure the content is completely safe, even after what plugins do, use
rehype-sanitize.” (github.com)rehype-sanitizedrops anything not explicitly allowed (defaults to a GitHub-like schema) and recommends sanitizing whenever you don’t completely trust authors/plugins. (github.com)Is
rehype-sanitizerequired to prevent XSS from untrusted markdown?rehype-raw(default behavior): not strictly required for “raw HTML XSS,” because HTML is escaped/ignored by default; the main risk becomes what you add (plugins/components/URL handling). (github.com)rehype-rawwith untrusted markdown: you should treatrehype-sanitize(or equivalent sanitization) as required to prevent XSS. (app.unpkg.com)Citations:
🏁 Script executed:
Repository: spacedriveapp/spacebot
Length of output: 932
🏁 Script executed:
Repository: spacedriveapp/spacebot
Length of output: 127
🏁 Script executed:
Repository: spacedriveapp/spacebot
Length of output: 93
🏁 Script executed:
Repository: spacedriveapp/spacebot
Length of output: 133
🏁 Script executed:
Repository: spacedriveapp/spacebot
Length of output: 1241
🏁 Script executed:
cat interface/package.json | grep -A 2 -B 2 react-markdownRepository: spacedriveapp/spacebot
Length of output: 204
🏁 Script executed:
Repository: spacedriveapp/spacebot
Length of output: 2559
🏁 Script executed:
Repository: spacedriveapp/spacebot
Length of output: 2987
Add
rehype-sanitizeto prevent XSS from untrusted markdown sources.Line 9 enables
rehypeRawwithout sanitization. The Markdown component processes untrusted external content (e.g.,release.bodyfrom GitHub API in Settings.tsx) and AI-generated output (e.g.,item.conclusion,item.resultin ChannelDetail.tsx). Without sanitization, malicious HTML in these sources can execute arbitrary scripts. Addrehype-sanitizeafterrehypeRawto safely parse raw HTML while blocking dangerous elements.Fix
🤖 Prompt for AI Agents