Developers spend a lot of time making sure their code is secure. They check dependencies, fix vulnerabilities, review pull requests, and try to catch anything that could put their applications at risk.
But there is one security problem that a perfectly written application can't fix: a developer being tricked into running something they shouldn't.
Consider a developer who receives a message from a recruiter offering an exciting job opportunity. The conversation goes well, the company sounds genuine, and the recruiter shares a GitHub repository containing a small coding assessment. It looks like a typical hiring process, so the developer clones the repository and runs the setup command.
But a few minutes later, that innocent-looking coding test could be doing something very different from what its README file said it would do. Suddenly, the job opportunity is the least of the developer's problems.
This is how social engineering works. Instead of breaking into a system by exploiting a software vulnerability, attackers manipulate people into giving them access or performing actions that compromise security. For developers, the consequences can extend beyond a stolen password to private repositories, API keys, cloud accounts, and even company infrastructure.
In this article, we'll explore how social engineering attacks target developers, why fake recruiters and online identities are becoming useful tools for attackers, how to recognise suspicious requests, and what practical steps developers can take to protect their accounts and development environments.
What We'll Cover:
- What Is Social Engineering and Why Are Developers Targeted?
- Why Developers Are Particularly Attractive Targets
- Five Social Engineering Attacks Developers Should Know About
- How to Verify Whether Someone Online Is Actually Who They Claim to Be
- Practical Ways You Can Protect Yourself
- What Should You Do If You Think You've Been Targeted?
- Quick Security Checklist Every Developer Should Follow
- Final Thoughts
What Is Social Engineering and Why Are Developers Targeted?
At its core, social engineering is psychological manipulation. Instead of spending weeks trying to crack a password or find a zero-day exploit, an attacker targets the person sitting behind the keyboard. They rely on basic instincts that we all share: curiosity, helpfulness, fear of making a mistake, and the urge to act fast when something sounds urgent.
There's real cognitive science behind why this works so well. Behavioral psychologists often describe human decision-making as a balance between two modes: a fast, automatic system that reacts on impulse, and a slower, analytical system that checks the facts.
When an attacker creates panic or excitement, they trigger a stress response in your brain that pushes you into that fast, reactive mode. Your analytical brain takes a back seat and you act before you think.
Consider a simple example. Suppose you receive an email claiming your GitHub account has been flagged for suspicious activity and will be suspended in an hour. Instead of hacking GitHub's servers, the attacker just builds a convincing fake login page. If they can get you worried enough to click the link and type in your password, they don't need to break into your account, you just handed them the keys.
Why Developers Are Particularly Attractive Targets
This isn't just a theoretical risk. According to the Verizon Data Breach Investigations Report, the human element (including social engineering, phishing, and credential abuse) was involved in 62% of data breaches. Most security incidents don't start with a Hollywood-style hack. They start with a person being tricked.
Developers are especially high-value targets because of what our accounts can touch. Depending on your role and the company you work for, your machine or accounts might have access to:
- Private repositories and proprietary source code
- GitHub, GitLab, or Bitbucket accounts
- API keys, access tokens, and local .env files
- Cloud infrastructure and production deployment environments
- CI/CD pipelines and package publishing permissions (like npm or PyPI)
- Internal wikis, issue trackers, and company chat tools
Not every developer has access to all of these, of course. A junior dev or a student won't have the same keys as a senior DevOps engineer. Still, even a single compromised developer account can act as a bridge into connected systems, making you a very appealing entry point for an attacker.
Five Social Engineering Attacks Developers Should Know About
Rather than memorizing cybersecurity definitions, it's much more useful to look at the actual situations where these attacks show up in your day to day life.
1. Fake Recruiters and Malicious Coding Assessments
Job hunting is stressful and attackers know that developers looking for work are eager to make a good impression. In this setup, someone reaches out on LinkedIn, via email, or using a messaging app claiming to represent a tech company or a well-funded startup. After a brief chat, they send you a repository for a technical test and ask you to clone it and run it locally.
The trap is usually hidden inside the project's setup. It might be a malicious postinstall script inpackage.json, a trojanized dependency, or a compiled binary disguised as a helper tool. The moment you run npm install or the start script, the payload executes on your machine.
Here are some warning signs to watch for:
- The recruiter pushes you to run an unfamiliar script or executable right away.
- The repository has almost no commit history, strange-looking dependencies, or obfuscated code.
- The test asks for unnecessary permissions or access to your personal accounts.
- They pressure you with a tight, artificial deadline so you don't have time to inspect the files.
- You can't independently verify the recruiter's identity or the company's job listing.
Luckily, there are a few things you can do to defend yourself. First, never run untrusted code directly on your main development machine. Before you execute anything, read the package.json scripts, check the dependencies, and scan the setup commands. If you do need to test an unfamiliar repo, open it inside an isolated virtual machine or a disposable container.
For example, when you open a project's package.json file, pay attention to the scripts section. You might find something like this:
{ "scripts": { "start": "vite", "build": "vite build", "test": "vitest", "postinstall": "node scripts/setup.js" } } These scripts define the commands that run during different stages of the project. While start, build, and test are common in JavaScript projects, postinstall deserves a closer look because it runs automatically after dependencies are installed.
This doesn't automatically make it suspicious, but you should open the referenced setup.js file and understand what it does before proceeding. Also, remember that dependencies can have their own installation scripts, so checking your project's package.json is only the first step.
2. Fake Freelance Clients and Project Invitations
If you take on freelance work through platforms, LinkedIn, or developer communities, you're likely to run into a variation of this tactic.
A "client" reaches out with an unusually well-paying project that sounds like a great fit. Before you even agree on a scope or sign a contract, they send over a ZIP archive, a repository link, or a "project requirements" document and ask you to review it or install a specific tool to view their mockups.
Sometimes they go a step further and ask for access to your GitHub account or cloud environment just to "get things set up quickly."
Here are the warning signs to watch for:
- They dodge basic questions about the project scope but keep insisting you download their files.
- They ask for passwords, API tokens, or broad repository permissions before a contract exists.
- Their business name, website, or identity is vague and hard to verify.
- They use urgency ("we need to launch this week") to rush you past your normal vetting process.
To defend yourself, make sure you keep early discussions and file transfers on trusted freelance platforms where accounts are vetted. Never share personal credentials, and if a legitimate client needs repository access later, give them the bare minimum permissions required for the job.
3. Impersonation of Maintainers, Teammates, and Managers
Humans are wired to defer to authority and help people we recognize, a psychological quirk known as authority bias. Attackers exploit this by pretending to be people you already trust. They might pose as an open-source maintainer asking you to test an urgent patch, a teammate asking to be added to a private repo, or a manager messaging you about a production outage that needs an API key right now.
With public profiles and AI tools, it's surprisingly easy for an attacker to copy a colleague's profile photo, mimic their writing style, and clone their email signature.
Here are some warning signs to watch for:
- An email address or username that's off by a single character (like rn instead of m).
- A request that falls completely outside that person's usual role.
- Unexpected requests for credentials, tokens, or elevated access.
- Pressure to skip regular approval workflows or pull request reviews.
To defend yourself, whenever someone asks for sensitive access or credentials, verify the request through a separate, trusted channel. If your "manager" asks for a deployment key on Slack or email, call them on a known number or check in via an established company channel before doing anything.
4. Phishing Links Disguised as Repository and Package Notifications
Developers live in a constant stream of notifications: pull requests, CI/CD build failures, security alerts from npm or PyPI, and cloud billing notices hit our inboxes all day long. Attackers blend right in by sending fake alerts that look identical to the real ones.
You might get an email saying a critical vulnerability was found in one of your packages or that a teammate mentioned you in a pull request. Clicking the link takes you to a lookalike login page or worse, a legitimate-looking OAuth screen asking you to authorize a malicious third-party app that will silently gain access to your repositories.
Here are some warning signs to watch for:
- An unexpected prompt to log in when you're usually already signed in.
- Misspelled, hyphenated, or slightly unfamiliar domain names.
- Requests to authorize a third-party app with broad read/write permissions.
- Emails that create artificial panic about account suspension or broken builds.
To defend yourself, don't click links in unexpected notification emails. Instead, open your browser, go to GitHub, npm or your cloud provider directly using a bookmark or by typing the URL yourself and check your notifications there.
For example, imagine a third-party application asking to connect to your GitHub account. It might request permissions such as:
repo: Grants access to private repositories, including the ability to make changes.workflow: Allows the application to update GitHub Actions workflow files.read:user: Allows it to read basic information from your GitHub profile.
If an application only needs to display your public profile but requests access to private repositories and workflow files, something doesn't add up. These permissions go far beyond what the application actually needs.
Before approving an OAuth request, check whether the requested permissions match the application's purpose. If you can't understand why it needs a particular permission, don't approve it. You can also review and revoke previously authorized applications from your GitHub account settings.
5. Fake Online Profiles That Build Trust Over Time
Not every social engineering attack happens in a single rushed email. Some attackers play the long game. They build polished LinkedIn or GitHub profiles, join developer Discord servers, comment thoughtfully on your posts, and chat with you about code over weeks or months.
Psychologically, this takes advantage of familiarity and reciprocity, when someone is friendly and engages with your work, your guard naturally drops. Once that rapport is built, they casually drop a link to a "cool side project" they want you to test or send over a file for feedback.
Warning signs to watch for:
- A profile claiming years of senior experience but showing almost no meaningful code, commits, or real-world interactions.
- Work history that doesn't line up when you check the companies they claim to work for.
- A quick push to move the conversation off a public platform and into private DMs.
- Repeated attempts to get you to download files or grant access to your accounts.
To defend yourself, treat familiarity as a nice gesture, not as proof of identity. Even if you've chatted with someone online for a few weeks, still verify their background and inspect anything they ask you to run.
How to Verify Whether Someone Online Is Actually Who They Claim to Be
Because so much of software development happens remotely, we regularly collaborate with people we've never met in person.
The most important rule to remember here is simple: a polished profile is not proof of a real identity. Before you trust someone with code, access or sensitive info, run through three quick checks.
Check Their Profile History and Connections
Take two minutes to look past the surface of their profile. Look at how old the account is and whether their activity looks consistent over time. Do their GitHub contributions, repositories, and past roles actually make sense together? Do their connections look like real peers in the industry?
Keep in mind that a brand-new account isn't automatically a scammer and an old account isn't automatically safe. Accounts get bought and hijacked all the time, so look for the overall picture.
Confirm Their Identity Through a Second Channel
If a request feels even slightly off, step outside the conversation where it started. If a project maintainer messages you on Discord asking for something unusual, reach out to them via their verified GitHub profile or official project email. If a coworker sends a strange email, ping them on your company's internal chat or give them a quick call. Never use the contact details provided inside the suspicious message itself.
For example, suppose someone contacts you on LinkedIn claiming to be a recruiter from Microsoft and sends you a coding assessment. Before downloading anything, visit Microsoft's official careers website and check whether the position exists. You can also look for the recruiter's profile through the company's official employee directory or contact the company through an independently verified email address.
The same approach works when dealing with GitHub maintainers or potential clients. If someone claims to represent an open-source project, check the project's official website or repository to see whether their account is listed as a maintainer. If a client claims to work for a particular company, verify that connection through an independent source rather than relying entirely on the information they provide.
Check Whether Their Profile Photo Appears Elsewhere
Another quick check is to see if the person's profile picture actually belongs to them. You can use traditional reverse image search tools like Google Lens to find identical or visually similar copies of a photograph across websites. You can also try a facial recognition-based catfish reverse image search to investigate whether the same person's face appears across different online profiles, even when they use different photographs.
One example of this approach is Face2social, which uses facial recognition to search for potential matches across supported social media platforms. Unlike traditional reverse image search, which looks for identical or visually similar copies of an image, facial recognition-based search can identify potential matches even when someone uses different photographs across their profiles.
Just keep one nuance in mind: finding the same photo attached to multiple unrelated names is a strong red flag, but finding no matches doesn't prove the person is real. Facial recognition tools can also produce inaccurate matches or miss relevant profiles. Think of a catfish reverse image search and facial recognition results as helpful clues during an investigation, not standalone proof of someone's identity. Always cross-check suspicious profiles through other reliable sources before trusting someone online.
Practical Ways You Can Protect Yourself
Spotting individual scams is great, but the real goal is building everyday habits that protect you even when you're tired or distracted.
Treat Unfamiliar Code Like an Untrusted File
Get into the habit of reading before you run. Inspect package.json scripts, Makefiles, and installation commands before typing them into your terminal. Check unfamiliar dependencies to see who maintains them and whether they look legitimate.
When you do need to test untrusted code, use a virtual machine or a container and avoid running things with sudo or admin privileges. Just remember that while containers add a helpful layer of isolation, they aren't a bulletproof security boundary, so stay cautious even inside one.
Protect Your Credentials and Development Accounts
Use a password manager so every development account has a unique, strong password. Turn on multifactor authentication (MFA) everywhere and whenever possible, choose phishing-resistant MFA like hardware security keys or passkeys rather than SMS codes, as recommended in CISA's guidance on recognizing and reporting phishing. Keep API keys and secrets out of your source code, never paste them into chat or issue comments and periodically review your active sessions and authorized third-party apps.
Slow Down When Someone Creates Urgency
Urgency is an attacker's favorite tool because it short-circuits your critical thinking. Whenever a message makes you feel rushed, panicked, or pressured to skip a step, force yourself to pause. Take a breath, verify the request and stick to your regular approval processes even if the message looks like it came from your boss.
Keep Your Development Environment Updated
Keep your operating system, browser, IDE, and CLI tools up to date so known bugs can't be chained with a social engineering lure. Turn on automated dependency alerts and secret scanning in your repositories. Following GitHub's best practices for securing code in your supply chain can help you identify vulnerable dependencies and exposed secrets before they become bigger security problems.
What Should You Do If You Think You've Been Targeted?
Even careful developers slip up sometimes. If you realize you just clicked a bad link or ran a suspicious script, don't panic. Just act methodically.
Stop and Don't Interact Further
Cut off contact with the suspicious account immediately. Don't click any more links, open attachments, or run any further commands. Resist the urge to delete the messages or files right away, though. If your company's security team needs to investigate what happened, those artifacts will be valuable.
Secure Your Accounts and Development Environment
Your next steps depend on what was exposed. If you typed your password into a fake login page, change that password immediately from a separate, trusted device and revoke any active sessions or suspicious OAuth apps.
If API keys or personal access tokens were exposed, revoke and rotate them right away (as simply changing your account password won't invalidate a leaked token).
If you actually executed malicious code, disconnect that machine from the internet if possible, alert your security team and check your repositories and cloud accounts for unauthorized commits or deployments.
Report the Incident
Let the right people know as soon as possible. Report the incident to your company's IT or security team, flag the fake account through the platform's abuse channel (like LinkedIn, GitHub or Discord), or notify the relevant open-source maintainers if it affects a community project.
Speaking up early is nothing to be embarrassed about. It's often what stops a small mistake from turning into a major breach.
Quick Security Checklist Every Developer Should Follow
You don't need to become a cybersecurity expert to avoid most social engineering traps. Start with these basic habits and make them part of your everyday development routine:
- Verify recruiters, clients, maintainers, and teammates before trusting unusual requests.
- Inspect unfamiliar repositories, scripts, and dependencies before running their code.
- Avoid clicking unexpected login links in emails or chat messages. Navigate to the site directly.
- Use unique passwords and phishing-resistant MFA on all development accounts.
- Never share API keys, passwords, or access tokens over chat, email, or issue trackers.
- Regularly review your repository permissions and authorized third-party OAuth apps.
- Use isolated environments like virtual machines or containers to test unfamiliar projects.
- Report suspicious messages and unexpected account activity right away.
Final Thoughts
We put a huge amount of effort into securing our applications, locking down our repositories, and hardening our infrastructure. That work matters and it keeps automated attacks at bay. But at the end of the day, attackers know that the people who build and maintain those systems are often the easiest way in.
Staying safe as a developer doesn't mean that you need to be paranoid. You just need to be deliberate. When you treat unexpected requests with the same healthy skepticism you bring to a messy pull request, you close off one of the biggest security gaps in modern software development.


