javascript-obfuscator / javascript-obfuscator/javascript-obfuscator

Chrome Extension Manifest v3 Service Worker

Open
#1,229 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16.3k
Forks
1.7k
Avg merge
28m
Merged PRs (30d)
4

Description

I noticed there is a problem obfuscating the service worker of a manifestv3 chrome extension.
Now the function to run a script is:

const example = "Hello World!"
chrome.scripting.executeScript({
func: (param) => {
console.log(param) // Hello World!
},
args: [example],
target: { tabId: tabId }
})

But probably with the obfuscated code a problem arises because what is inside the func() loses meaning since the rest of the obfuscated code is in the service worker and not in the content of the page.

Does anyone know how to fix this problem?
Thanks in advance!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Manifest V3 Chrome extension case using chrome.scripting.executeScript and its inline func callback. Compare behavior before and after obfuscation, focusing on the service worker and page execution boundary; done means the obfuscated callback still runs with its supplied argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.