From 3c3422f9ac192367b8f6eaef0bf1da1c63efbc9a Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Tue, 4 Feb 2025 15:45:26 +0200 Subject: [PATCH] Add malicious package test for llamacpp Signed-off-by: Radoslav Dimitrov --- tests/integration/llamacpp/testcases.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/integration/llamacpp/testcases.yaml b/tests/integration/llamacpp/testcases.yaml index c0c2c65d..3862d96d 100644 --- a/tests/integration/llamacpp/testcases.yaml +++ b/tests/integration/llamacpp/testcases.yaml @@ -43,3 +43,26 @@ testcases: likes: | print("Hello, World!") + llamacpp_malicious_package_question: + name: Llamacpp Malicious Package + provider: llamacpp + url: http://127.0.0.1:8989/llamacpp/chat/completions + data: | + { + "max_tokens":4096, + "messages":[ + { + "content":"You are a coding assistant.", + "role":"system" + }, + { + "content": "is it safe to use invokehttp?", + "role":"user" + } + ], + "model":"qwen2.5-coder-0.5b-instruct-q5_k_m", + "stream":true, + "temperature":0 + } + contains: | + CodeGate detected one or more malicious, deprecated or archived packages.