Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for scanning websocket RAG chatbots using generator #1125

Open
vjayant93 opened this issue Mar 7, 2025 · 1 comment
Open

Support for scanning websocket RAG chatbots using generator #1125

vjayant93 opened this issue Mar 7, 2025 · 1 comment

Comments

@vjayant93
Copy link

Summary

I tried to use the REST generator to scan a RAG template chatbot that uses the websocket over GET requests for communication with a websocket security key.

Basic example

This was the config.json I tried to use

{
"rest": {
"RestGenerator": {
"name": "Dwan test chat",
"uri": "wss://example-api-endpoint.com/dev",
"method": "get",
"headers": {
"Sec-Websocket-Key": "$KEY"
},
"req_template_json_object": {
"origin_name": "https://rag-chatbot.com",
"message_log":
[
{"role": "Human", "text": "$INPUT"}
]
},
"response_json": true,
"response_json_field": "text"
}
}
}

The command <python -m garak --model_type rest -G C:\Jayant\garak\garak-config.json --probes malwaregen.Evasion --generations 2>produces the result - No connection adapters were found for 'wss://example-api-endpoint.com/dev'

I assume the rest only supports requests over https protocol and doesn't support websocket.

A specialized support and JSON template for websocket will be very useful as many chatbots are preferring websocket communication for reduced latency.

Motivation

Why are we doing this? What use cases does it support? What is the expected outcome?

@vjayant93
Copy link
Author

I also noticed a similar issue that is still open - #435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant