Developer builds LLM-based workflow to detect malware in repos before opening them
A software developer revealed that a fake recruiter sent them a malicious take-home project in May, disguised as a legitimate Next.js Web3 assignment, which contained a hidden postinstall script designed to deploy an infostealer. The developer noted that such attacks typically hide payloads in lifecycle scripts, config files, and utility functions rather than main source code, making them easy to miss during a routine clone-and-install workflow. In response, they built a triage process that uses a locally-run LLM — specifically Ollama with qwen2.5-coder on WSL2 — to statically analyze unknown repositories without executing any code. The workflow involves downloading repos as tarballs into a quarantine folder, running shell-based checks for suspicious lifecycle scripts and lockfile mismatches, and then passing flagged files through the model for deeper analysis. The developer also built a dedicated scanning tool called Argus Lens that incorporates these checks, with lockfile-versus-package.json discrepancies identified as one of its highest-signal detection methods.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in