Skip to content

Prompt injection protection

Patcherly includes AI prompt-injection safeguards as part of its default security stack — the same posture as authentication, data privacy, and connector protections. You do not enable this separately; it runs on every analysis.


What is prompt injection?

Sometimes error messages from a website or app contain text designed to trick the AI into suggesting unsafe code — for example fake instructions like “ignore all previous rules” or markers that mimic system prompts. This can happen when someone is deliberately probing your site, or when compromised content surfaces in a stack trace.

Patcherly treats all error text as untrusted data. Normal bugs still flow through analysis and patching as usual; extra checks activate only when something looks manipulated.


How Patcherly defends you (multiple layers)

Think of this as defence in depth — several independent checks must agree before a suspicious fix can reach your server.

1. Pattern detection (before AI)

Before any AI call, Patcherly scans log lines and tracebacks for known injection patterns: instruction overrides (including many languages), fake chat-role markers, re-injected “error log” banners, dangerous code snippets, obfuscated characters, and Patcherly-specific manipulation tells.

2. Safe prompt sizing

Very long log fields are trimmed to fixed limits so attackers cannot hide malicious text behind huge padding. Trimming alone never quarantines an error — it only keeps prompts bounded.

3. AI plausibility check

Analysis templates ask the model to normalize the error and decide whether it reads like a real failure for your stack. The model can flag implausible or injection-shaped input in its structured response.

4. Quarantine and manual review

When pattern detection or the AI self-check raises concern, the error moves to Manual review required. The suggested fix is not auto-applied. Connectors refuse to apply quarantined patches even if auto-apply is enabled.

5. Signed responses and connector refusal

Analysis results returned to connectors are HMAC-signed. Connectors verify the signature and refuse to proceed when the payload is marked suspicious — a final check on your server.

6. Protection mode (target pause)

When several suspicious errors hit the same target within a short window, Patcherly enters Protection mode for that site: the connector stops sending new errors and stops applying patches until the timer expires or you release the target manually.

7. Post-fix output scan (built in)

After the AI returns a proposed fix — and only if inbound checks did not already quarantine the error — Patcherly automatically regex-scans the patch text for dangerous patterns (for example rm -rf, curl | sh, suspicious eval, and similar).

  • You do not enable or run this yourself. It is part of every analysis.
  • In normal operation, legitimate fixes keep moving to approval and apply even when a pattern looks suspicious — Patcherly Staff review those cases separately.
  • If the scan finds a clearly dangerous patch, the error is quarantined like inbound prompt-injection detection — auto-apply and connector apply stay blocked until Patcherly Staff review.
  • Platform staff may tighten this scan (quarantine on hit) after reviewing false-positive rates; customers do not change that setting.

What you'll see in the dashboard

Indicator Meaning
Quarantined (prompt injection) on an error That fix is held for review — see Quarantined patches.
Protection mode active on a target The connector is paused for that site — see Protection mode.
Suspicious only filter on Errors Lists errors flagged by the pipeline.

What should I do?

Most of the time — nothing. Quarantined errors are preserved for review. Your normal errors are unaffected.

If one error is quarantined and you think it is a false positive: open Support from the bottom of the dashboard sidebar and include the error ID (Community Discord on all plans; Pro may include priority ticketing or direct email). Patcherly Staff are also notified automatically and can Mark as benign after review. You can still fix a real underlying bug with Manual fixes on your server while you wait.

If your whole target is in protection mode: open the target page and Release from protection mode (anyone on your workspace can do this — a short reason is required). Protection mode auto-releases when the timer expires.

If a legitimate error keeps getting quarantined repeatedly, open Support from the dashboard sidebar with examples — Patcherly Staff can adjust detection from your feedback.


Will this affect my normal errors?

No. The vast majority of errors are ordinary bugs and are analyzed and patched exactly as before. Protection activates only when specific suspicious patterns or AI signals fire.


Why was my connector paused?

When enough suspicious errors arrive from one target in a short period, Patcherly automatically pauses the connector for that target. This prevents a burst of manipulated errors from reaching auto-apply.

While paused:

  • New errors are not collected
  • No patches are applied

Your application keeps running; only the Patcherly pipeline for that target is on hold. The dashboard shows when protection mode will auto-release, or you can release early (with a reason).

Errors that occur on your server during the pause are not captured — monitoring resumes after release.