Skip to content

security: wrap user free-text in <buyer_notes> XML delimiters#24

Open
HeetRanpura wants to merge 1 commit intoadvikdivekar:mainfrom
HeetRanpura:feature/prompt-injection-hardening
Open

security: wrap user free-text in <buyer_notes> XML delimiters#24
HeetRanpura wants to merge 1 commit intoadvikdivekar:mainfrom
HeetRanpura:feature/prompt-injection-hardening

Conversation

@HeetRanpura
Copy link
Copy Markdown
Contributor

  • Wrap behavioral questionnaire answer fields in <buyer_notes> tags in BehavioralAnalysisAgent._build_context()
  • Wrap user_message in <buyer_notes> tags in ConversationAgent._build_context()
  • Add SECURITY BOUNDARY instruction to BaseAgent.build_prompt() telling the LLM to treat <buyer_notes> content as data only, never as instructions
  • Defense-in-depth against prompt injection via user-controlled inputs

@HeetRanpura HeetRanpura force-pushed the feature/prompt-injection-hardening branch from dbcfa85 to 0057dac Compare April 23, 2026 20:52
- Wrap behavioral questionnaire answers in BehavioralAnalysisAgent._build_context()
- Wrap user_message in ConversationAgent._build_context()
- Add SECURITY BOUNDARY instruction to BaseAgent.build_prompt()
- Defense-in-depth against prompt injection via user-controlled inputs
@HeetRanpura HeetRanpura force-pushed the feature/prompt-injection-hardening branch from 0057dac to c4f683b Compare April 23, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant