ai-security-practices

Provides security guidance for LLM applications, agents, and Python/TypeScript web stacks.

1|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/TheViziusGroup/vibe-engineering-skills --skill ai-security-practices-theviziusgroup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-security-practices
Source: https://github.com/TheViziusGroup/vibe-engineering-skills/tree/main/plugins/security-principles/skills/ai-security-practices
Command: npx skills add https://github.com/TheViziusGroup/vibe-engineering-skills --skill ai-security-practices-theviziusgroup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams building AI-powered applications face prompt injection, RAG poisoning, agentic tool misuse, leaked API keys, and critical framework CVEs, but lack a consolidated, current reference for defending against them. ## Core Features & Use Cases - LLM Threat Coverage: Maps defenses to the OWASP LLM Top 10 (2025), including prompt injection patterns, output sanitization with Pydantic/Zod, and Denial of Wallet cost controls. - Agentic & MCP Security: Prescribes sandboxing (Firecracker, gVisor), least-privilege tool scoping, human approval gates, and MCP server hardening controls. - Stack-Specific Hardening: Details Python (FastAPI, Bandit, pip-audit) and Next.js/React security patterns, including fixes for CVE-2025-55182 and CVE-2025-29927. - Use Case: When reviewing an architecture for a RAG chatbot with tool-calling agents, use this Skill to produce a defense-in-depth checklist covering ingestion validation, tenant isolation, guardrail layers, and secrets management. ## Quick Start Ask the assistant to review your LLM application architecture against the OWASP LLM Top 10 and recommend concrete controls for your Python or Next.js stack.

Frequently Asked Questions about ai-security-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I defend against prompt injection in LLM applications?

Prompt injection cannot be fully patched at the input layer, so use architectural patterns like action-selectors, plan-then-execute, dual-LLM separation, or CaMeL. Add detection tools such as Llama Guard 3 or LLM Guard as one layer, and validate all model output with Pydantic or Zod.

What guardrail framework should I use for an LLM app?

NeMo Guardrails offers five rail types including dialog and retrieval rails with Llama Guard and Presidio integration. Guardrails AI suits Python-centric apps, LLM Guard provides composable scanners, and Lakera, Azure AI Content Safety, or Bedrock Guardrails work as managed options.

How do I secure RAG pipelines against data poisoning?

Authenticate document sources, strip hidden or zero-width text at ingestion, and reject suspicious instruction patterns. Enforce per-tenant isolation at the database layer, encrypt the vector store, and add retrieval rails before generation.

Does Next.js middleware provide sufficient authentication protection?

No. CVE-2025-29927 showed middleware auth can be bypassed via a spoofed header. Use middleware only for optimistic cookie checks and perform full session validation in Server Components, Route Handlers, or the Data Access Layer.

How do I prevent Denial of Wallet attacks on LLM endpoints?

Set explicit max_tokens on every call, enforce token-based and cost-based rate limits per user or API key, and configure provider spend caps. Use slowapi or fastapi-limiter in Python and @upstash/ratelimit or Arcjet in Next.js.

What are the limitations of SAST tools for AI-generated code?

A 2026 benchmark found 78% of confirmed vulnerabilities were detected by only one of five SAST tools, so SAST alone is structurally insufficient. Combine it with SCA, secret scanning, DAST, mandatory human review gates, and infrastructure-layer controls like WAFs.