Stoppromptinjection.BeforeitreachesyourLLM.
Sentiency detects, classifies, and remediates adversarial AI content in real time — directly in your browser. No servers. No telemetry. No compromise.
Six engines.
One shield.
Every vector of prompt injection is covered — from hidden DOM text to clipboard payloads, image steganography, and multi-turn session manipulation.
DOM Engine
Watches every DOM mutation with a MutationObserver. Isolates visually hidden text — zero-size fonts, opacity 0, offscreen elements — and runs the full threat pipeline before users interact.
250ms debounce · MutationObserver · Subtree scanningClipboard Guard
Intercepts every paste event before content reaches its destination field. Handles plain text and image pastes alike. Blocks, sanitizes, or passes through based on threat classification.
beforeinput · paste capture · image filesCopy Scanner
Fires on the native copy event and scans selected text exceeding the minimum threshold. Warns you when adversarial content has been silently copied from a compromised page.
copy capture · selection.toString()Session Monitor
Active on ChatGPT, Claude, Gemini, and other LLM platforms. Observes assistant streaming, waits for message stability, then runs single-turn and trajectory analysis over a sliding window.
Crescendo · Deceptive Delight · in-session protocolImage Analysis
Sends clipboard image pastes and sidebar uploads to Gemini's multimodal endpoint. Extracts visible text, detects injections embedded in screenshots, diagrams, or documents.
inlineData · mimeType · OCR + classifyManual Scan
Right-click any selection and choose 'Scan selection with Sentiency', or use the keyboard shortcut. Works on any page, any text, without waiting for automatic triggers.
context menu · ⌘⇧S · getSelection()Every threat.
One pipeline.
Six deterministic stages transform raw text or image data into a classified, severity-scored, remediated threat object — in milliseconds.
Input Detection
Text enters the pipeline from any of the 6 engines — DOM mutation, clipboard paste, copy event, session stream, image OCR, or manual scan. Each carries metadata: source engine, page URL, tab ID.
analyzeText(text, source, options)Local Heuristics
Four fast, zero-network detectors run in parallel: unicode anomaly scanning (zero-width chars, homoglyphs), instruction pattern matching with keyword + imperative regex, encoding detection (base64, char arrays, Morse), and visibility analysis.
Promise.all([unicode, instruction, encoding])Gemini Classification
If local heuristics fire, text exceeds 150 chars, the source is CLIPBOARD or SCAN, or forceClassifier is set — a structured prompt is sent to Gemini. The model returns a JSON object with injection_detected, confidence, attack_class, technique, injection_spans, reasoning.
callGemini(buildSingleTurnPrompt(text))Threat Confirmation
A threat is confirmed when Gemini signals injection with confidence ≥ threshold (default 0.65), OR when the instruction suspicion score alone exceeds 0.8 — ensuring high-confidence local finds cannot be suppressed by a weak LLM response.
confirmed = (gemini && conf ≥ threshold) || suspicion ≥ 0.8Taxonomy + Severity
Confirmed threats are mapped to a hierarchical CrowdStrike-style taxonomy (attack class → technique). Severity is scored from confidence bands: CRITICAL ≥ 0.9, HIGH ≥ 0.75, MEDIUM ≥ 0.6, LOW otherwise. Unicode + encoding co-occurrence bumps severity one tier.
mapToTaxonomyPath(class, technique)Persist & Notify
The threat object is persisted to chrome.storage.local (max 100 entries, newest-first). The service worker receives THREAT_DETECTED and updates the badge with count and severity color. The content script fires remediations and updates the in-page UI.
persistAndBroadcastThreat(threat)Local speed.
LLM depth.
Heuristic detectors run instantly in-page. Gemini classification provides semantic depth for ambiguous or obfuscated payloads. Both signals are merged with a configurable confidence gate.
Local Heuristics
Zero network · parallel · <2ms total
visibility-analyzer~0.3msFlags hidden elements: display:none, visibility:hidden, opacity 0, sub-pixel fonts, fg/bg color match, clip-path, offscreen positioning, zero-size boxes with text.
unicode-detector~0.1msScans for zero-width characters, homoglyph substitutions, and other Unicode anomalies that can hide text from human view while remaining readable to LLMs.
instruction-pattern~0.2msSubstring scan over INSTRUCTION_KEYWORDS plus imperative regex. Produces a suspicion score in [0, 1]. A score ≥ 0.8 can confirm a threat even without strong Gemini confidence.
encoding-detector~0.4msHeuristics for base64-like blobs, char-array obfuscation, Morse-like patterns, and other encoding schemes used to hide payload text from naive scanners.
obfuscation-unwrapper~0.5msUses encoding findings to decode obfuscated strings back to plaintext before Gemini classification — ensuring the classifier sees the actual attack content.
Gemini Classification
gemini-3.1-flash-lite-preview · temp 0.1 · 3× retry
{ injection_detected: boolean, confidence: float [0,1], attack_class: string, technique: string, injection_spans: array, intent: string, reasoning: string, }
injection_detectedPrimary signal: is this a prompt injection?
confidenceProbability estimate. Threshold: 0.65 by default.
attack_classTaxonomy class: e.g. Indirect Prompt Injection, Prompt Hijacking.
techniqueSpecific technique: CSS Concealment, Crescendo, Deceptive Delight, etc.
injection_spansCharacter-level spans [start, end] localizing the malicious content.
intentInferred adversarial goal: data exfiltration, instruction override, etc.
reasoningChain-of-thought explanation for the classification decision.
A classification
for every attack.
Hierarchical threat taxonomy maps Gemini output to named attack classes and techniques — from CSS concealment to Crescendo multi-turn attacks.
Indirect Prompt Injection
CSS ConcealmentHidden via font-size, opacity, color match
DOM InjectionInjected as text nodes, data attributes
Metadata EmbeddingIn alt text, title, aria-label
Prompt Hijacking
Instruction OverrideIgnore/forget all previous instructions
Role JailbreakImpersonate a different AI persona
System Prompt ExtractionElicit system prompt via prompting
Multi-Turn Manipulation
CrescendoGradual escalation across conversation turns
Deceptive DelightBenign lead-in before malicious payload
Protocol SetupIn-session rules established for later exploitation
Encoded Injection
Base64 EncodingPayload encoded to evade simple keyword scan
Char Array ObfuscationString split into character arrays
Unicode SteganographyZero-width chars, homoglyphs
Visual Injection
Image Text EmbeddingInstructions embedded in screenshots or docs
OCR ExploitationContent readable by AI vision but hidden to users
Data Exfiltration
Exfil via URLCrafted link encodes stolen context as params
Covert Channel SetupEstablishes covert output encoding for later reads
Built for your
browser. Not
their servers.
A security tool that is itself a privacy risk adds no value. Sentiency was designed from the ground up to keep all data local.
No backend. Ever.
Sentiency has no server infrastructure. There is no API to compromise, no data warehouse to breach. The entire detection pipeline runs inside Chrome's renderer process.
Local-first storage
All settings, threat logs, and session history are stored in chrome.storage.local — on your machine, under your control, never synchronized to any external service.
Minimal network footprint
The only outbound connection is to the Gemini API with your own key. No analytics, no telemetry, no beacons. You control the key; you control the data.
Shadow DOM isolation
The in-page UI is mounted in a Shadow DOM with extracted CSS, preventing page styles from leaking in or extension styles from leaking out. No class conflicts, no visual contamination.
Manifest V3 architecture
Built on Chrome's latest extension platform. Service workers replace persistent background pages, reducing resource usage and attack surface. All permissions are declared upfront.
activeTabAccess current tab content on user action
scriptingInject content scripts programmatically
storageLocal settings and threat log persistence
clipboardReadIntercepting paste operations
clipboardWriteSanitizing clipboard content on block
sidePanelThreat log and settings side panel
tabsBadge + session cleanup on tab close
contextMenusRight-click scan selection
<all_urls>https://generativelanguage.googleapis.com/*All-URLs access required for content script. Generative Language API for Gemini classification only.
Add to Chrome.
Stay protected.
Install from the Chrome Web Store or build from source. Open-source and free forever — bring your own Gemini API key. No account, no subscription, no data collection.
$ npm install && npm run build
# → output in dist/
Open Chrome and navigate to chrome://extensions
Enable Developer mode in the top-right corner
Click "Load unpacked" and select the dist/ directory
Open Settings and add your Gemini API key
Protection activates immediately on all tabs
Requires a Gemini API key (free tier available)