Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 3c3422f

Browse files
committed
Add malicious package test for llamacpp
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
1 parent f0a34dc commit 3c3422f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

tests/integration/llamacpp/testcases.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,26 @@ testcases:
4343
likes: |
4444
print("Hello, World!")
4545
46+
llamacpp_malicious_package_question:
47+
name: Llamacpp Malicious Package
48+
provider: llamacpp
49+
url: http://127.0.0.1:8989/llamacpp/chat/completions
50+
data: |
51+
{
52+
"max_tokens":4096,
53+
"messages":[
54+
{
55+
"content":"You are a coding assistant.",
56+
"role":"system"
57+
},
58+
{
59+
"content": "is it safe to use invokehttp?",
60+
"role":"user"
61+
}
62+
],
63+
"model":"qwen2.5-coder-0.5b-instruct-q5_k_m",
64+
"stream":true,
65+
"temperature":0
66+
}
67+
contains: |
68+
CodeGate detected one or more malicious, deprecated or archived packages.

0 commit comments

Comments
 (0)