-
-
Notifications
You must be signed in to change notification settings - Fork 231
fix: Replace usage of eval
to obfuscate binary path from bundlers
#1374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Replace usage of eval
to obfuscate binary path from bundlers
#1374
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 👍 (I'll hold off on merging in case somebody still has concerns about our plans)
I guess if this needs to be released as |
Probably. Is it possible for you to still change the base? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work figuring out a successful obfuscation strategy. @lforst and @Lms24 and I tried like the dickens for like an hour one day and couldn't manage to trick it.
I guess if this needs to be released as 1.x I should have branched off the 1.x branch!
P.S. Does anyone remember why the webpack plugin is stuck on sentry-cli 1.x? @kamilogorek, maybe? In any case, I think it actually needs to be merged into both 1.x and 2.x, right? Because eventually we'll upgrade, and we'll want to have it there.
Node.js support: |
I have "history" with it's predecessor |
eval
to obfuscate binary path from bundlerseval
to obfuscate binary path from bundlers
eval
to obfuscate binary path from bundlerseval
to obfuscate binary path from bundlers
eval
is not ideal because it causes Rollup to display warnings.As per my test repo, it's reasonably easy to obfuscate paths from
@vercel/nft
without usingeval
as the evaluator can only simplify so far.This PR adds a test to check that the binaries are not picked up by
@vercel/nft
.For the purposes of demonstrating the newly added test, the first commit replaces the
eval
usage withpath.resolve()
which will cause the test to fail as the binary is picked up.A subsequent commit will add the mildly obfuscated path generation.