Repository navigation
chore: remove obfuscated code smuggled into jest.config.js - #375
Merged
github-actions[bot] merged 1 commit intoOct 18, 2026
Merged
github-actions[bot] merged 1 commit into
github-actions[bot] merged 1 commit into
Conversation
Line 40 of jest.config.js carried ~26KB of minified/obfuscated JavaScript appended after the legitimate config object. It contained eval() and a detached child_process.spawn of a -e script, plus outbound fetch calls, and executed every time Jest loaded its configuration. Introduced in e4c92ad. This restores the file to the intended 40-line config; no configuration values change.
|
Hey @OkeyAmy! 👋 It looks like this PR isn't linked to any issue. If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g.,
|
Code Review & Auto-Merge — @dorismaduegbunam 🚀Thank you @OkeyAmy for your contribution!
Verified code changes and repository requirements. Merging pull request. |
This was referenced Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
The exported Jest config in
jest.config.jshad roughly 26 KB of obfuscated code appended to the same line as the closing};. This removes it, leaving the file as configuration again. Nothing else in the tree changed.Why it went
The blob plays no part in Jest configuration. It sits after the exported object, so it runs every time the config file loads — that is, on every
npm test. What it contains:eval(...)over a string assembled at run timespawn(<cmd>, ['-e', <same string>], { detached: true, windowsHide: true }), invoked so a detached child process keeps running outside the test runnew URL(...)and outbound fetches; no literal address survives in the file, the strings are recovered from a hex table while it executesIt arrived in
e4c92ad("test: add quiet hours and alert dedup tests (#304)"), a commit whose message never suggests it touches Jest configuration.Indicators
e4c92adjest.config.jsline 40, one 26,296-character line appended after};eval(DiRknXtYt+,spawn(,windowsHide,!![],new URL(decode loopgrep -rl windowsHidematched only this file; a repo-wide scan for appended high-entropy lines (over 1,500 characters containing0x..,!![],eval() found nothing elseVerification
node -e "require('./jest.config.js')"loads the cleaned config and stops there.Related
Two further files in
mainare committed as Base64 rather than source (src/common/guard/quota.guard.spec.ts,scripts/validate-openapi.ts). They are repaired in a follow-up PR, so this one stays focused on the executable payload.