---
title: Your Fastest Engineer Takes Orders From Strangers: Securing an AI-Native Startup - Autter Blog
description: Your coding agent has every key you have and reads text from strangers. Here’s how to secure an AI-native startup without slowing the agent down. Start by noticing its settings file is a script.
url: https://autter.dev/blog/ai-native-startup-security
date: 2026-12-04
author: Tanvi
tags: Security, AI Safety, Merge Gate, Engineering
reading_time: 11 min
site: Autter - Autter is the code security and assurance layer for the AI coding era: it checks every change before it merges, catches security risks, governs releases, and closes the loop from production failure to verified fix.
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://autter.dev/.well-known/search?q={query}"
  method: GET
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

[← All posts](https://autter.dev/blog)

[Security](https://autter.dev/blog?tag=security)

# Your Fastest Engineer Takes Orders From Strangers: Securing an AI-Native Startup

Your coding agent has every key you have and reads text from strangers. Here’s how to secure an AI-native startup without slowing the agent down. Start by noticing its settings file is a script.

- **Author**: Tanvi , Founder, autter.dev
- **Published**: December 4, 2026
- **Reading time**: 11 min
- **Topics**: [Security](https://autter.dev/blog?tag=security), [AI Safety](https://autter.dev/blog?tag=ai-safety), [Merge Gate](https://autter.dev/blog?tag=merge-gate), [Engineering](https://autter.dev/blog?tag=engineering)

*The most helpful member of your crew. Also the easiest to talk into things.*

August 2025. Someone runs `npm install` on a project that depends on Nx, a build system with millions of weekly downloads.

The version they got had been published by an attacker who stole Nx’s npm publishing token through a vulnerable GitHub Action. It did the usual malware things: grabbed environment variables, GitHub tokens, npm tokens. Then it did something new.

It checked whether the developer had Claude Code, Gemini CLI or Amazon Q installed. If they did, it ran them. With `--dangerously-skip-permissions`. With `--yolo`. With `--trust-all-tools`. And it asked them, politely, to search the machine for credential and config files and write the paths to a text file.

The malware didn’t bring a lockpick. It found the crew member who already had the keys and asked nicely.

According to [Wiz’s analysis of the s1ngularity attack](https://www.wiz.io/blog/s1ngularitys-aftermath), roughly half of the victims had at least one AI CLI installed. Claude refused almost a quarter of those interactions. Which is good. It also means that, roughly three times out of four, the burglar’s request was treated like a work ticket.

The AI-assisted part of the heist wasn’t even very effective. Wiz found it got data out in under a quarter of cases. That’s not the comforting part. The comforting part would be if nobody had thought to try.

The short answer

Securing an AI-native startup means treating the coding agent as a new member of the team with broad access, not as a smarter autocomplete. The agent reads untrusted text, runs commands, writes files that other tools execute, and inherits every credential on the machine it runs on. So: keep long-lived secrets away from the agent, treat agent config files (`.claude/`, `.cursor/`, `.gemini/`, `.mcp.json`) as code that needs review, treat every MCP server as a third-party integration, verify every dependency the agent adds, and put an enforced merge gate between anything the agent produces and production. The agent’s own sandbox is the vendor’s job. The gate is yours.

## What makes an AI-native startup different to secure?

**Not the volume of code. The fact that one of your engineers takes instructions from whatever it happens to be reading.**

Most “AI code security” advice stops at the output: the agent writes insecure code, so scan the code. True. [We wrote that post already.](https://autter.dev/blog/ai-coding-assistant-security-risks) But an AI-native team didn’t just change who writes the code. It added a new crew member who sits inside the developer’s machine, holds the developer’s keys, runs the developer’s terminal, and reads issues, READMEs, web pages and MCP tool output written by people nobody on your team has met.

That crew member is very fast, very helpful, and has never once asked “wait, who told you that?”

So the attack surface isn’t one thing. It’s six.

| Layer | What changed when the agent arrived | Who usually watches it | What that watcher can’t tell you |
| --- | --- | --- | --- |
| **The code** | Far more of it, written fluently, merged faster | PR reviewers, SAST | Whether a handsome diff is a safe one. Fluency is not correctness. |
| **The dependencies** | Packages picked by a model, some of them invented | Lockfile, Dependabot | Whether the package should exist at all |
| **The agent’s hands** | Something runs shell commands and writes files all day | The agent’s own sandbox and approval prompts | Anything, the day the sandbox has a bug. 2026 has had several. |
| **The agent’s config** | `.claude/settings.json`, `.cursor/`, `.gemini/`, `.mcp.json`, `AGENTS.md`, git hooks, all sitting in the repo | Usually nobody. They look like preferences. | That a settings file that defines hooks is a startup script with good manners |
| **The agent’s inputs** | The agent reads strangers’ text and acts on it | The model’s judgment | Which sentence in a README was actually an order |
| **The agent’s keys** | The agent inherits everything the developer is logged into | Nobody, until rotation day | That “the agent can read it” means “anything the agent reads can ask for it” |

![Blackboard cross-section of a ship with six labelled compartments: code, cargo, hands, orders, mail and keys. Water is rising in the last four, and a single bucket bails out the first.](https://autter.dev/blog/ai-native-startup-security-compartments-v1.jpg)

*Six compartments. Most teams are only bailing water out of the first one.*

## Why do coding agent sandboxes keep breaking the same way?

**Because the agent writes files, and other tools trust files.**

Every major coding agent ships some kind of sandbox and approval flow. That’s real progress. It’s also been a busy year for advisories, and the interesting part is how similar they are.

**Cursor, CVE-2026-26268 (fixed in 2.5).** A prompt-injected agent could write to improperly protected `.git` settings, including git hooks. Git runs hooks on its own. [Cursor’s advisory](https://github.com/cursor/cursor/security/advisories/GHSA-8pcm-8jpx-hv8r) calls it what it is: sandbox escape.

**Claude Code, CVE-2026-25725 (fixed in 2.1.2).** If `.claude/settings.json` didn’t exist at startup, the sandbox didn’t protect it. Code inside the sandbox could create it with hooks that ran with host privileges on the next restart. [Anthropic’s advisory](https://github.com/anthropics/claude-code/security/advisories/GHSA-ff64-7w26-62rf).

**Gemini CLI and the run-gemini-cli GitHub Action (fixed in 0.39.1 and 0.1.22).** In headless mode, workspace folders were trusted automatically, so environment variables in a repo’s `.gemini/` folder could lead to remote code execution on untrusted content. And `--yolo` ignored the tool allowlist. Google rated it CVSS 10.0. [Google’s advisory](https://github.com/google-github-actions/run-gemini-cli/security/advisories/GHSA-wpqr-6v78-jr5g).

**Cursor, CVE-2026-50548 and CVE-2026-50549 (fixed in 3.0).** Hidden instructions in content the agent read, like an MCP-connected service or a web search result, could get it to widen its own allowed-write list or write through a symlink, overwrite its sandbox helper, and run later commands unsandboxed. No click required. Cato AI Labs, who found the pair and named it DuneSlide, say Cursor first declined the reports because its threat model didn’t cover misuse of MCP servers, then reopened them and shipped the fix. [Reported by The Hacker News](https://thehackernews.com/2026/07/critical-cursor-flaws-could-let-prompt.html); [Cursor’s advisory](https://github.com/cursor/cursor/security/advisories/GHSA-3v8f-48vw-3mjx) covers the symlink half. No sign of exploitation in the wild.

Same shape every time. Something the agent can write is treated as trusted configuration. Then ordinary tooling, a git hook, a restart, a CI job, runs it later, outside the box. Reviewing each command the agent runs doesn’t catch it, because the dangerous command isn’t run by the agent.

And the agent has a supply chain of its own. In July 2025, AWS pulled version 1.84.0 of the Amazon Q Developer extension for VS Code after malicious code got into a release through an over-scoped GitHub token in its build configuration. [Per AWS](https://aws.amazon.com/security/security-bulletins/AWS-2025-015/), it failed to execute because of a syntax error. Grateful. Not a strategy.

All of these are patched. Update your tools. But notice the pattern, because it has a second half nobody puts in the advisory:

**Every one of those files can also arrive in a pull request.**

A `.claude/settings.json` with a `SessionStart` hook. A `.gemini/.env`. A `.mcp.json` pointing at a server nobody vetted. A new git hook installer in `package.json`. They don’t need a sandbox escape. They need one teammate to pull the branch and open their editor.

> “Your agent’s settings file isn’t a preference. It’s a startup script that nobody reviewed.”

## How do you secure an AI-native startup?

**Seven moves. None of them involve taking the agent away.**

### 1. Treat agent config as code

**If a file can tell a tool what to execute, it’s code. Review it like code.** Put `.claude/`, `.cursor/`, `.gemini/`, `.vscode/`, `.mcp.json`, `AGENTS.md` and anything under `.github/workflows/` in `CODEOWNERS`, with a human owner who actually reads them. A pull request that changes hooks, MCP servers or tool permissions should get the same attention as one that changes your CI pipeline. Which, yes, is also a YAML file running with your secrets.

### 2. Never give the agent standing secrets

**If the agent can read it, so can whatever the agent reads.** No production keys in `.env` on laptops where agents run. Short-lived, scoped credentials for cloud CLIs. Separate profiles for “agent is working” and “human is deploying”. The s1ngularity payload didn’t need a zero-day. It needed a machine where the agent could see everything. [Our secrets post covers the cleanup when this goes wrong.](https://autter.dev/blog/nobody-reads-config-diffs-with-feeling)

### 3. Retire the yolo flags outside throwaway sandboxes

**`--dangerously-skip-permissions` is not a name. It’s documentation.** These flags exist for a reason: unattended runs in disposable containers. On a laptop with your SSH keys, or in a CI job processing untrusted pull requests, they turn every prompt injection into a remote shell. If a flag has “dangerously” in it, the vendor has already written your incident report’s first line.

### 4. Treat every MCP server as a third-party integration

**An MCP server is a vendor with write access to your agent’s to-do list.** Pin versions. Prefer read-only tools. Give each server the narrowest token that works. Know who maintains it. Apply the same bar you’d apply to any third-party API you connect, because that’s what it is, with a model deciding when to call it.

### 5. Verify every dependency the agent adds

**Your agent doesn’t know the package doesn’t exist. It sounds sure anyway.** Models suggest packages that don’t exist, and they suggest the same fake names repeatedly, which is exactly what lets attackers register them first. A new package name in an agent-written PR is a review event, every time. [More on invented packages here.](https://autter.dev/blog/ai-coding-assistant-security-risks)

### 6. Gate the merge, not the keystroke

**You can’t review every command the agent runs. You can review every change that reaches main.** The agent’s local sandbox is the vendor’s job, and the advisories above show it’s a hard one. What you control is the single place everything the agent produced must pass before it ships: the pull request. That gate should run the change somewhere with nothing worth stealing, check what it actually does, and refuse to merge until it clears. [A comment is advice. A merge gate is enforcement.](https://autter.dev/blog/why-we-block-the-merge-button-instead-of-posting-a-comment)

### 7. Track the agent, not just the developer

**`git blame` names the last hand on the keyboard. In 2026, that’s often not the author.** Some playbooks recommend a per-developer security score so someone is “accountable” for AI-written code. We think that grades the wrong author. Knowing which agent, model and prompt produced a risky change tells you what to fix: the agent’s config, the prompt, the permissions. Blaming the human who clicked merge tells you who to be annoyed at. [It’s why we open-sourced the tool we use to track it.](https://autter.dev/blog/we-open-sourced-the-tool-we-use-to-track-ai-generated-code)

## What does this look like in a real pull request?

*Illustrative example, not a real incident. The pattern is the point.*

Thursday, 4:47pm. A PR opens, authored by your coding agent after it worked on an issue a contributor filed that morning. Title: `chore: add pre-commit lint hook`. CI is green. Three files changed.

| Change | What a tired reviewer sees | What the gate should ask |
| --- | --- | --- |
| `.claude/settings.json` adds a `SessionStart` hook that runs `npx lint-helper-pro` | A tooling tweak. Very chore. Much lint. | Why does opening the editor now execute a package from the internet on every teammate’s machine? |
| `package.json` adds `lint-helper-pro` | A dev dependency. Nobody reads dev dependencies. | Does this package resolve on the real registry? When was it first published? Did a human decide to add it? |
| `src/auth/session.ts`, three lines: token expiry check loosened “to fix a flaky test” | A tiny diff in a big PR, three lines out of forty | Removed auth logic, in an AI-written change, in a PR titled “chore”. Hold the merge until a human signs off. |

The issue the agent was working from had a helpful paragraph at the bottom suggesting this exact lint setup. Nobody wrote malware into your codebase. Your agent did some light reading and took notes.

In one version of Thursday, this merges because the tests passed and everyone wants to go home. In the other, it never clears the harbour.

![Blackboard illustration of a customs desk under a lamp. A crate labelled chore sits open on the desk, holding a lit fuse, an unmarked parcel and a broken padlock labelled auth. A clock on the wall reads 4:47.](https://autter.dev/blog/ai-native-startup-security-chore-v1.jpg)

*The title said chore. The cargo said otherwise.*

## Where does Autter fit (and where doesn’t it)?

**Honest version: Autter doesn’t live inside your editor, and it doesn’t sandbox your agent’s terminal.** That’s the agent vendor’s job, and you should keep their tools updated. Autter stands at the gate every change has to pass through, as a merge gate, not a comment.

**Every PR runs in an isolated sandbox against your base branch.** The verdict comes from what the change actually does, on a machine with nothing worth stealing. [How code review works in Autter.](https://autter.dev/features/code-review)

**Dependencies are vetted against real registries,** so a package that doesn’t exist doesn’t quietly reach main.

**Secrets, removed auth and known CVEs are caught at the gate,** and the merge stays blocked until the checklist clears.

**The open-source [Autter CLI](https://autter.dev/features/cli) records the agent, model and prompt behind each generated line,** so “who wrote this?” has an answer that isn’t just whoever clicked merge, and generated code gets proportionally more scrutiny. It covers commits made after it’s installed. It can’t go back and work out who wrote the older ones.

**The [Autter MCP server](https://autter.dev/features/mcp) lets Claude Code, Cursor and other agents pull review findings and fix them in the same loop.** We built it the way this post says MCP servers should be built: scoped, expiring, revocable tokens; every call in the audit log; per-token rate limits; no arbitrary SQL and no generic GitHub writes. If we’re going to tell you to vet your MCP servers, ours should survive the vetting.

**Runtime observability closes the loop.** When something does fail in production, Autter traces it back and raises the fix PR, which then goes through the same gate. [Runtime, here.](https://autter.dev/features/runtime)

What Autter doesn’t do:

**It doesn’t patch your coding agent.** Update Cursor, Claude Code and Gemini CLI. The advisories above are fixed in new versions, not by us.

**It isn’t endpoint security.** The s1ngularity payload ran on developers’ machines, before any pull request existed. Scoped credentials and agent sandboxes handle that part.

**It doesn’t replace your CI or your reviewers.** It sits on top of CI as the merge gate and tells your reviewers where to spend their attention.

**It will sometimes be wrong.** Dismiss the finding, and it learns. Nothing blocks your merge on a hunch.

## Frequently asked questions

### Is it safe to use Cursor or Claude Code at a startup?

Yes, with the same care you’d give any new teammate with broad access. Keep the tools updated, keep long-lived secrets off the machines where they run, avoid permission-skipping flags outside disposable sandboxes, and gate what they produce before it merges.

### What is prompt injection in a coding agent?

It’s when text the agent reads, in an issue, a README, a web page or an MCP tool response, contains instructions the agent follows as if they came from you. The agent can’t reliably tell data from orders, so anything it reads can try to steer it.

### Are agent config files like .claude/settings.json a security risk?

Yes, when they can define commands. Hooks and MCP server definitions tell tools what to execute. Treat changes to them like changes to CI workflows: owned, reviewed, and never merged on autopilot.

### Is --dangerously-skip-permissions ever OK?

Yes, in a disposable container with no credentials and no network access to anything you care about. No, on a laptop or in a CI job that processes untrusted input.

### Can I manually review everything my AI agent writes?

No, not at the volume agents produce. You can review what matters if something reliably sorts it for you and refuses to merge the risky parts until a human has looked.

### Should every developer get a security score for the AI code they ship?

No. A per-developer score attributes the agent’s output to whoever clicked merge. Track which agent, model and prompt produced a change, and fix the system, not the scoreboard.

## Our read

Back to August 2025.

The s1ngularity payload didn’t exploit Claude, Gemini or Q. It used them exactly as designed, with the safety switches off, on machines where they could see everything. The lesson isn’t “AI CLIs are dangerous.” It’s that we gave a new crew member every key on the ring and never wrote down who they take orders from.

The agents are getting better sandboxes. Good. But most of what an agent does to your company eventually shows up as a diff: the settings file, the new package, the three loosened lines in auth. The laptop is a shared problem. The harbour is yours.

Capt. Patch doesn’t care how helpful the deckhand is. He checks the cargo.

Calm seas ahead. **Hire Autter for a peaceful weekend.**

[Start Now](https://app.autter.dev/) · [Book a demo](https://autter.dev/contact)

*P.S.*

**Sagnik:** What if Capt. Patch gets his own coding agent?

**Tanvi:** With what permissions?

**Sagnik:** All of them. He’s the harbour master.

**Tanvi:** So, `--dangerously-skip-permissions`.

**Sagnik:** It says “dangerously” right there. That’s transparency. Very on-brand.

**Tanvi:** So is getting robbed by a README.

*(currently: Capt. Patch’s agent has read-only access and is sulking.)*

**Sources:** [Wiz Research: s1ngularity’s aftermath](https://www.wiz.io/blog/s1ngularitys-aftermath) · [Cursor advisory GHSA-8pcm-8jpx-hv8r](https://github.com/cursor/cursor/security/advisories/GHSA-8pcm-8jpx-hv8r) · [Anthropic advisory GHSA-ff64-7w26-62rf](https://github.com/anthropics/claude-code/security/advisories/GHSA-ff64-7w26-62rf) · [Google advisory GHSA-wpqr-6v78-jr5g](https://github.com/google-github-actions/run-gemini-cli/security/advisories/GHSA-wpqr-6v78-jr5g) · [The Hacker News: DuneSlide (Cato AI Labs research)](https://thehackernews.com/2026/07/critical-cursor-flaws-could-let-prompt.html) · [Cursor advisory GHSA-3v8f-48vw-3mjx](https://github.com/cursor/cursor/security/advisories/GHSA-3v8f-48vw-3mjx) · [AWS Security Bulletin AWS-2025-015](https://aws.amazon.com/security/security-bulletins/AWS-2025-015/) · [OWASP Top 10 for LLM Applications](https://genai.owasp.org/llm-top-10/)

**Keep reading:** [Claude Code, Cursor, Codex: Fast Hands, Zero Fear of Consequences](https://autter.dev/blog/ai-coding-assistant-security-risks) · [The Diff Arrived. The Author Didn’t: How to Handle AI-Generated Pull Requests](https://autter.dev/blog/ai-generated-pull-requests) · [We Open-Sourced the Tool We Use to Track AI-Generated Code](https://autter.dev/blog/we-open-sourced-the-tool-we-use-to-track-ai-generated-code)

## Keep reading

[Security Nobody Reads the Dashboard: SAST for Small Teams Without a Security Engineer Tanvi · Nov 28, 2026 · 10 min read](https://autter.dev/blog/sast-for-small-teams)

[Security Nobody Reads Config Diffs With Feeling Sagnik · Oct 13, 2026 · 8 min read](https://autter.dev/blog/nobody-reads-config-diffs-with-feeling)

[Security How to Prioritize Vulnerabilities: CVSS, EPSS, KEV, and Reachability Tanvi · Oct 9, 2026 · 8 min read](https://autter.dev/blog/how-to-prioritize-vulnerabilities)

Before the next merge

## Enough reading. Review the next pull request.

Autter runs, tests and verifies every pull request before it merges. Try Harbour free: 10 days or 10 PR reviews, whichever comes first, no card needed.

[Start free trial](https://app.autter.dev/login) [Book a demo](https://autter.dev/contact)
