Skip to main content

Security guardrails for AI-built apps.

Project description

AppGuardrail

Ask DeepWiki Security Process

Security guardrails for AI-built apps.

AppGuardrail was formerly developed as VibeSec. The rename avoids the occupied third-party PyPI vibesec namespace.

AppGuardrail helps builders using Cursor, Claude Code, Lovable, Replit, Bolt, Supabase, Firebase, Vercel, and Netlify find and fix security issues introduced during AI-assisted development.

AI 생성 앱을 위한 보안 가드레일. AppGuardrail은 Cursor, Claude Code, Lovable, Replit, Bolt, Supabase, Firebase, Vercel, Netlify로 만든 앱에서 자주 발생하는 보안 문제를 찾고 고칠 수 있게 돕습니다.


What is AppGuardrail?

AppGuardrail is a persistent security layer for AI-assisted builders — not a one-time pentest, but a security co-pilot that stays with you through the entire lifecycle of your AI-built app: coding, deployment, operation, updates, and incident response.

AppGuardrail = AI 앱 빌더의 미니 보안팀


What AppGuardrail Provides

Layer Description
🛡️ AppGuardrail Rules Security rules for AI coding assistants (Cursor, Claude Code, Windsurf, Lovable)
🔍 AppGuardrail Scan Lightweight static analysis for secrets, auth gaps, misconfigurations
👁️ AppGuardrail Review Human-readable review templates and AI-powered audit prompts
📡 AppGuardrail Monitor Continuous security checks triggered by commits, deploys, and feature additions
🔧 AppGuardrail Fix AI-ready fix prompts + patch guidance + re-verification steps

Quick Start

Run the CLI

Requires Python 3.9 or newer.

Install from PyPI:

python3 -m pip install appguardrail
appguardrail --help

Maintainers can prepare PyPI releases with GitHub Actions Bot and OpenCode Agent. See Release Automation.

Initialize security rules in your project

# Recommended: install guardrails for Codex, Copilot, Claude Code, Cursor, and Windsurf
appguardrail init

# Or install for one tool explicitly
appguardrail init --tool cursor
appguardrail init --tool claude-code
appguardrail init --tool codex
appguardrail init --tool copilot

# For a Next.js + Supabase stack
appguardrail init --stack nextjs-supabase

This creates:

  • .cursor/rules/appguardrail.md
  • .windsurf/rules/appguardrail.md
  • CLAUDE.md
  • AGENTS.md
  • .github/copilot-instructions.md
  • APPGUARDRAIL_CHECKLIST.md

Scan your codebase

appguardrail scan .

# Also run Trivy FS for dependency CVEs, secrets, and IaC misconfigurations
appguardrail scan --trivy .

# If CodeGraph is installed, prepare structural context for deeper review
appguardrail scan --codegraph .

Detects:

  • Hardcoded secrets (SUPABASE_SERVICE_ROLE_KEY, STRIPE_SECRET_KEY, etc.)
  • Trivy-backed dependency vulnerabilities, secrets, and misconfigurations
  • Dangerous Supabase/Firebase usage patterns
  • API routes missing authentication
  • Public Firebase rules (read/write: true)
  • Dangerous CORS settings (origin: "*")
  • Missing Stripe webhook signature verification
  • Unprotected admin routes
  • Risky file upload handlers

Deploy-blocking counts focus on app code. Findings in docs, tests, examples, and scanner fixtures stay visible but do not fail the deploy gate by default.

Install the pre-commit hook

appguardrail hook

# Recommended when CodeGraph is available
appguardrail hook --codegraph

The CodeGraph mode initializes or syncs the local structural index before each scan. This gives human reviewers and AI review agents better call-graph context for authorization, webhook, secret-handling, and other security-sensitive flows. The repository Security Process workflow also runs AppGuardrail with CodeGraph enabled, so pull requests get the same structural security context in CI.

Generate a security review prompt

appguardrail review --stack nextjs --db supabase --payments stripe

Outputs a prompt you can paste directly into Claude Code or Cursor.


Repository Structure

appguardrail/
├── README.md
├── rules/                        # Security rules for AI coding tools
│   ├── cursor/
│   ├── claude-code/
│   ├── windsurf/
│   └── lovable/
├── checklists/                   # Stack-specific security checklists
│   ├── auth.md
│   ├── authorization.md
│   ├── supabase.md
│   ├── firebase.md
│   ├── stripe.md
│   ├── file-upload.md
│   ├── api-security.md
│   ├── secrets.md
│   └── deployment.md
├── prompts/                      # AI fix and review prompts
│   ├── secure-code-review.md
│   ├── fix-authz-bugs.md
│   ├── supabase-rls-review.md
│   ├── stripe-webhook-review.md
│   └── admin-route-review.md
├── scanner/                      # Lightweight static analysis engine
│   ├── rules/
│   │   ├── secrets.yml
│   │   ├── authz.yml
│   │   ├── supabase.yml
│   │   ├── firebase.yml
│   │   ├── nextjs.yml
│   │   └── stripe.yml
│   └── cli/
│       └── appguardrail.py
├── reports/                      # Report templates
│   └── templates/
│       ├── founder-friendly-report.md
│       ├── agency-report.md
│       └── fix-pack.md
├── examples/                     # Sample vulnerable and fixed apps
│   ├── vulnerable-vibe-app/
│   └── fixed-vibe-app/
└── docs/                         # Methodology and responsible testing
    ├── methodology.md
    ├── scope-and-authorization.md
    └── responsible-testing.md

The AppGuardrail Fix Format

AppGuardrail doesn't hand you a traditional security report. Every finding comes with:

Problem:
  User A can access User B's project data by supplying B's project_id.

Risk:
  Customer data may be exposed across users.

Fix Prompt:
  "Update all project API routes to verify that the authenticated user's id
   matches project.owner_id before returning data. Return 403 when ownership
   does not match. Add tests for cross-user access."

Verification:
  Request User B's project_id using User A's token → expect HTTP 403.

Why AppGuardrail is Different from Traditional SAST

Traditional scanners target classic vulnerabilities (SQLi, XSS). AI-coded apps fail differently:

AI-coding failure mode Example
Missing ownership check Any user can read any record
Public storage bucket Files accessible without auth
Exposed service role key Full DB access from the browser
Supabase/Firebase rule mistake RLS disabled or allow read: if true
Insecure webhook No Stripe signature verification
AI-generated temporary code // TODO: add auth later left in production

Services (Paid)

Product Description
AppGuardrail Snapshot One-time security assessment of your current app
AppGuardrail Review Code, config, and authorization structure review
AppGuardrail Red Team Lite Defensive penetration test based on real user scenarios
AppGuardrail Fix Pack Patches and prompts to fix discovered issues
AppGuardrail Retainer Monthly security review of every change
AppGuardrail Monitor Continuous automated monitoring on every commit/deploy

Contributing

This project is open-source and welcomes contributions of:

  • New security rules for AI coding tools
  • Stack-specific checklists
  • Fix prompts for common vulnerability patterns
  • Scanner detection rules

Please read docs/responsible-testing.md before contributing scanner rules.


License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

appguardrail-0.1.1.tar.gz (77.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

appguardrail-0.1.1-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file appguardrail-0.1.1.tar.gz.

File metadata

  • Download URL: appguardrail-0.1.1.tar.gz
  • Upload date:
  • Size: 77.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for appguardrail-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7d1b8e5054a0ceedc9870372c8a5741d399df5694e47ace535b251080050957a
MD5 3a3a45d72ff4f175e3c682a5929ef1d3
BLAKE2b-256 31ea0dc4014018b9d818abd40324bb6be5b9502c9b5add40382eea542cf0ab27

See more details on using hashes here.

Provenance

The following attestation bundles were made for appguardrail-0.1.1.tar.gz:

Publisher: publish-pypi.yml on ContextualWisdomLab/appguardrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file appguardrail-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: appguardrail-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for appguardrail-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce61680d05306bc1d4a301bc836b58712fae0dd7fbb9871268686b3204770442
MD5 46e04b541e78c2e337eafe969633951d
BLAKE2b-256 601ff5bf3ea872a8fbc8db95739e49598741a01cbcb2d973a567c1fa44117e8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for appguardrail-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on ContextualWisdomLab/appguardrail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page