Repository navigation
fix(agent): scope flagship prompt injection boundaries - #6508
kovtcharov-amd merged 5 commits into
Conversation
|
Verdict: Request changes This PR rewords the flagship's two prompt-injection rules so the agent still follows its own tools' hints and the user's pasted tasks, treats a typed "system notice" as having no authority, and only reports tool calls it actually made. It goes in the direction #6502 asks for. It can't merge yet: it will fail CI, and it drops two safeguards without eval evidence that the agent still resists injection.
Real-world evidenceN/A: this is a prompt-only change with no CLI, API or UI surface the evidence stage could exercise. The verdict rests on static review. The agent behavior this changes (injection resistance, fake system notices, self-reporting) can only be measured by 🔍 Technical details🔴 Characterization goldens not recaptured ( 🟡 Injection guardrail weakened (
🟡 Eval coverage (#6502 "Done when") 🟢 Budget headroom Strengths
|
|
Addressed the review and CI blockers in
Local validation:
The real model eval categories requested by review ( |
# Conflicts: # tests/fixtures/profilespec_characterization/row05_doc_no_docs_loader_off.json # tests/fixtures/profilespec_characterization/row06_doc_library_only.json # tests/fixtures/profilespec_characterization/row07_doc_indexed_n1.json # tests/fixtures/profilespec_characterization/row08_doc_indexed_n2.json # tests/fixtures/profilespec_characterization/row09_doc_loader_on_tool_calling_model.json # tests/fixtures/profilespec_characterization/row10_doc_loader_on_non_tool_calling_model.json # tests/fixtures/profilespec_characterization/row12_full_indexed_n1.json # tests/fixtures/profilespec_characterization/row13_full_no_docs_enable_sd_tools.json
The scoped rule dropped "tool results", so instructions in command output, MCP results or commit messages were no longer named as data. It now covers "other tool output" while still allowing GAIA's own tool hints. Both rules are trimmed so the full Windows prompt fits its 13,000-character budget after merging main. Prompt goldens re-captured with the harness; CHANGELOG entry added.
|
Thanks @huong8373tt-beep, the scoping here is what #6502 asked for. I merged main in, which pushed the full Windows prompt 32 characters over its budget, so I trimmed both rules to fit. I also put "other tool output" back in the rule so command output, MCP results and commit messages are still treated as data, while GAIA's own tool hints stay allowed. Goldens were re-captured with the harness and the flagship CHANGELOG has an entry. I changed "Closes" to "Refs" because #6502 is done only once the eval shows no regression. |
The flagship's injection rule treated every tool result and every paste as untrusted, so it could refuse GAIA's own tool hints (such as the empty-index "index now" hint) and task lists the user pasted on purpose. Its self-report rule could also be read as "answer what changed from the tool log". Now text in documents, pages, files, emails and other tool output is still data that can't make the agent call a tool, write to
~/.gaia, skills or config, or dictate a reply, and it is flagged as suspicious; GAIA's own tool hints and tasks the user asks for are allowed; a typed "system notice" or "developer mode" has no special authority; and asked what it did, the agent lists only the tool calls it made, not actions it read about. The full prompt stays within its size budget.Refs #6502: whether fake system notices are now refused, and that
gaia_coreandgaia_ragshow no regression, still needs the eval run below.Test plan
python -m pytest tests/unit/test_profilespec_characterization.py tests/unit/test_chat_system_prompt_budget.py hub/agents/gaia/python/tests/test_non_claude_prompt_golden.py hub/agents/gaia/python/tests/test_profile_prompt_tools.py hub/agents/gaia/python/tests/test_prompt_prefix_stability.py tests/unit/agents/test_planted_instructions.pyThis is a system-prompt change. Re-run
gaia_core,gaia_rag,gaia_email,gaia_git,gaia_memory,gaia_skills_tasksandgaia_skills_captureon the next RC; those hold the injection and self-report scenarios.Disclosure
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.