Files
crewAI/tests
Devin AI 3d3d06f9e6 Fix #5988: Add memory poisoning protection via MemorySanitizer
- Add MemorySanitizer class that detects and neutralizes prompt injection
  patterns (system overrides, instruction overrides, role hijacking,
  command injection, hidden instructions, jailbreak attempts)
- Integrate sanitization into Memory.save() base class for write-time protection
- Integrate sanitization into ContextualMemory.build_context_for_task() for
  defense-in-depth on retrieval
- Sanitize LongTermMemory metadata (suggestions, expected_output)
- Add sanitize_memory config option in memory_config (default: True)
- Add 41 tests covering all injection pattern categories, integration with
  Memory.save(), ContextualMemory retrieval, config toggle, and edge cases

Co-Authored-By: João <joao@crewai.com>
2026-05-31 16:23:08 +00:00
..
2024-12-17 16:00:15 -05:00
2024-11-18 00:21:36 -03:00
2024-12-23 13:19:58 -05:00
2023-10-29 19:51:59 -03:00
2023-12-27 15:13:42 -05:00
2024-11-12 15:04:57 -03:00