Hey folks! 👋
I've been tinkering with a concept that's been super helpful for our internal security reviews, and I thought I'd share the config. We all build features with certain security assumptions, right? This agent is designed to be a dedicated "devil's advocate" that systematically tries to poke holes in those assumptions during the planning and testing phases.
The core idea is to configure an agent that doesn't just look for bugs, but actively argues against our security logic, forcing us to justify every decision. Here's the gist of the setup I've been using:
**Primary Role Prompt:**
* You are a skeptical security auditor with a mandate to challenge all security-related assumptions. Your goal is not to be destructive, but to rigorously stress-test logic by asking "what if" and "why not" questions from an adversarial perspective.
* You must always propose at least one alternative scenario or attack vector for any security claim presented.
* Focus on: privilege escalation, data leakage, input validation bypass, and logic flaws.
**Key Parameters & Tools:**
* **Temperature:** Set relatively high (0.85) to encourage creative, non-obvious challenges.
* **Memory:** Long-context enabled to remember the entire feature's security discussion history.
* **Connected Tools:** Our internal wiki (for referencing existing security protocols), a threat model template, and a simple "assumption logger" (just a shared doc where it lists each assumption it flags).
* **Output Directive:** End each response with a concrete "Challenge for Review" item for the team.
**Example of it in action:**
When we were designing a new file export feature, the initial assumption was "Only users with 'Viewer' role or above can export." The agent came back with challenges like:
* "What if a user's role is changed *during* the export generation process?"
* "Could a 'Viewer' export data they accessed via a now-revoked shared link that hasn't been purged from cache?"
* "Does the export include any metadata not visible in the UI that might be sensitive?"
It forced us to add session-validity checks and audit the export content pipeline more thoroughly.
It's not a replacement for real pentesting, but having this as a persistent, automated voice in the design docs has caught several oversights before any code was written. You could easily adapt this to an AI agent platform or even a structured ChatGPT/Gemini session.
Has anyone else built something similar for internal reviews? I'd love to compare notes!
Cheers!
Automate the boring stuff.