# Vibe-Code Security & OWASP Auto-Fixer

> Zero-dependency Node.js CLI & skill that audits web/SaaS repos before deploy for leaked API keys (redacted), NEXT_PUBLIC_ secret exposure, missing OWASP CSP/HSTS headers, wildcard CORS & XSS sinks (0-100), auto-generates vercel.json, _headers, hardened .gitignore & .env.example, and verifies gains.

Vibe-Code Security & OWASP Auto-Fixer is a paid AI agent skill on Agensi by Zainal Salamun, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Zainal Salamun](https://www.agensi.io/creators/zainalsalamun)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/vibe-code-security-owasp-auto-fixer
- Tags: security, owasp, web-security, secrets, devops, nodejs

## About this skill

Shipping AI-generated code or rapid prototypes often leads to hardcoded secrets, missing headers, and permissive CORS. This skill provides a deterministic audit and auto-fix workflow to harden web repositories before they hit production.

### What it does
- **Deterministic Auditing** scans for leaked API keys, private PEM blocks, and database credentials with automatic redaction.
- **Environment Hygiene** checks `.gitignore` coverage and identifies server-side secrets leaked via `NEXT_PUBLIC_` or `VITE_` prefixes.
- **OWASP Header Injection** generates production-ready `vercel.json` or `_headers` files with CSP, HSTS, and X-Frame-Options.
- **Code Patching** identifies and fixes XSS sinks like `innerHTML`, `eval()`, and insecure cookie flags.
- **Verification Reporting** compares before and after states to calculate an exact security score delta out of 100 points.

### How it works
1. **Baseline Audit** runs a local scan to generate a JSON and Markdown report scoring six security pillars.
2. **Fix Generation** creates hardened configuration files and a `SECURITY_FIX_PLAN.md` for review.
3. **Idempotent Patching** applies safe code changes to remove hardcoded fallbacks and insecure TLS settings.
4. **Final Verification** re-scans the directory to confirm score gains and list remaining manual refactors.

### Frameworks & tools
This skill works with Next.js, React, Vite, Express, Node.js, and Astro. It uses local Node.js scripts with zero external npm dependencies or API calls.

### Why this beats prompting it yourself
Generic prompts often miss specific framework leaks like `NEXT_PUBLIC_` or provide invalid CSP syntax. This skill uses a structured rubric and local scripts to ensure every audit is consistent, private, and measurable.

### Use cases
- Auditing a fresh AI-generated repository for hardcoded "dev-only" secrets.
- Generating production security headers for Vercel or Cloudflare Pages deployments.
- Cleaning up a repository's `.gitignore` and `.env.example` before a public release.
- Verifying that a security refactor actually improved the codebase score.

### Known limitations
Requires Node.js 18 or higher. Manual refactoring is still required for complex issues like parameterized SQL queries or full key rotation in Git history.

## Requires

- Node.js
- Git

## Known limitations

Requires Node.js 18+. Cannot automatically rotate keys in Git history. Complex logic like SQL injection requires manual refactoring after the audit flags the sink.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Vibe-Code Security & OWASP Auto-Fixer skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill help secure my web application?

This skill performs a three step workflow that includes a deterministic security audit, automatic generation of hardened configuration files, and idempotent code patching to fix vulnerabilities like XSS sinks and insecure headers. Finally, it runs a verification scan to calculate the exact improvement in your security score.

### What do I need to have ready to use this skill?

You simply need a repository using Next.js, React, Vite, Express, Node.js, or Astro and an environment running Node.js 18 or higher. The skill uses local scripts with zero external npm dependencies and makes no external API calls, ensuring your code stays private.

### What files and reports will I receive after the audit?

The skill generates a JSON and Markdown security report scoring your app across six pillars, production ready configuration files like vercel.json or _headers, a hardened .gitignore, and a .env.example file. It also provides a SECURITY_FIX_PLAN.md so you can review all proposed changes before they are applied.

### Are there any security issues the skill cannot fix automatically?

While it fixes many configuration and code issues, it cannot perform complex manual tasks like full key rotation in Git history or refactoring code for parameterized SQL queries. If the skill detects a leaked credential, it will warn you to revoke and rotate that key manually.

### How should I tell my agent to start the security process?

You can ask your agent to run a pre-launch security audit on your directory or request it to generate OWASP security headers for your Vercel or Cloudflare deployment. You can also specifically ask it to check for leaked API keys or to verify the security score gains after a refactor.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
