Fake recruiter coding tests, install-script malware, look-alike packages and extensions, and bug bounty extortion aimed at developers. Each entry covers what it looks like, why scammers use it, a realistic example, and what to do, with official sources.
Watch the 1-minute overview 0:54
Transcript
Developers get their own scams: fake coding tests, install scripts that run hidden code, look-alike packages, and bug bounty demands.
It often starts with a job offer. Before the call, a recruiter asks you to clone a project and run it as a test.
The warning signs: an unexpected, well-paid offer, a project you must install and run before the call, and a short deadline.
Running the project once is enough. Hidden code copies your cloud tokens, your SSH keys, and your crypto wallets.
Protect yourself: don't run test code on your everyday computer. Read the package file and every script first. And install with scripts turned off, inside a throwaway container or virtual machine.
Learn the warning signs. Practice them on ClassValid.
Red flag
Fake recruiter coding test
A recruiter or hiring manager asks you to clone and run a project on your own computer as a test. The project is malware that steals keys and logins.
What it looks like
An unexpected job offer, often a well-paid remote role, moves quickly to a take-home test or a debugging exercise. You get a repository and are told to install and run it before the call, sometimes with a short deadline. The FBI lists requests to run unknown Node.js or Python packages, scripts or repositories as a pre-employment test as a warning sign.
Why scammers use it
Developers keep valuable things on their machines: cloud and code-hosting tokens, SSH keys, password managers and crypto wallets. Running the project once is enough for hidden code to copy them. A job interview gives a believable reason to run a stranger's code.
Example
"Thanks for your interest in the Senior Full-Stack role. Before our call, clone the repo at git.hirelane.example/acme-trial, run npm install and npm start, and fix the failing login test. You have 45 minutes."
What to do
Do not run test code on your everyday computer or a work laptop.
Read package.json and every script before you install anything.
If code must run, use a throwaway virtual machine or container with no logins or keys in it, or a device the tester provides.
Check the company and recruiter through the company's own careers page, typed in yourself.
A package.json preinstall, install or postinstall script runs automatically during npm install, so malware can run before you open a single file.
What it looks like
The scripts section of package.json has a preinstall, install or postinstall entry that runs a file such as scripts/setup.js, or a long one-line node -e command. The file it runs is often unreadable: one very long line, scrambled names, or text that is decoded and then run.
Why scammers use it
npm runs these lifecycle scripts by itself when you install, with your user's permissions. That gives the code access to your files, environment variables and saved tokens the moment you type npm install. Hiding the code in a scrambled one-liner makes a quick review miss it.
Example
"scripts": { "postinstall": "node scripts/setup.js" } where setup.js is a single 9,000-character line that starts with an encoded string and ends with eval.
What to do
Before installing, run npm pkg get scripts and read every lifecycle script and the files it calls.
Install unknown projects with --ignore-scripts, inside a throwaway container or virtual machine.
Treat scrambled or encoded code in a small project as a reason to stop, not to decode it on your machine.
If it already ran, rotate every token and key on that computer from a different, clean device.
A package named one typo, dash or suffix away from a popular one, often brand new, that installs malware when someone mistypes the name.
What it looks like
A dependency name that is almost right: two letters swapped, a doubled letter, an extra -js or -utils, or a dash where the real one has none. The look-alike usually has a very short history: first published days ago, one or two versions, and a publisher with no other packages.
Why scammers use it
Developers type package names from memory and accept autocomplete suggestions. One typo in an install command or a pull request is enough to pull in the attacker's code, and its install script runs right away.
Example
You meant to add the date library chronodex. The pull request adds chronodex-js instead, first published three days ago, with one version and a postinstall script. The real chronodex has years of releases.
What to do
Copy package names from the project's own documentation or repository, not from memory or a message.
Before adding a dependency, check when it was first published, how many versions it has, and who publishes it.
Ask your package manager to skip very new releases, for example min-release-age in npm.
An editor extension that copies a popular one's name and icon, or that you were told to install, can do anything your editor can do.
What it looks like
An extension with the same name and icon as a well-known one but a different publisher, few installs, no repository link, and no verified publisher mark. Or a recruiter, a README or a chat message tells you to install a specific extension to "run the project".
Why scammers use it
Code editor extensions run with the same permissions as the editor itself. They can read your files, run programs and reach the network. A look-alike gets installed by people searching for the real one.
Example
Searching the extension marketplace for a code formatter shows two results with the same icon. One has a verified publisher and years of updates. The other was published last week by "format-tools-dev" and asks to run a helper program on first start.
What to do
Install extensions from the marketplace's own listing, and compare the publisher, install count, repository and verified mark.
Do not install an extension because a stranger, a test project or a pop-up told you to.
Remove extensions you no longer use, and report a look-alike to the marketplace.
An editor settings file in a repository can start a task the moment the folder opens, if you tell the editor to trust it.
What it looks like
The repository has a .vscode folder with a tasks.json whose task has "runOn": "folderOpen", and the command runs a script or a long shell one-liner. When you open the folder, the editor asks whether you trust the authors, and the instructions say to click Yes.
Why scammers use it
Nobody expects opening a folder to run anything. If you trust the workspace, the task can run before you read a line of code, and it never needs npm install.
Example
README: "Open the folder in your editor and click Trust when asked so the dev server starts automatically." tasks.json: "runOn": "folderOpen", "command": "node .vscode/start.js".
What to do
When an editor asks whether you trust a folder you just downloaded, choose No and review it in Restricted Mode.
Read .vscode/tasks.json, launch settings and any scripts they call before you trust the folder.
Leave automatic tasks turned off, so tasks never start on their own.
A "security researcher" demands payment before sharing a bug, with a deadline and a threat to go public, when you never offered a bounty.
What it looks like
An email says the sender found a serious hole in your site or app. Details come only after you pay a "bounty", usually in crypto or gift cards, often within 48 hours, or they will publish it or sell it. The bug is described vaguely or not at all.
Why scammers use it
A security scare makes small teams and solo developers act fast. There may be no real bug at all, and if there is one, paying does not guarantee it stays private. Real researchers follow your security policy, and expecting payment where no public bounty program exists is not part of coordinated disclosure.
Example
"I found a critical vulnerability in yourshop.example that exposes customer data. Pay a $2,000 bounty in Bitcoin within 48 hours and I will send the details. If not, I publish it on Friday."
What to do
Do not pay or send money first. Real reports give enough detail to check the bug yourself.
Reply only through your own security contact or policy, and ask for steps to reproduce.
Publish a security policy that says how to report bugs and whether you pay bounties.
Keep the messages and report extortion to the FBI at ic3.gov.
Run code you did not write and cannot fully read inside a container or virtual machine that holds none of your keys, logins or files.
What it is
A disposable place to run code: a container started with --rm, a virtual machine you can delete, or a cloud development environment. It gets a copy of the project and nothing else: no SSH keys, no cloud tokens, no browser profile, no wallet.
What scammers exploit without it
Without one, a single npm install or npm start runs with access to everything in your home folder. Malware in test projects is built to search for exactly those keys and tokens.
Example
A take-home test needs npm start to work. You copy the project into a new container with no network access to your work systems and no keys, run it there, and delete the container when you are done.
How to do it
Start a fresh container or virtual machine for each unknown project, with no personal or work credentials inside.
Give it a copy of the project, mounted read-only or copied in, never your home folder.
Delete it when you are done, and never sign in to real accounts from inside it.
npm can install a project's packages without running any preinstall, install or postinstall script, so you can read the code before it runs.
What it is
The ignore-scripts setting. Use it once with npm install --ignore-scripts or npm ci --ignore-scripts, or for every install with the line ignore-scripts=true in your .npmrc file.
What scammers exploit without it
By default npm runs every package's install scripts during npm install. Attackers count on that: their code runs at install time, before you ever start the app or open a file.
Example
A test repository arrives. You run npm install --ignore-scripts, then npm pkg get scripts, and find a postinstall entry that runs a scrambled file. Nothing ran, and you stop there.
How to do it
Use npm install --ignore-scripts for any project you did not write.
Add ignore-scripts=true to your user .npmrc to make it the default.
Some packages need their build scripts; read them, then allow scripts for that one install.
Before adding a dependency, check its exact name, first publish date, versions, publisher and repository, and skip releases that are only days old.
What it is
A two-minute check: npm view shows when a package was first published, its version history and its maintainers. Compare the name and repository with the project's own documentation. In npm, min-release-age in .npmrc skips versions published fewer than that many days ago.
What scammers exploit without it
A brand-new package or release has not been checked by many people yet. CISA recommends waiting at least seven days before installing new releases, because fresh versions may not be fully vetted or may be malicious.
Example
npm view chronodex-js time.created maintainers shows it was first published three days ago by an account with no other packages, while the real chronodex has years of releases. You use chronodex.
How to do it
Run npm view <name> time.created maintainers repository.url and compare with the official project.
Add min-release-age=7 to .npmrc so npm skips versions published in the last 7 days, as CISA recommends.
Turn on your code host's dependency and malware alerts, and review lockfile changes in every pull request.