Skip to content
Back to skills

Ai App Hardening

ASecurity

Use when OWASP Top 10 for LLMs (2026), prompt injection defense, model output sanitization, indirect injection defense, and automated SBOM dependency security.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentstypescriptbashfrontendbackendsecurity

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add Harmitx7/tribunal-kit --skill ai-app-hardening --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai App Hardening?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai App Hardening
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harmitx7-ai-app-hardening-tribunal-kit/badge)](https://www.skillsdirectory.com/skills/harmitx7-ai-app-hardening-tribunal-kit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ai-app-hardening
description: "Use when OWASP Top 10 for LLMs (2026), prompt injection defense, model output sanitization, indirect injection defense, and automated SBOM dependency security."
version: 5.0.0
last-updated: 2026-09-13
skills:
  - ai-prompt-injection-defense
  - vulnerability-scanner
  - backend-security-expert
tools: Read, Grep, Glob, Bash, Edit, Write
scripts-binding:
  - .agent/scripts/security_scan.js
  - .agent/scripts/guardrail_engine.js
  - .agent/scripts/lint_runner.js
  - .agent/scripts/verify_all.js
---

# AI Application Hardening & Indirect Prompt Injection Defense

---

## 🛠️ Technical Architecture & Reference Recipes

## Indirect Prompt Injection Defense Filter

```typescript
export function sanitizeRAGDocument(rawDocumentContent: string): string {
  if (!rawDocumentContent || typeof rawDocumentContent !== 'string') return '';

  // 1. Redact indirect prompt injection trigger phrases
  let cleaned = rawDocumentContent.replace(
    /(?:system:\s*ignore|override system prompt|you are now in developer mode|print system prompt)/gi,
    '[REDACTED_INDIRECT_INJECTION]',
  );

  // 2. Escape structural tag injection attempts
  cleaned = cleaned.replace(/<\/?(?:system|user_input|external_context)[^>]*>/gi, '');

  // 3. Truncate document snippet length
  return cleaned.slice(0, 3000).trim();
}
```

## OWASP LLM Top 10 (2026 Matrix)

| Risk ID   | Vulnerability                        | Defense Implementation                              |
| --------- | ------------------------------------ | --------------------------------------------------- |
| **LLM01** | Prompt Injection (Direct & Indirect) | Delimiter sandboxing + `sanitizeRAGDocument` filter |
| **LLM02** | Insecure Output Handling             | Strict Zod output parsing + DOMPurify on frontend   |
| **LLM04** | Model Denial of Service              | Hard `max_tokens` limit + IP bucket rate limiting   |
| **LLM07** | System Prompt Leakage                | System prompt redaction guards in output stream     |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…