You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: The prompt parameter is directly used in the messages array without any validation. This could lead to potential misuse or injection attacks if the input comes from an untrusted source.
Example Vulnerability: If a user injects malicious instructions into the prompt, the model could return unintended outputs (e.g. instructions for harmful actions).
Mitigation: Sanitize and validate the prompt input.
For example:
if (typeof prompt !== "string" || prompt.length > 1000) {
throw new Error("Invalid prompt input");
}
The text was updated successfully, but these errors were encountered:
Lack of Input Validation for
prompt
https://github.com/sendaifun/solana-agent-kit/blob/main/src/tools/agent/get_info.ts
Issue: The prompt parameter is directly used in the messages array without any validation. This could lead to potential misuse or injection attacks if the input comes from an untrusted source.
Example Vulnerability: If a user injects malicious instructions into the prompt, the model could return unintended outputs (e.g. instructions for harmful actions).
Mitigation: Sanitize and validate the prompt input.
For example:
The text was updated successfully, but these errors were encountered: