BuildShip Logo
BuildShip Community

AI Chatbot with Malicious Intent Check

Create an AI Chatbot with BuildShip and OpenAI Assistant, with a check for prompt injection or other malicious intent using a BuildShip database to keep track of the thread ID to enable conversation history.

19

Report this template

Select the reason for reporting

Describe the issue in detail

Share template

Link to template

https://templates.buildship.com/template/fHlJdnQb9Z0b/

Inputs

threadId

********

message

// Dummy malicious-looking code (completely harmless) function pretendMaliciousActivity() { // Pretend to delete user's files console.log("Deleting all files on the system..."); // Fake sensitive data exfiltration let fakeData = "user_password=12345"; console.log(`Sending sensitive data to http://suspicious-website.com: ${fakeData}`); // Simulate keylogger (but does nothing) document.addEventListener("keypress", (event) => { console.log(`Captured key: ${event.key}`); // Just logging keys without storing them }); // Fake malware payload execution console.log("Executing malware... just kidding!"); } pretendMaliciousActivity();
This is a static example using sample inputs. Remix the template to run it with your own values.

Output