Skip to content

Prompt users before granting WebExtension permissions #36

Description

@culpen90

Why

QuartzWebExtensionSupport currently grants requested install-time permissions and requested match patterns automatically. The delegate methods for later permission prompts also grant everything. That makes extension testing convenient, but it is not a good long-term privacy/security posture for a browser.

Where to start

  • Sources/Quartz/QuartzWebExtensionSupport.swift
  • grantInstallTimePermissions(to:)
  • webExtensionController(_:promptForPermissions:in:for:completionHandler:)
  • webExtensionController(_:promptForPermissionMatchPatterns:in:for:completionHandler:)

Suggested approach

Add native permission prompts that explain what an extension is asking for before granting access. A first pass can use NSAlert with Allow/Cancel and plain-language permission summaries. Longer term, Quartz can persist choices, but this issue can start with install-time and runtime prompts that avoid unconditional grants.

Acceptance criteria

  • Quartz no longer silently grants all requested WebExtension permissions.
  • Users see a native prompt for requested permissions and match patterns.
  • Denying a prompt denies the requested permissions through WebKit's completion handler.
  • The prompt copy is understandable to non-developers.
  • Existing extension install and action flows still work when permissions are allowed.
  • swift build succeeds.

Testing

  • Install an extension that requests broad host permissions.
  • Confirm Quartz shows a permission prompt.
  • Confirm Allow lets the extension continue.
  • Confirm Cancel/deny does not grant the requested permissions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions