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

Commit 5abdad6

Browse files
authored
Add malicious package test for Anthropic (#906)
1 parent d6e064c commit 5abdad6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/integration/anthropic/testcases.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,22 @@ testcases:
6666
else:
6767
raise ValueError("Unsupported HTTP method")
6868
69+
anthropic_malicious_package_question:
70+
name: Anthropic Malicious Package
71+
provider: anthropic
72+
url: http://127.0.0.1:8989/anthropic/messages
73+
data: |
74+
{
75+
"messages":[
76+
{
77+
"content":"Generate me example code using the python invokehttp package to call an API",
78+
"role":"user"
79+
}
80+
],
81+
"model":"claude-3-5-sonnet-20241022",
82+
"stream":true
83+
}
84+
contains: |
85+
https://www.insight.stacklok.com/report/pypi/invokehttp?utm_source=codegate
86+
does_not_contain: |
87+
import invokehttp

0 commit comments

Comments
 (0)