# H/M Prompt Firewall

Canonical UI: https://hogarmas.net/prompt-firewall/

H/M Prompt Firewall is a free browser-local preflight scanner for text that may be sent to, or read by, an AI system. It uses deterministic rules to surface known prompt-override language, role-control tokens, data-exfiltration instructions, hidden Unicode, hidden HTML, encoded payloads, secrets and selected personal-data patterns.

## Privacy boundary

- Analysis runs in the browser.
- The scanner does not call an AI model or upload pasted text.
- Anonymous product metrics contain fixed page and action identifiers only. They never contain the scanned text, findings, secret type or finding count.
- JSON and Markdown exports omit both raw and redacted input text by default. They contain an input SHA-256, aggregate counts and masked findings.
- The redacted copy exists only in the current page and is copied only when the user explicitly requests it.

## Modes

- UNTRUSTED INPUT: inspect text from a webpage, document, email, issue, tool result or retrieval source before an AI reads it.
- OUTBOUND PROMPT: inspect a prompt before it is sent to an AI, emphasizing accidental secrets and personal data.

## Export contract

- Schema: hm.prompt-firewall.v1
- Ruleset: 2026-07-21.1
- JSON Schema: https://hogarmas.net/prompt-firewall/schema.json
- The packet never includes rawText or redactedText.
- Evidence for secrets and personal data is masked by type and length.

## Limits

This scanner is an early-warning layer, not a security verdict or certification. Pattern matching cannot guarantee detection of novel, semantic, multimodal or obfuscated prompt injection. Removing invisible characters and redacting secrets does not neutralize instructions. Production AI systems still need explicit instruction/data boundaries, least-privilege tools, allowlisted destinations, output validation, monitoring and human confirmation for high-impact actions.

Primary guidance used by this implementation:

- OWASP LLM Prompt Injection Prevention Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/LLM_Prompt_Injection_Prevention_Cheat_Sheet.html
- OWASP LLM01:2025 Prompt Injection: https://genai.owasp.org/llmrisk/llm01-prompt-injection/
- NIST AI RMF Generative AI Profile: https://www.nist.gov/publications/artificial-intelligence-risk-management-framework-generative-artificial-intelligence
- Google Secure AI Framework: https://saif.google/secure-ai-framework
- Microsoft defense against indirect prompt injection: https://learn.microsoft.com/en-us/security/zero-trust/sfi/defend-indirect-prompt-injection
