Prompt Injection Fixes Need Regression Tests
Saqib Jan · 24 November 2026
Read the originalA Salesforce team turns every attack it has blocked on its AI features into a release test, after an AI model upgrade reopened a security hole it had already fixed.
Jose Lejin P J, a principal member of technical staff at Salesforce, saw a fixed security flaw in an AI feature come back. The team had blocked hidden instructions inside a document that an AI agent read, an attack known as prompt injection. An upgrade to the AI model made the agent obey them again, with no change to the team's prompt. The Stack Overflow Blog article also draws on Akash Agrawal, vice president of DevOps and DevSecOps at TestMu AI, a company that sells AI testing tools.
- The team now stores every blocked attack as a test that pairs the original attack text with the rejection the system should give.
- The tests run whenever the prompt, the AI model or a data connector changes, in the pipeline stage that blocks a release, and a build that fails is not released.
- Fixing the AI model's version in configuration makes an upgrade a reviewed change instead of a silent swap by the provider.
- Security staff decide which attacks must fail, and the delivery team runs those checks before every release.
A team that ships AI features can treat each AI model upgrade as a release and test it against every attack it has already blocked. That is the article's recommendation, drawn from one team's experience at Salesforce and one vendor's advice.
Turn every prompt injection the team has blocked into a test that pairs the attack with the expected rejection, and run the full set before each release.
Pin the exact AI model version in the feature's configuration, so a provider's model upgrade happens only through a reviewed change that reruns the team's prompt injection tests.
Derived by Working Surface from the article; more in the Playbook. Source line: The fix held until a model upgrade brought the injection straight back.
25 November 2026: as AI agents produce more of the code, teams make checking automatic and write down what was decided, and people set the standard and name who approves what the checks cannot cover.