/iblai-vibe-security-owasp-audit
Run a systematic source-code audit against the OWASP Top 10 (2021).
Ship concrete findings with file/line references and remediation.
Do NOT write exploits. Every finding ships with a fix.
Step 0: Scope the Audit
- Identify language, framework, and architecture.
- Map entry points — routes, API handlers, form processors.
- Trace data flows — user input -> processing -> storage -> output.
- Locate authentication and authorization boundaries.
Multi-organization B2B SaaS (the typical ibl.ai shape) makes A01 and permission-bypass paths the highest-leverage targets — sweep those first.
Audit Checklist
Walk each category. Grep for known sinks, then read flagged files to confirm.
A01: Broken Access Control
- Endpoints/routes missing authorization checks
- IDOR — user-controlled IDs without ownership verification
- Missing CSRF protections on state-changing requests
- Role checks enforced only on the frontend, not server-side
- Grep for: direct object references, missing auth middleware, user ID pulled from request params
A02: Cryptographic Failures
- Hardcoded secrets, API keys, or passwords in source
- Weak hashing (MD5, SHA1 for passwords instead of bcrypt/argon2/scrypt)
- Sensitive data in logs, URLs, or localStorage
- Missing encryption at rest or in transit
- Grep for:
password, secret, api_key, private_key, MD5, SHA1, base64
A03: Injection
- SQL injection: raw queries with string concatenation, missing parameterized queries
- NoSQL injection: unsanitized user input in MongoDB/Convex queries
- Command injection:
exec(), spawn(), system() with user input
- XSS: unescaped user input in HTML,
dangerouslySetInnerHTML, v-html
- Template injection: user input in template literals
- Grep for:
exec(, eval(, innerHTML, dangerouslySetInnerHTML, $where, raw SQL strings
A04: Insecure Design
- Authentication flows with logic flaws
- Missing rate limiting on sensitive endpoints (login, password reset, API)
- Business-logic constraints enforced only client-side
A05: Security Misconfiguration
- Debug mode enabled in production configs
- Overly permissive CORS (
Access-Control-Allow-Origin: *)
- Missing HTTP security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
- Default credentials or configs shipped
- Verbose error messages leaking stack traces or internals
A06: Vulnerable Components
- Run
npm audit (Node), pip audit (Python), or equivalent
- Check lock files for known-vulnerable versions
- Flag dependencies with critical CVEs
A07: Authentication Failures
- Weak password policies
- Session management issues (missing secure/httpOnly flags, no expiry, no rotation)
- Missing rate limiting on login (credential-stuffing risk)
- Broken password reset flows
A08: Data Integrity Failures
- Unsafe deserialization of user input
- Missing integrity checks on CI/CD pipelines
- No lockfile integrity verification (SRI hashes)
A09: Logging & Monitoring Failures
- Auth events not logged (login, failure, privilege changes)
- Sensitive data written to logs (passwords, tokens, PII)
- No alerting on suspicious patterns
A10: SSRF
- User-controlled URLs passed to server-side HTTP requests
- Missing URL validation and allowlisting
- Grep for:
fetch(, axios(, http.get(, urllib, requests.get( with user input
Report Format
For each finding:
#### [SEVERITY] A0X: [Title]
**File:** `path/to/file.ts:42`
**CWE:** CWE-XXX
**Description:** [What the vulnerability is and why it matters]
**Vulnerable Code:**
[code snippet]
**Remediation:**
[Fixed code snippet with explanation]
Wrap in an executive summary:
# Security Audit Report
## Project: [name]
## Stack: [technologies]
## Date: [date]
### Summary
- Total findings: X
- Critical: X | High: X | Medium: X | Low: X | Info: X
### Findings
[Individual findings as above]
### Prioritized Remediation Plan
1. [Critical fixes — immediate]
2. [High fixes — this week]
3. [Medium/Low — scheduled]
Boundaries
- Only audit code the user provides or points you to.
- Always include remediation — fixes, not exploits.
- Flag low-confidence findings as "Potential" rather than confirmed.
- If the codebase is too large for a full audit, prioritize auth, input handling, and data-access layers.
- Refuse requests to insert backdoors or weaken security controls.
References
OWASP Top 10 (2021), OWASP Code Review Guide, CWE Top 25
1---2name: iblai-vibe-security-owasp-audit3description: Audit application source code against the OWASP Top 10 vulnerability categories. Use when the user mentions 'OWASP,' 'security audit,' 'code security review,' 'vulnerability audit,' 'find vulnerabilities,' 'secure code review,' 'security review,' or wants to check their codebase for common security weaknesses.4---56# /iblai-vibe-security-owasp-audit78Run a systematic source-code audit against the OWASP Top 10 (2021).9Ship concrete findings with file/line references and remediation.1011Do NOT write exploits. Every finding ships with a fix.1213## Step 0: Scope the Audit14151. Identify language, framework, and architecture.162. Map entry points — routes, API handlers, form processors.173. Trace data flows — user input -> processing -> storage -> output.184. Locate authentication and authorization boundaries.1920Multi-organization B2B SaaS (the typical ibl.ai shape) makes A01 and permission-bypass paths the highest-leverage targets — sweep those first.2122## Audit Checklist2324Walk each category. Grep for known sinks, then read flagged files to confirm.2526### A01: Broken Access Control2728- Endpoints/routes missing authorization checks29- IDOR — user-controlled IDs without ownership verification30- Missing CSRF protections on state-changing requests31- Role checks enforced only on the frontend, not server-side32- Grep for: direct object references, missing auth middleware, user ID pulled from request params3334### A02: Cryptographic Failures3536- Hardcoded secrets, API keys, or passwords in source37- Weak hashing (MD5, SHA1 for passwords instead of bcrypt/argon2/scrypt)38- Sensitive data in logs, URLs, or localStorage39- Missing encryption at rest or in transit40- Grep for: `password`, `secret`, `api_key`, `private_key`, `MD5`, `SHA1`, `base64`4142### A03: Injection4344- **SQL injection:** raw queries with string concatenation, missing parameterized queries45- **NoSQL injection:** unsanitized user input in MongoDB/Convex queries46- **Command injection:** `exec()`, `spawn()`, `system()` with user input47- **XSS:** unescaped user input in HTML, `dangerouslySetInnerHTML`, `v-html`48- **Template injection:** user input in template literals49- Grep for: `exec(`, `eval(`, `innerHTML`, `dangerouslySetInnerHTML`, `$where`, raw SQL strings5051### A04: Insecure Design5253- Authentication flows with logic flaws54- Missing rate limiting on sensitive endpoints (login, password reset, API)55- Business-logic constraints enforced only client-side5657### A05: Security Misconfiguration5859- Debug mode enabled in production configs60- Overly permissive CORS (`Access-Control-Allow-Origin: *`)61- Missing HTTP security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)62- Default credentials or configs shipped63- Verbose error messages leaking stack traces or internals6465### A06: Vulnerable Components6667- Run `npm audit` (Node), `pip audit` (Python), or equivalent68- Check lock files for known-vulnerable versions69- Flag dependencies with critical CVEs7071### A07: Authentication Failures7273- Weak password policies74- Session management issues (missing secure/httpOnly flags, no expiry, no rotation)75- Missing rate limiting on login (credential-stuffing risk)76- Broken password reset flows7778### A08: Data Integrity Failures7980- Unsafe deserialization of user input81- Missing integrity checks on CI/CD pipelines82- No lockfile integrity verification (SRI hashes)8384### A09: Logging & Monitoring Failures8586- Auth events not logged (login, failure, privilege changes)87- Sensitive data written to logs (passwords, tokens, PII)88- No alerting on suspicious patterns8990### A10: SSRF9192- User-controlled URLs passed to server-side HTTP requests93- Missing URL validation and allowlisting94- Grep for: `fetch(`, `axios(`, `http.get(`, `urllib`, `requests.get(` with user input9596## Report Format9798For each finding:99100```markdown101#### [SEVERITY] A0X: [Title]102**File:** `path/to/file.ts:42`103**CWE:** CWE-XXX104105**Description:** [What the vulnerability is and why it matters]106107**Vulnerable Code:**108[code snippet]109110**Remediation:**111[Fixed code snippet with explanation]112```113114Wrap in an executive summary:115116```markdown117# Security Audit Report118## Project: [name]119## Stack: [technologies]120## Date: [date]121122### Summary123- Total findings: X124- Critical: X | High: X | Medium: X | Low: X | Info: X125126### Findings127[Individual findings as above]128129### Prioritized Remediation Plan1301. [Critical fixes — immediate]1312. [High fixes — this week]1323. [Medium/Low — scheduled]133```134135## Boundaries136137- Only audit code the user provides or points you to.138- Always include remediation — fixes, not exploits.139- Flag low-confidence findings as "Potential" rather than confirmed.140- If the codebase is too large for a full audit, prioritize auth, input handling, and data-access layers.141- Refuse requests to insert backdoors or weaken security controls.142143## References144145OWASP Top 10 (2021), OWASP Code Review Guide, CWE Top 25