Attackers embed initial payloads, often heavily obfuscated, within these seemingly benign projects. Those payloads then download second stage malware, typically info stealers designed to exfiltrate credentials or persistent tools that take orders from command and control servers. A Reddit thread documenting this pattern shows just how many examples are already circulating.
The risk goes well beyond someone manually running a bad script. Git hooks execute custom code on repository events like git checkout or git pull. IDEs such as JetBrains and VS Code allow repos to specify custom hooks that run arbitrary code the moment a project opens. Coding agents can be tricked into loading adversarial instructions from files like AGENTS.md, and package managers including NPM, Cargo, and pip feature pre install hooks that can hide deep inside transitive dependencies, making them nearly impossible to spot by eye.
Manual code review used to be the safety net here. That approach is failing. AI can now generate complex, voluminous code, and attackers use that same capability to obfuscate malicious logic well enough to slip past a human reader scanning a large, unfamiliar project.
The proposed fix comes from the same technology causing the problem. Large language models can act as general purpose classifiers, vetting suspicious repositories without needing custom training data or architectural changes. Asking a model something as blunt as “is anything suspicious about this repository” tends to produce an unguided, unbounded task that wastes effort on exploration instead of detection.
A structured workflow performs better. This involves a skill, something like vet-untrusted-project, that instructs an agent to act as an auditor with clear guardrails. The skill points the agent toward known attack paths, including Git and package manager hooks, IDE configurations, and hostile agent instructions, while flagging common red flags like obfuscation patterns, encoded payloads, or externally fetched scripts piped straight to execution tools.
The auditing agent has to operate in read only mode and must never execute scripts or binaries from the repository. Everything inside the repo gets treated as untrusted content, not as instructions to follow. Just as important, the agent is scoped narrowly. It looks for evidence of a hostile repo and nothing more, rather than performing a general security review that wanders into irrelevant territory.
Testing the Detection Safely
Evaluating these classification workflows requires objective measurement of precision and recall, which means real samples to test against. Several open source resources support this:
- Fake interview repository catalogs
- Microsoft’s Contagious Interview samples
- Published analyses of infostealer droppers
- Malicious package lists
- Malware advisories
Avoiding confounds during evaluation matters just as much as having good samples. The auditing agent has to start outside the target repository so it never inherits trust from a hostile configuration. File system paths need to stay neutral, and blocking general internet search keeps the agent from simply learning that a repo is already known to be malicious rather than detecting it independently.
Running these evaluations on malware laden repos demands real isolation. Micro VMs offer lightweight, locked down sandboxes with an independent guest kernel, so a full compromise inside the VM can’t touch the host machine. Docker Sandboxes provide an accessible implementation of this for AI agents, with Docker’s own documentation detailing the security features involved, including a credential proxy that injects credentials without ever exposing tokens to the sandbox, and a shared workspace that stays disabled by default so a compromised sandbox can’t write back to the host.
Tests on frontier reasoning models, including GPT 5.6, show high effectiveness at identifying these malicious patterns. Properly designed workflows, evaluated inside secure isolated environments, offer a genuinely useful line of defense before a developer ever opens an untrusted repository.
Hashlytics Take
There’s a strange loop here worth naming directly. AI made obfuscated malware harder for humans to catch by generating code at a volume and complexity no reviewer can realistically parse, and the fix being proposed is more AI, just pointed in the right direction with tighter guardrails. That’s not a contradiction so much as an admission that manual review was already losing this fight before AI entered the picture. The part that actually matters for developers isn’t the existence of an AI auditor, it’s the discipline built into the workflow: read only access, zero execution, and narrow scope. Skip any of those three and you’ve just built a more convincing way to get compromised.
Follow Hashlytics on Bluesky, Facebook, LinkedIn , Telegram and X to Get Instant Updates



