Skip to main content
CanaryVaultsCanaryVaults home
ProductsPricingBlogDocs
Start Free
← Back to BlogProduct thinking

Why prompt injection needs its own firewall

April 20264 min readCanaryShield

Prompt safety breaks when it is treated like generic moderation. Inspection has to sit before execution, not after.


Most AI safety systems work by reviewing what the model said after it already said it. Content moderation, toxicity filters, guardrails — they all sit after execution. Prompt injection is different. The attack happens in the input, not the output. If you wait until the model responds, the damage is already done.

CanaryShield sits before the model. Every user message passes through three layers of inspection — regex pattern matching, LLM-powered semantic analysis, and message sanitization — before it ever reaches your real AI system.

This is not a moderation layer. It is a firewall. The distinction matters because moderation is reactive and forgiveness-oriented. A firewall is proactive and denial-oriented. When CanaryShield blocks a message, the model never sees it. There is no leaked system prompt, no manipulated response, no data exfiltration.

The three-layer architecture exists because no single detection method catches everything. Regex rules are fast and catch known patterns instantly. The LLM analyzer catches subtle, indirect attacks that rules miss. The sanitizer handles edge cases where the message is mostly safe but contains suspicious fragments that should be stripped before forwarding.

Integration takes two lines of code. You send the user message to CanaryShield, check whether it was blocked, and forward the sanitized version to your real model if it passes. That is the entire integration surface.


This article is about a shipped surface: CanaryShield — prompt-injection firewall. Integration details live in the docs.

Continue reading

More notes from the CanaryVaults team.

Featured

What a paste-site canary sees: the anatomy of a credential-stuffing hit

A walkthrough of the seeding pipeline end to end: how a decoy credential ends up on a paste site, what happens in the moments after someone tries to use it, and what lands in your alert channel.

Platform6 min read
Postmortem

Every page on our site was shipping an empty body

One call to useSearchParams() sat inside the root layout's only Suspense boundary, and deopted the entire application to client-side rendering. Twelve words of markup left our server. Nothing in the build said so.

Platform4 min read
Engineering

It worked, it said so, and nothing happened

A contact form returned 201 and showed a green confirmation every time. Nobody was ever notified. We went looking for more of these and found about thirty, all with the same shape.

Platform4 min read
CanaryVaults

Deception-based AI security. Decoys, trap facts, honeypots, prompt defense, and tamper-evident audit trails — one workspace.

Plant your first canary

PRODUCT

ProductsCanaryAgentDashboardPricingReferralGet started

RESOURCES

DocumentationQuickstartShieldEvidence formatAPIBlog

COMPANY

AboutSecurityReport a vulnerabilityContact

TRUST

Trust centerVerify evidenceStatusChangelogIncidentsDPA

COMPARE

vs Thinkst Canaryvs CanaryTokensFor SaaS teams

LEGAL

TermsPrivacyCookiesSubprocessorsSupport
deception-based AI security© CanaryVaults · canaryvaults.comsha-256 sealed · tamper-evident

CANARYVAULTS