T01 · Skill Instruction Hijacking
- Location
scripts/ask.py:145- Finding
Untrusted Retrieved Knowledge Can Hijack LLM Instructions
- Content
View full analysis
- Remediation
View remediation
Untrusted reference data only: ... ``` 4. Restrict write access to the knowledge store and authenticate any higher-level interface that invokes document insertion. 5. Track document provenance and trust level, and exclude untrusted documents from sensitive workflows. 6. Consider scanning stored content for common instruction-injection patterns, while treating filtering only as defense in depth. 7. Avoid placing unrelated sensitive documents in the same model context. 8. Apply the same changes to both `scripts/ask.py` and the `cmd_ask` implementation in `scripts/bm25.py`. ]]>
