sethserver.com Subscribe
A colorful illustration of a blue and pink robot sitting at a desk typing on a laptop, surrounded by floating icons including code snippets, security shields, padlocks, bugs, brain, gears, and network diagrams against a gradient purple-to-orange background, with two steaming coffee cups on either side of the desk.

Securing Dev‑Facing AI: Code Assistants, MCP Devtools, and CI Bots

By Seth Black • Updated: September 17, 2026

Security · 4 min read

Like this kind of writing? Get one email a week with notes on startups, AI, and the occasional strong opinion about Python: subscribe to the newsletter.

I've watched a company sell "AI automation" that was mostly spreadsheet column mapping and data formatting. The real work lived in another office with a human team and a lot of "please don't look too closely." That experience rewired how I think about dev-facing AI tools.

Not because spreadsheets are evil. The problem is building a system where people believe a tool is safe, then quietly hand it the keys.

Dev tools are the easiest way to leak data. Forget nation-state attacks. I'm talking about normal engineers trying to ship fast.

One person pastes a production config into an AI chat and you're done.

The threat model: "helpful" tools with teeth

The scary part isn't the model. It's the plumbing wrapped around it.

Here are the usual suspects:

If you're building or adopting this stuff, the failure mode is always the same:
someone grants a token that's too powerful, then forgets about it.

Repo and token safety: boring rules that save you

If an AI tool needs a token, treat it like a junior contractor you just met. Friendly, but not trusted. Read-only until proven otherwise.

The principle of least privilege isn’t optional. It's the only thing that works.

Practical rules I like:

A small but real example: if your assistant can open PRs, it should not also be able to merge them. That's how you end up with a bot shipping code because it "looked reasonable."

Local vs cloud assistants: assume prompts leave unless proven otherwise

Self-hosted assistants aren't automatically safe just because they run on your hardware.

The tradeoff:

If you can't avoid SaaS, you need "safe paste" habits engineers will actually use:

Guardrails for MCP devtools: separate the worlds

MCP-style tool servers are where things get spicy. They turn chat into actions.

Separate the worlds:

If your tool can "fix the incident" by deploying, it can also deploy malware. One sloppy token is all it takes. Isolating tools and agents means one prompt can't escalate into a full-system compromise.

Securing CI bots and infra agents: stop handing out org-admin

CI bots start as "just a build bot" and slowly grow into "also deploys, also manages secrets, also has cloud-admin."

Stop doing that.

What actually works:

If you can't answer "what deployed this?" in 30 seconds, you're already in trouble. Once the AI is helping write CI/CD logic, you need even tighter control because the bot isn't just running a script—it’s authoring the script that runs.

Policies engineers will follow (because they're short)

I stopped trusting "AI automation" claims the day I watched a company hide humans behind spreadsheets and hope nobody asked hard questions. Same lesson here: if your security depends on perfect behavior, it will fail. People will route around anything that blocks them from shipping.

Make the rules short:

  1. Where AI can connect (approved tools only).
  2. What it can see (read-only by default).
  3. What never leaves (secrets, prod configs, customer data).
  4. How changes ship (PRs + review + protected branches).

Give people templates. A Slack snippet, not a 40-page policy:

Safe prompt:
"Here's a minimal failing test and the function under test (no secrets). Suggest a fix and a unit test."

Unsafe prompt:
"Here's our prod config and access keys. Why is this failing?"

Security that blocks shipping gets bypassed. Security that fits the workflow gets used.

-Sethers

Share this post
Newsletter

One email, once a week.

Notes on databases, systems, and the occasional strong opinion about Python. No spam, unsubscribe anytime.

Seth Black
Written by

Seth Black

Engineer and founder based in Texas. Writes about databases, AI, and running things in production. Embeds in small teams as lead engineer.

More from Security

View all →
Security

My Password Generators Had 53 Bits of Entropy

Sep 21, 2026
Security

API Key Generator with Prefix, Checksum and SHA-256

Sep 17, 2026
Security

Bcrypt Generator: Hash and Verify Passwords in Your Browser

Sep 17, 2026