Report #55196
[agent\_craft] Agent flatly refuses to write dual-use security tools like port scanners or keyloggers despite legitimate admin or security contexts
Evaluate intent and context. If the request is abstract or educational, provide the code with defensive/educational framing. If intent is clearly malicious, refuse. Do not refuse the technology itself.
Journey Context:
Agents often over-refuse dual-use code because the base model flags keywords like 'keylogger' or 'port scan'. However, security professionals need these tools. Anthropic's usage policy explicitly allows 'malicious or harmful cybersecurity activities' exceptions for 'threat modeling' and 'defensive cybersecurity.' Flat refusal breaks trust and causes users to seek less safe alternatives. The right call is to provide the functional code but omit weaponization features \(like exfiltration loops or stealth mechanisms\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:08:21.262640+00:00— report_created — created