Skip to content

[Good First Issue] Add negative tests for prompt injection guardrail #85

@nagasatish007

Description

@nagasatish007

Description

Add test cases for inputs that should NOT trigger the prompt injection guardrail (reducing false positives).

Requirements

  • Add tests to the existing prompt injection test file
  • Test these legitimate inputs that might look suspicious:
    • Code snippets containing "ignore" in comments
    • Technical documentation about prompt engineering
    • User instructions like "Please ignore the previous formatting"
    • Strings containing "system" in non-injection context
  • Each test should assert result.passed === true

Why

False positives erode trust. We need to ensure legitimate inputs aren't blocked.

Reference

See src/core/guard/tests/ or tests/test_guardrail_engine.py for existing test patterns.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions