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

Commit 4a9b1f0

Browse files
authored
Add malicious package test for llamacpp (#907)
Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent f0c387f commit 4a9b1f0

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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)