Skip to content

Conversation

@RinZ27
Copy link
Contributor

@RinZ27 RinZ27 commented Jan 8, 2026

The sample.favicon-cs currently uses <all_urls> for its content script matches.

Injecting scripts into every page visited by the user is an over-privileged practice that increases the extension's attack surface unnecessarily. Restricting matches to a specific domain (e.g., https://www.google.com/*) demonstrates the Principle of Least Privilege while still effectively showing how the Favicon API works in content scripts.

Copy link
Member

@oliverdunk oliverdunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @RinZ27, there is a README associated with this sample which still contains information about this working across all domains. Can you update that?

@RinZ27
Copy link
Contributor Author

RinZ27 commented Jan 8, 2026

Updated the README to match the new host permissions. It now correctly points to Google pages instead of claiming to work everywhere.

@oliverdunk oliverdunk merged commit 99ba96e into GoogleChrome:main Jan 8, 2026
2 checks passed
@RinZ27 RinZ27 deleted the security/harden-favicon-sample-permissions branch January 9, 2026 12:54
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.

2 participants