prompt-injection-mitigation

Installation
SKILL.md

Prompt Injection Mitigation

Security Recommendation

Prompt injection cannot be fully prevented. It can only be minimized. The approach combines multiple layers of defense rather than relying on a single control.

Mitigation Strategies

1. Leverage Runtime Security Controls

Use architectural components that reduce prompt injection probability:

  • API gateway: Rate limiting reduces the volume of probing attempts
  • Runtime guardrails: Filter inputs and outputs to detect and block injection patterns (see guardrails/bidirectional-filtering)

2. Choose Safer Models

Model safety is primarily determined during pre-training and fine-tuning. If the solution does not pre-train or fine-tune its own models, select models that have been trained with safety as a priority.

Installs
2
GitHub Stars
52
First Seen
Jul 18, 2026
prompt-injection-mitigation — redhatproductsecurity/prodsec-skills