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

Add malicious package test for llamacpp - #907

Merged
rdimitrov merged 1 commit into
mainfrom
llamacpp-malicious
Feb 5, 2025
Merged

rdimitrov merged 1 commit into
mainfrom
llamacpp-malicious

Conversation

@rdimitrov

Copy link
Copy Markdown
Member

The following adds malicious package test for llamacpp.

Related to: #904

@rdimitrov

Copy link
Copy Markdown
Member Author

Judging by the logs it seems CodeGate finds the package and adds it to the context, but for some reason the response does not take it into account. Will debug further.

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@rdimitrov

Copy link
Copy Markdown
Member Author

I had to update the malicious package test case for this and the rest of the local providers because of the capabilities of the 0.5B model we are using for these tests. It looks like it cannot handle the system prompts as precisely as we expect which results in non-deterministic responses, i.e. sometimes it includes example code snippets even though it says the package is malicious, sometimes it doesn't include the link to insights. To handle all of this decided to simplify the test and just check if CodeGate was able to flag it.

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good enough test for a small model

@rdimitrov
rdimitrov merged commit 4a9b1f0 into main Feb 5, 2025
@rdimitrov
rdimitrov deleted the llamacpp-malicious branch February 5, 2025 12:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants