ASAbubakar Sohail
All notes
Portfolio/Notes/Engineering

Engineering

Security Best Practices for Your Development Environment

Your development environment is where your code, secrets, tools, and AI workflows all meet. Here are practical, developer-friendly security habits to keep your local setup safe without killing your productivity.

By Abubakar Sohail20 May 20265 min read
  • security
  • development
  • devsecops
  • vscode
  • github
  • ai tools
  • secure coding
  • developer productivity

Your Development Environment Is Not “Just Your Laptop”

As developers, we usually think of security as something that happens on servers, cloud infrastructure, production databases, firewalls, authentication systems, and CI/CD pipelines. But one of the most sensitive places in the entire software lifecycle is actually much closer to us: our own development environment.

Your laptop or local machine is where everything comes together. It has source code, Git access, SSH keys, API tokens, environment variables, database credentials, browser sessions, package managers, extensions, AI coding tools, terminals, and sometimes even production access. In simple words, your development setup is not just a place where you write code. It is a doorway into your company’s systems.

That is why securing your development environment matters. A weak local setup can expose private repositories, leak secrets, compromise production systems, or give attackers a clean path into a larger organization.

The Modern Developer Workflow Has Changed

A few years ago, a developer mostly used an editor, a terminal, Git, a browser, and maybe a database client. Today, our workflow is much more powerful, but also much more risky.

We now use AI coding assistants, VS Code extensions, browser plugins, MCP servers, automation scripts, CLI tools, Docker images, package managers, GitHub apps, cloud dashboards, and third-party integrations. These tools make us faster, but every new tool also becomes a possible attack surface.

This is especially important in the age of AI-assisted development and “vibe coding.” It is very easy to install a random extension, run a copied terminal command, paste an error into an AI tool, or connect a plugin to your GitHub account without thinking deeply about permissions.

The goal is not to become paranoid. The goal is to become professionally careful.

1. Be Careful With Extensions and Plugins

VS Code extensions, browser extensions, and IDE plugins can be incredibly useful, but they can also be dangerous because they run very close to your code. Some of them can read files, inspect your workspace, interact with your terminal, or access tokens stored locally.

Before installing any extension, check who published it, how many people are using it, when it was last updated, what permissions it needs, and whether it is open source. A random extension with a cool icon and 200 installs should not get the same trust as a well-maintained extension from a verified publisher.

A good rule is simple: if the tool sits inside your editor, treat it like someone standing next to you while you code.

2. Never Commit Secrets

This one sounds obvious, but it still happens all the time. API keys, database URLs, private tokens, JWT secrets, AWS keys, Stripe keys, SMTP passwords, and OAuth credentials should never be committed to Git.

Use environment variables, secret managers, and local .env files. Also make sure your .env file is listed in .gitignore. Before every commit, quickly scan what you are pushing. That extra 10 seconds can save hours of damage control later.

For better safety, use tools like GitHub secret scanning, pre-commit hooks, or local scanners that detect secrets before code is pushed.

3. Do Not Run Random Commands Blindly

Developers love copying commands from Stack Overflow, GitHub issues, documentation, blogs, and now AI tools. Most of the time, that is fine. But sometimes, a single command can install malicious packages, delete files, expose tokens, or change system permissions.

Before running a command, read it once. If it has curl piped into bash, asks for sudo, changes permissions recursively, or downloads something from an unknown URL, slow down.

A funny but useful mindset is: never let your terminal do something you would not understand in a code review.

4. Keep Your Dependencies Under Control

Modern applications depend on hundreds or even thousands of packages. One small package can bring in many other dependencies behind the scenes. This creates a supply-chain risk, where the problem may not be in your code but in the code you imported.

Use lock files like package-lock.json, yarn.lock, Gemfile.lock, or poetry.lock. Review major dependency upgrades carefully. Avoid installing packages just because they solve one tiny problem. Sometimes writing 10 lines of your own code is safer than adding a dependency maintained by nobody.

Also run dependency audits regularly using tools like npm audit, bundle audit, GitHub Dependabot, or other security scanners.

5. Separate Personal and Work Environments

Mixing personal projects, client projects, company repositories, experiments, random tools, and AI workflows on the same machine can become messy and risky.

Try to separate work and personal environments as much as possible. Use different browser profiles, different GitHub accounts where needed, separate SSH keys, and isolated project folders. For risky experiments, use containers, virtual machines, or temporary environments.

This makes damage control much easier. If something goes wrong in a sandbox, it should not immediately affect your actual work environment.

6. Use Least Privilege Everywhere

Every token, key, user account, GitHub app, and cloud role should only have the access it actually needs. If a tool only needs read access, do not give it write access. If a developer only needs staging access, do not give production access. If an API key only needs one service, do not give it admin permissions.

Least privilege is one of the simplest security ideas, but it is also one of the most powerful. It limits the damage when something is leaked, compromised, or misused.

Think of permissions like giving house keys. Not everyone needs the master key to the whole building.

7. Protect Your GitHub Account Properly

Your GitHub account is often connected to source code, CI/CD pipelines, deployment workflows, secrets, packages, and production systems. Losing access to it can be serious.

Enable two-factor authentication. Prefer passkeys, authenticator apps, or hardware security keys instead of SMS where possible. Review authorized OAuth apps and GitHub Apps regularly. Remove anything you no longer use.

Also rotate old personal access tokens and avoid creating tokens with broad permissions. A token named “temporary-test-token” from two years ago is exactly the kind of thing that comes back to haunt you.

8. Be Smart With AI Coding Tools

AI tools are now part of the developer workflow, and honestly, they can be amazing. They help debug issues, explain unfamiliar code, generate tests, review logic, and speed up repetitive tasks. But they also need boundaries.

Do not paste production secrets, private keys, customer data, internal credentials, or sensitive business logic into random AI tools. Be careful when giving an AI tool access to your entire repository, Jira board, Slack messages, database schema, or cloud environment.

AI should be treated like a powerful junior developer with a lot of speed but no natural sense of security. It can help you move faster, but you still need to review what it suggests.

9. Secure Your Local Machine

Basic local security still matters. Keep your operating system updated. Use disk encryption. Lock your screen. Use a password manager. Avoid reusing passwords. Keep your browser updated. Do not install cracked software or random developer tools from unknown sources.

Also be careful with public Wi-Fi. If you are working from a cafe, airport, or shared network, use a trusted VPN and avoid accessing sensitive systems unless necessary.

Security is not always about advanced hacking. Sometimes the easiest attack is an unlocked laptop and an open terminal.

10. Clean Up What You No Longer Use

Old tools, old tokens, old branches, old Docker containers, old SSH keys, old test databases, and old credentials are easy to forget. But attackers love forgotten things because nobody is watching them.

Every few weeks, clean up your development environment. Remove unused extensions, revoke old tokens, delete temporary keys, clear unused Docker images, and review access permissions.

A clean environment is easier to secure, easier to debug, and honestly, better for your mental health too.

A Simple Developer Security Checklist

Here is a quick checklist you can follow:

  • Use 2FA on GitHub and important developer accounts.
  • Never commit .env files or secrets.
  • Review extensions before installing them.
  • Do not run unknown terminal commands blindly.
  • Use separate SSH keys for personal and work projects.
  • Keep dependencies updated and audited.
  • Use least-privilege tokens and permissions.
  • Be careful when giving AI tools access to private code.
  • Rotate old credentials regularly.
  • Clean up unused tools, apps, and integrations.

Final Thoughts

Security in a development environment is not about slowing developers down. It is about helping developers move fast without accidentally opening dangerous doors.

The more tools we use, the more responsibility we have. AI coding assistants, automation tools, plugins, and extensions are not bad. In fact, they are becoming a normal part of modern engineering. But we need to verify what we install, understand what we connect, and control what we expose.

A good developer writes code that works. A mature developer also understands the environment where that code is written, tested, shipped, and secured.

So before installing the next shiny extension or connecting another AI tool to your workflow, ask one simple question:

“Do I trust this tool enough to let it sit next to my code, secrets, and credentials?”

If the answer is not clear, pause. That pause might save you from a very expensive mistake.

Filed from the engineering desk

Written by Abubakar Sohail, Senior Software Engineer in Glasgow.

More notes