Verifies security before merge/deploy including OWASP Top 10, input validation, and auth checks. WARNING gate triggered during /own:done flow.
"Security isn't a feature you add later. It's a foundation you build on."
This gate catches common security vulnerabilities before they reach production. Issues don't BLOCK, but generate strong WARNINGS.
"Where does user input enter this feature?"
Looking for:
Follow-up if input exists:
"How is that input validated before it's used?"
"What data does this feature access? Who should be able to access it?"
Looking for:
Follow-up:
"How do you verify the requesting user is allowed to access this data?"
"Are there any secrets, tokens, or sensitive data involved? Where are they stored?"
Looking for:
Review the code for these common issues:
eval() or new Function() with user inputinnerHTML with unsanitized user inputā
SECURITY GATE: PASSED
Security considerations addressed:
- Input validation: ā
- Authorization checks: ā
- No exposed secrets: ā
Moving to the next gate...
ā ļø SECURITY GATE: WARNING
I found [X] security considerations to address:
**Issue 1: [Title]**
Location: `file.ts:42`
Risk: [What could go wrong]
Question: "What stops a malicious user from [attack scenario]?"
**Issue 2: [Title]**
Location: `file.ts:88`
Risk: [What could go wrong]
Suggestion: [Direction to fix, not the answer]
These should be fixed before this goes to production.
Would you like to address them now?
šØ SECURITY GATE: CRITICAL WARNING
This needs attention before proceeding:
**CRITICAL: [Issue]**
Location: `file.ts:42`
Risk: [Severity explanation - data breach, account takeover, etc.]
This is the kind of vulnerability that makes news headlines.
Let's fix this before anything else.
ā db.query(`SELECT * FROM users WHERE id = ${userId}`);
ā
db.query('SELECT * FROM users WHERE id = ?', [userId]);
ā element.innerHTML = userInput;
ā
element.textContent = userInput;
ā // Anyone can access any user's data
app.get('/users/:id', (req, res) => {
const user = await User.findById(req.params.id);
res.json(user);
});
ā
// Check ownership
app.get('/users/:id', (req, res) => {
const user = await User.findById(req.params.id);
if (user.id !== req.user.id) throw new ForbiddenError();
res.json(user);
});
ā const apiKey = 'sk-live-abc123';
ā
const apiKey = process.env.API_KEY;
Instead of pointing out the fix, ask:
<script>alert('XSS')</script> as my name, what happens?"| Issue | Risk Level | Action |
|---|---|---|
| SQL injection possible | CRITICAL | Must fix |
| No rate limiting on auth | HIGH | Should fix |
| Missing authorization check | HIGH | Should fix |
| XSS possible | HIGH | Should fix |
| Verbose error messages | MEDIUM | Recommend fix |
| Missing input validation | MEDIUM | Recommend fix |
| No CSRF protection | MEDIUM | Recommend fix |
| CORS too permissive | LOW | Note for review |