Your developer's AI coding tool is a new way into your startup. Here's how to close it

Freelancers and developers bring AI coding agents into your codebase. How to onboard, limit and offboard them, with a one-page AI tools policy.

You hired a freelancer off a marketplace, or a small agency, or your first engineer. They work on their own laptop, with their own AI coding agent, their own plugins, and whatever else they've installed this year. You gave them the GitHub repo, the .env file and probably the Stripe dashboard login. You've never seen that laptop, and you don't know what's running on it. That laptop is now a door into your company. When the contract ends, the door usually stays open, because nobody thinks to close it.

The short answer#

Treat every developer's AI tool as part of their access, and manage access in three moments: what you give them on day one, what their tools may do while they work, and what you take back on the last day. Give out test keys and limited accounts, not live keys and shared passwords. Agree a short list of allowed AI tools. And rotate every key they could see when they leave.

Why it's a new way in#

Before AI agents, a developer's laptop held your code and some keys. Now it also runs software that reads those files, runs commands, installs packages and connects to plugins on its own. That adds doors you don't control:

  • Fake tools aimed at founders and developers. In October, a fake "Apex Accelerator" offered free AI credits through npm packages that stole Claude, Cursor and Windsurf config files and browser sessions.
  • Plugins with too much trust. In the OpenCode agent, connecting to a malicious plugin server could run code on a Windows developer's machine. It was fixed without a public advisory, so nobody's scanner flagged it.
  • Access that never ends. Old GitHub tokens, a Stripe login, a database password in a chat: they keep working after the contract does.

What it means for you: your security is now as good as the least careful laptop that has your keys. You can't control those laptops, but you can control what's on them.

The three moments that decide your risk#

A developer's access in three stages: before day one, their own limited GitHub account, test keys only, a staging database, restricted Stripe keys and an agreed AI tools list; while they work, approved AI tools in a mode that asks before acting, approved plugins only, reviewed pull requests and human review of login and payment changes; on the last day, remove their accounts, rotate every key they saw, revoke tokens and check recent commits
The same three moments apply to freelancers and employees.

Before day one: give less than they ask for#

  • Their own GitHub account, added to your organisation, never a shared login. If they need a token, it should be a fine-grained one, limited to the repositories they work on and with an expiry date. GitHub recommends these over classic tokens, which reach every repository you can access.
  • Test keys, not live ones. Stripe gives every account separate test and live keys. A developer building a checkout flow doesn't need your live key.
  • A staging database with fake data, not production.
  • Restricted keys where live access is truly needed. Stripe's restricted keys let you choose exactly what a key can do.
  • Their own logins to dashboards, so you can remove one person without changing everyone's password.

What it means for you: if their laptop is ever compromised, the attacker gets test keys and a staging database, not your customers.

While they work: agree how their AI tools behave#

You don't need to pick their editor. You do need a few house rules, written down (there's a template below):

  • A short list of allowed AI tools, and no "free credits" tools or plugins from strangers.
  • A mode that asks before acting on anything that touches your code. Cursor's recommended Auto-review mode rather than "Run Everything". Claude Code's default Manual mode rather than Bypass (I go through Claude Code's settings for work separately).
  • Only plugins (MCP servers) you've agreed on.
  • Every change through a pull request, with someone reading changes to login, payments and customer data.

On the last day: close the door#

This is the step most often forgotten, and the one that matters when a contract ends badly:

  1. Remove them from GitHub, your host, your database, Stripe and your chat tool.
  2. Rotate every key they could see. Stripe recommends rotating keys when someone with access leaves. Its rotation keeps the old key working for up to 7 days, so nothing goes down.
  3. Revoke their tokens and any plugin connections they set up under your accounts.
  4. Look over their last few commits and deploys.
  5. Write down what you changed and when.

A one-page AI tools policy you can copy#

Paste this into your contractor agreement, onboarding doc or README, and adjust the tools to your team:

AI coding tools at [Company]

1. Allowed tools: [Claude Code / Cursor / GitHub Copilot]. Ask before using anything else,
   including "free credits" offers and new plugins.
2. Use the tool's default or "ask before acting" mode on our code. No "run everything" or
   bypass modes on a machine that holds any of our keys.
3. Plugins (MCP servers): only the ones on this list: [list]. Ask before adding one.
4. Keys: you get test keys. Never paste a live key into an AI chat, Slack or a commit.
5. Never point an AI tool at the production database.
6. Every change goes through a pull request. Changes to login, payments and customer
   data need a review from [name] before they merge.
7. Keep your AI tools updated at least monthly.
8. When our work together ends, we'll remove your access and rotate the keys you used.

It's short on purpose. A policy nobody reads protects nobody.

The 10-minute self-check#

  • Every developer and contractor has their own accounts; nothing is shared
  • Contractors have test keys and a staging database, not live keys and production
  • GitHub tokens are fine-grained, limited to the repos needed, and expire
  • We have a written list of allowed AI tools and plugins
  • Everyone has been asked which mode their AI tool runs in
  • Changes to login, payments and customer data are reviewed before they ship
  • We have an offboarding list, and we rotated keys the last time someone left
  • I could name everyone who has access to production today

If you can't tick the last one, start there. If you'd like help mapping it, send me who has access to what.

How I work on clients' code#

When I work on a client's product, I ask for exactly the access in the first column above, and I give it back on the last day. It's the same rule I build into products: the tenant and permissions come from the verified login, never from what the caller asks for, as in my MCP server guide. For the bigger picture of what AI agents on a laptop can reach, see is it safe to let AI coding agents into your startup's code. To find keys that already leaked, see the 10-minute API key check.

Fix it yourself vs bring someone in#

You can do this yourself Bring someone in when…
Give each person their own accounts Shared logins are wired into the app and can't simply be changed
Adopt the one-page policy above You need to know what a previous developer can still reach
Offboard one contractor with the checklist Keys need rotating across several services without downtime
Ask everyone which AI tools they use You need a staging environment and test data that don't exist yet

Want help tightening access?#

Send me who has access to what today, and I'll turn it into an onboarding and offboarding checklist and an AI tools policy for your team, covering GitHub, hosting, database, Stripe and AI tools, with what to change first. Email mhuzaifaa.dev@gmail.com or see the projects I've shipped. Before a launch, my SaaS launch checklist covers the rest of production readiness.

FAQ#

Should I let freelancers use AI coding tools on my code?#

Usually yes. Banning them tends to push the use out of sight. Agree which tools are allowed, give freelancers test keys and a staging database rather than live access, and review changes to login, payments and customer data before they ship.

What access should a freelance developer get?#

Their own GitHub account in your organisation, limited to the repositories they need, test API keys, a staging database and their own dashboard logins. Live keys and production access only when the task truly needs them, and as restricted as possible.

What should I do when a developer leaves?#

Remove their accounts from GitHub, hosting, the database, Stripe and chat. Then rotate every key they could see, revoke their tokens and any plugin connections, and check their last commits and deploys. Stripe's key rotation keeps the old key working for up to seven days, so nothing breaks.

Do I need an AI tools policy at a small startup?#

A short one, yes. One page covering allowed tools, the mode they run in, approved plugins, how keys are handled and who reviews risky changes is enough. It sets expectations with contractors and answers the question when a customer or investor asks.

Can a developer's AI tool access my production database?#

Only if the developer's machine can. If the laptop has a production connection string or credentials, an AI agent running there can reach it too. Keep production credentials on the server, and give developers a staging database instead.

Muhammad Huzaifa Abdulahad
Written by

Muhammad Huzaifa Abdulahad

Full-Stack Software & DevOps Engineer

I build SaaS platforms with Node.js, NestJS, TypeScript and PostgreSQL, and run them on Linux, Docker, AWS and CI/CD — from the first line of code to production.

Related articles

See all posts →

Have a complex idea? Let's build it together.

From MVPs to scalable products, let's turn your idea into reliable software built for real-world impact.