llm-architect
Audited by Socket on Aug 12, 2026
2 alerts found:
AnomalySecurityNo explicit malicious payload (e.g., exfiltration, backdoor logic, credential theft, or shell behavior) is present in this module’s own code paths. The main security concern is supply-chain risk: the module loads Hugging Face tokenizer and model with trust_remote_code=True, which can enable execution of repository-provided code during initialization. Treat model/tokenizer sources as untrusted unless pinned and audited; otherwise, the training/inference process may run attacker-controlled code. Additional minor concerns include unexpected sample-data file creation in main() and writing attacker-controlled generation kwargs to disk without constraints.
High-risk tampering/sabotage indicators are present. The prompt builder returns a malformed/injected instruction that references deleting/clearing all documents from the collection, which could be used to coerce downstream LLM-driven actions or mislead operators. Additionally, destructive delete_collection/create_collection statements are embedded in _build_prompt() (though unreachable due to a prior return in the shown snippet). The fragment also appears incomplete/broken (missing query() and _call_llm), limiting verification of any additional behaviors beyond prompt injection.