vibeaudit
56
C

jaywcjlove/tools

195 files scanned15 checks run0.2s
View on GitHub

Many many useful Web Online Tools For Web Developers & Programmers

Frameworks: react

3High
5Medium

high (3)

medium (5)

Mega Prompt

Combined remediation prompt for all 7 issue types. Paste this into your AI coding agent to fix everything.

I ran a production-readiness audit on my project and found the following issues. Please fix all of them: 1. I have a potential XSS vulnerability in website/src/components/Logo.tsx at line 83 using unsafe DOM manipulation. Please refactor to avoid dangerouslySetInnerHTML, innerHTML, eval(), and document.write(). If HTML rendering is truly needed, use a sanitization library like DOMPurify and sanitize all content before rendering. Affected: website/src/components/Logo.tsx:83, packages/components/src/Document.tsx:7. 2. My React/Next.js app is missing error boundaries. Please add a React error boundary component wrapping the main app content. This prevents the entire app from crashing when a component throws an error, and shows a user-friendly fallback UI instead. 3. I have an unhandled promise chain in packages/pdf-to-img/src/index.tsx at line 46 — a .then() without a .catch(). Please add error handling to this promise chain. Either add a .catch() handler, convert to async/await with try/catch, or handle the error appropriately for the context. 4. My React app has no global error handler for uncaught runtime errors. Please add window.addEventListener('error', ...) and window.addEventListener('unhandledrejection', ...) in the app entry point to catch and log unexpected errors. Better yet, integrate an error monitoring service like Sentry to track errors in production. 5. My project has no tests at all. Please set up a testing framework (vitest with @testing-library/react) and create initial tests for the most critical functionality. Start with: 1) Unit tests for core business logic, 2) Integration tests for API endpoints, 3) Component tests for key UI components. Set up a test script in package.json. 6. My project has no input validation library. Please install zod and add schema validation for all API endpoints and form inputs. Define schemas for request bodies, query parameters, and path parameters. Return clear validation error messages so clients know exactly what to fix. 7. My .gitignore is missing important entries. Please update .gitignore to exclude: node_modules/, .env, .env.*, dist/, build/, coverage/, .DS_Store, and any IDE-specific files.