Node.js Backend

Express, Hono, Fastify, Cloudflare Workers, serverless functions. What VibeCode QA checks and which tools power each analysis.

Quick Start

npx @vibecodeqa/cli

Set up CI + auto-fix

npx @vibecodeqa/cli init    # creates .github/workflows/vibecodeqa.yml
npx @vibecodeqa/cli fix     # auto-fix lint issues + show fix suggestions

Auto-detects: TypeScript/JavaScript, test runner, linter, package manager, monorepo workspaces.

Backend-Specific Checks

Security — Critical for backends

PatternCWEWhat It Catches
SQL InjectionCWE-89Template literals in query/prepare/execute calls
Command InjectionCWE-78child_process.exec with string args (prefer execFile)
SSRFCWE-918fetch() with user-supplied URLs
Path TraversalCWE-22readFile/writeFile with user input in path
Prototype PollutionCWE-1321Object.assign/spread from req.body/params
Weak CryptoCWE-330/328Math.random for tokens, MD5/SHA1 for hashing
localStorage in authCWE-922Storing tokens/secrets in client-side storage
Cookie SecurityCWE-1004/614document.cookie without HttpOnly, Set-Cookie without Secure

For deeper security analysis, add semgrep in CI/CD — it does proper data-flow tracking.

Error Handling — Essential for servers

PatternWhy It Matters
Empty catch blocksErrors silently disappear — users see broken behavior with no logs
Floating promisesUnhandled rejections crash Node.js 15+ in production
.catch(() => {})Swallowed errors — at least log them for debugging
JSON.parse without try-catchMalformed request body crashes the request handler
while(true) without breakInfinite loop freezes the event loop — all requests hang
process.exit() in library codeLibraries should throw, not exit — callers can't recover
Missing unhandledRejection handlerUncaught promise rejections crash the server in Node 15+

.env File Audit

The secrets checker verifies:

Recommended Tool Setup

# Core
pnpm add -D typescript @biomejs/biome vitest

# Security
brew install gitleaks              # secret detection (800+ patterns)
# pip install semgrep             # optional: deeper SAST in CI

# Supply chain
# pnpm add -D socket             # optional: pre-install malware detection

# Monitoring (detected by best-practices check)
pnpm add -D @sentry/node          # error tracking

Cloudflare Workers

Workers are detected via wrangler.toml. VibeCode QA:

Monorepo: Platform Repos

Common pattern: packages/api + packages/sdk + packages/cli. VibeCode QA:

CI Integration

# .github/workflows/quality.yml
name: Code Quality
on: [pull_request]
permissions: { contents: read }
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx @vibecodeqa/cli --ci --fail-under 70 --sarif
      - uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: .vibe-check/report.sarif

Home · Tool Decisions · TypeScript + React · Flutter Guide