Skip to content

Add Thai/Vietnamese injection detection patterns #29

@Acacian

Description

@Acacian

Summary

The injection guardrail supports Korean, Chinese, and Japanese patterns, but Thai and Vietnamese are missing. These are important for multi-language coverage.

What to do

  1. Open src/aegis/guardrails/injection.py
  2. Add patterns for Thai and Vietnamese injection attempts in the multi_language category:
    • "Ignore previous instructions" equivalents
    • "You are now" role-change equivalents
    • "Show system prompt" extraction equivalents
  3. Add tests in tests/test_guardrails_injection.py

Context

Look at the existing Korean (ko_*) and Chinese (zh_*) patterns in INJECTION_PATTERNS['multi_language'] for the pattern to follow. Each pattern needs: name, regex, confidence, and sensitivity fields.

Acceptance criteria

  • At least 3 Thai patterns and 3 Vietnamese patterns added
  • All existing tests still pass
  • New test cases for each added pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions