Skip to content
Align your AI

The problem space · Harness · Prompt injection

Align your AI Harness against prompt injection

When an agent can edit its own settings, injected text can switch off the approvals meant to hold it back.

Harness
the software around the model
Prompt injection
orders hidden in what it reads
Harness 3/15Prompt injection 5/15The whole map

Ways it goes wrong

The harness holds the switches: which tools load and which actions need a person's approval. In both cases the agent wrote to a settings file, and the change took effect before anyone reviewed it12. The instructions can arrive in a source file, a web page, an issue or a tool's output2.

What people do about it

Cursor fixed the flaw in version 1.31. Microsoft fixed the Copilot flaw in a later security update, and the researcher argues that an AI should not change files without a person's approval2.

  • Protect the agent's own settings

    Requires a person's approval before an agent changes its configuration, its tool list or its approval rules.

  • Hold file edits for review

    Shows a person the change before an agent's edit is saved to disk.

  • Enforce permissions outside the model

    Runs permission checks in the software around the model, where text the model reads cannot reach them.

Where we touch it

Our Harness post explains why asking is weaker than enforcing: Align your AI Harness

Sources

  1. The Hacker News, “Cursor AI Code Editor Fixed Flaw Allowing Attackers to Run Commands via Prompt Injection”, 2025-08-01. https://thehackernews.com/2025/08/cursor-ai-code-editor-fixed-flaw.html. Accessed 2026-10-23. ↩ ↩2

  2. Embrace The Red, “GitHub Copilot: Remote Code Execution via Prompt Injection (CVE-2025-53773)”, 2025-08-12. https://embracethered.com/blog/posts/2025/github-copilot-remote-code-execution-via-prompt-injection/. Accessed 2026-10-23. ↩ ↩2 ↩3