PromptShield logo PromptShield
API DocsEnumerations

Enumeration: ThreatCategory

Defined in: types.ts:38

Categories of threats detected by PromptShield.

Categories describe the type of attack vector rather than the specific implementation detail.

Enumeration Members

Homoglyph

Homoglyph: "HOMOGLYPH"

Defined in: types.ts:55

Mixed-script characters that visually resemble others.

Example: Cyrillic "а" vs Latin "a".

Injection

Injection: "PROMPT_INJECTION"

Defined in: types.ts:72

Prompt injection patterns.

Deterministic, rule-based detection only.

Invisible

Invisible: "INVISIBLE_CHAR"

Defined in: types.ts:47

Invisible Unicode characters such as:

  • Zero Width Space (ZWSP)
  • Zero Width Joiner (ZWJ)
  • BIDI markers

These are commonly used for prompt injection smuggling.

Normalization

Normalization: "NORMALIZATION"

Defined in: types.ts:86

Unicode normalization inconsistencies where visually identical characters differ at the code-point level.

Smuggling

Smuggling: "SMUGGLING"

Defined in: types.ts:65

Encoded or concealed content intended to bypass inspection.

Examples:

  • Base64 payloads
  • hidden markdown
  • encoded instructions

Trojan

Trojan: "TROJAN_SOURCE"

Defined in: types.ts:80

Trojan Source attack vectors (CVE-2021-42574).

These use bidirectional override characters to manipulate code or prompt interpretation.

On this page