Harden extension: disable runtime extractor execution and keep signature-only scanning#511
Harden extension: disable runtime extractor execution and keep signature-only scanning#511pich4ya wants to merge 1 commit intoRetireJS:masterfrom
Conversation
|
What do you base that it’s unnecessary on? Have you checked which extractors hit most often? I’m also curious about what risk you are trying to mitigate? All the code is in this repo including the repositories? If you can’t trust the repositories, can you trust the code in the extension itself? The code runs in the sandbox to keep it away from user data, cookies etc. If you want this merged I’d prefer you make it a build option, and let the users pick their risk appetite |
Thanks for the feedback. You are right that my wording was too strong. I should say extractors.func is not strictly required for baseline detection, not that it is universally unnecessary. My risk model is specifically about mutable remote data driving executable behavior. The extension code is reviewed/released, but the repo is fetched at runtime from master and can change independently. If that update channel is compromised, extractors.func can influence executed logic. The sandbox reduces impact, but it still keeps a data-to-code path. On coverage: I checked the current repository/jsrepository-v5.json.
So I expect reduced accuracy in some cases, not a full detection break. I have not measured real-world hit frequency yet. |
|
The need for different extractors is based on different scenarios where one may work better than the others (code minification, packaging etc.) If you create a pull request where it takes this as a build argument if you want it completely gone, or make it a UI toggle, I'm happy to merge that. |
Summary
This PR hardens the Chrome extension by removing runtime execution paths used for version extraction while keeping remote signature updates intact.
Security rationale
The extension currently downloads an updateable repository and historically supported runtime extractor function execution (
extractors.func) in sandboxed flows. Even when sandboxed, this creates a remote-control execution surface that is unnecessary for signature-based detection.This PR changes behavior to signature-only scanning:
jsrepository-v5.jsonextractors.funcbefore useBehavior impact
func-based extraction pathThis is intended to reduce attack surface for users who want remote signature updates without any remote-influenced runtime code execution in the browser extension.
Changes
chrome/extension/js/background.jsextractors.funcadvisories) and flat repository formatschrome/extension/background.htmlNotes
This is a defense-in-depth hardening change; no new dependencies were added.