Cyber Risks · PortSwigger Research

Best practices for writing AI custom actions - Port Swigger

Summary: PortSwigger published best practices for building AI-powered custom actions with its Montoya API, advising developers to treat raw AI output as untrusted and HTML-encode it before showing it to users. The guidance also recommends sending only essential in-scope data, stripping authentication tokens and session cookies, using structured JSON instead of free text to limit prompt injection, and keeping temperature between 0.0 and 0.8 for technical tasks, against a default of 0.5.

Bottom line: The article treats AI output as an injection vector into the tools security teams use to test applications, so an unescaped response or a leaked session cookie in a prompt is a direct path into the testing workflow itself.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related