fix(security): drop <all_urls> host permission (least privilege) - #154
Open
zhongnansu wants to merge 1 commit into
Open
fix(security): drop <all_urls> host permission (least privilege)#154zhongnansu wants to merge 1 commit into
zhongnansu wants to merge 1 commit into
Conversation
Remove <all_urls> from host_permissions. Keep the proxy origin and api.openai.com (the bring-your-own-key path fetches OpenAI directly from the background worker, so removing it would break BYOK). content_scripts matches is unchanged (still <all_urls>) so text selection still works on every page. Narrows the extension's host reach and reduces the Chrome Web Store 'read your data on all websites' warning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
📦 PR Preview — Ask AI ExtensionVersion: PermissionsNo permission changes detected. ✅ Preview ChecklistBefore merging, manually test with the artifact above:
Updated by PR Preview Bot — workflow run |
Contributor
📊 Code Coverage Report
Threshold: 80% ✅ Coverage meets the minimum threshold. Updated by Code Coverage workflow |
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.
Change
Remove
<all_urls>frommanifest.jsonhost_permissions. The array now contains exactly the two origins the extension actually calls:https://dobby-ai-proxy.zhongnansu.workers.dev/*https://api.openai.com/*Why these are kept
api.openai.com— the bring-your-own-key path fetches OpenAI directly from the background service worker, so removing it would break BYOK.content_scripts.matchesis unchanged (still["<all_urls>"]) so text-selection / screenshot triggers keep working on every page. This PR only narrows the extension's host/fetch reach, not where the content script injects.Impact
Least-privilege tightening; reduces the "read your data on all websites" host grant and eases Chrome Web Store review. No behavior change for users.
🤖 Generated with Claude Code