Skip to content

docs: justify host_permissions <all_urls> scope for Store review - #92

Merged
knytcomics-ui merged 1 commit into
Gryd-lock:mainfrom
Ndifreke000:issue-5-permissions-justification
Jul 22, 2026
Merged

docs: justify host_permissions <all_urls> scope for Store review#92
knytcomics-ui merged 1 commit into
Gryd-lock:mainfrom
Ndifreke000:issue-5-permissions-justification

Conversation

@Ndifreke000

@Ndifreke000 Ndifreke000 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds docs/permissions.md with a written justification for the current <all_urls> host permission + document_start MAIN-world content-script scope, per the "documented allowlist rationale if broad access is unavoidable" path in the issue.
  • Explains why activeTab + optional_host_permissions was considered and deferred: its grant only exists after the user invokes the extension, but signing calls frequently fire during normal page load — before there's any reason for the user to click the icon — so it reintroduces the exact timing gap <all_urls> + document_start exists to close, and its opt-in prompt would leave first-visit/unfamiliar dApps (the actual threat model) unprotected.
  • Links to it from README.md's Security section.

This PR deliberately does not attempt the activeTab/optional-permissions rewrite itself — that's a real interception-timing behavior change that the issue's own Definition of Done says needs manual verification against a live Freighter install, existing test updates, and CI passing, none of which this pass covers. Left as follow-up work if the team decides to pursue the narrower scope instead of the documented-justification path.

Closes #5

Adds docs/permissions.md explaining why the current <all_urls> +
document_start MAIN-world injection scope is required: the set of
sites embedding Stellar wallet-signing calls isn't knowable in advance
(any dApp/DEX/marketplace can), and interception must happen before
user interaction, which activeTab's grant-on-invocation model can't
provide - a signing call frequently fires as part of normal page load,
before the user has any reason to click the extension icon.

Documents activeTab + optional_host_permissions ("enable on this
site") as the alternative considered, and why it's deferred rather
than adopted now (reintroduces the same timing gap, and its opt-in
prompt would leave exactly the unfamiliar/risky first-visit sites
unprotected - the core value proposition). Also notes the mitigations
already in place (CSP scoped to 'self', no tabs/webRequest/scripting
permissions, MAIN-world injection limited to the two files that need
it).

This intentionally does not attempt the activeTab/optional-permissions
rewrite itself: that's a real behavior change to interception timing
that needs manual verification against a live Freighter install before
shipping, per the issue's own Definition of Done, and is left for
separate follow-up work.

Closes Gryd-lock#5

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@knytcomics-ui
knytcomics-ui merged commit be3ecc5 into Gryd-lock:main Jul 22, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scope host_permissions down from <all_urls> for Chrome Web Store review readiness

2 participants