defending-llms-with-guardrails
Warn
Audited by Snyk on Jun 23, 2026
Risk Level: MEDIUM
Full Analysis
MEDIUM W011: Third-party content exposure detected (indirect prompt injection risk).
- Third-party content exposure detected (high risk: 0.85). Outsider free text can enter the LLM context via the runtime-loaded JSONL corpus (
scripts/agent.py→load_corpus()reads--inputprompts from an external file, thenrun_llamaguard()passes eachrow["prompt"]intotok.apply_chat_template(...)andmodel.generate(...)).
MEDIUM W012: Unverifiable external dependency detected (runtime URL that controls agent).
- Potentially malicious external URL detected (high risk: 0.90). The skill loads the Llama Guard model at runtime (AutoTokenizer.from_pretrained / AutoModelForCausalLM.from_pretrained with model_id "meta-llama/Llama-Guard-3-8B"), which downloads weights from https://huggingface.co/meta-llama/Llama-Guard-3-8B and those remote model artifacts directly control the safety-classification behavior used to block/allow prompts (required runtime dependency).
Issues (2)
W011
MEDIUMThird-party content exposure detected (indirect prompt injection risk).
W012
MEDIUMUnverifiable external dependency detected (runtime URL that controls agent).
Audit Metadata