spring-projects / spring-projects/spring-ai
Security: OWASP ASI06 memory poisoning defense for Spring AI agent memory
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Memory Poisoning Defense for Spring AI Agents (OWASP ASI06)
Hi Spring AI team 👋
Spring AI is the primary framework for building AI applications in the Java/Spring ecosystem. As Spring AI's ChatMemory and vector store integrations are used in production agentic workflows, ASI06 — Memory Poisoning (from the OWASP Top 10 for Agentic Applications 2025) is an important security consideration.
The Threat
Malicious content written into an agent's ChatMemory or vector store can persist across sessions and silently alter future model behavior — without triggering any model-level safety filter.
Reference Implementation
OWASP Agent Memory Guard is an official OWASP reference implementation (Python) that defines the scan-before-write pattern for memory stores. The core algorithm is language-agnostic and could be ported to Java or called via a sidecar.
from agent_memory_guard import MemoryGuard
guard = MemoryGuard()
result = guard.scan(memory_content)
if result.is_safe:
chat_memory.add(memory_content)
Ask
Would the Spring AI team be open to:
- A security note in the
ChatMemorydocumentation about ASI06? - A
MemoryAdvisorinterface that supports pluggable memory validation?
Happy to draft a docs PR or a Java interface design proposal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Spring AI's ChatMemory and vector store integrations, then read the linked OWASP Agent Memory Guard reference for its scan-before-write pattern. The issue proposes either an ASI06 security note in ChatMemory documentation or a pluggable MemoryAdvisor validation interface, so scope and acceptance criteria need confirmation before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend-api-design, documentation, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100