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
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026