Introducing a new way to review your PRs.

Read the announcement

raroque / vibe-security-skill

Agent skill that audits vibe-coded apps for common security vulnerabilities introduced by AI coding assistants

View on GitHub

15 documents · Updated Oct 30, 2026

docs / application-resilience

Application resilience guidance

Application resilience guidance protects interfaces and deployments from abuse, accidental exposure, and unsafe change. It joins request controls with safe production settings so that the application can keep serving valid users without exhausting services or revealing sensitive system data.

Resilience scope

Resilience starts at the public interface and continues through the services and environments that support it. The review checks both deliberate misuse and operational mistakes because either can reduce availability or widen access to protected systems.

The guidance centers on two linked areas:

  • Request and service protection: Limit costly or repeatable actions before they consume compute, messaging, file-processing, or provider capacity. See Rate limiting security.
  • Release and runtime protection: Keep production, preview, and development environments separate. Remove debug exposure and apply browser and cross-origin controls before release. See Deployment security.

Abuse resistance

Abuse resistance keeps a caller from turning a useful interface into a password-guessing tool, spam relay, denial-of-service path, or uncontrolled spending path. Controls must cover both the user identity and the network source because either signal alone is easy to bypass.

Rate limits are most important on authentication, AI, email or SMS, file-processing, and webhook-like interfaces. Counters must live in a trusted control point rather than a public data table that a caller can reset. Usage quotas, provider spending caps, billing alerts, and anomaly monitoring extend the same protection to downstream services.

The detailed review rules and bypass checks are in Rate limiting security.

Environment safety

Environment safety prevents a release or preview from exposing internal details or gaining access to live systems by mistake. Each environment needs its own keys and data boundary, while production must avoid diagnostic settings that reveal stack traces, paths, source, or configuration.

Preview deployments require special care because their URLs may be shared outside the team. They must use test or staging credentials rather than production API keys, database credentials, or payment keys. Production responses also need restrictive security headers and a cross-origin policy that names approved domains instead of allowing every origin.

The release checks and runtime controls are in Deployment security.

Resilience review flow

This flow shows how an interface request is protected from abuse and how the resulting application state is carried into a safe release.

flowchart LR
    A[Incoming request] --> B[Trusted abuse controls]
    B -->|Allowed| C[Application service]
    B -->|Rejected| D[Safe failure response]
    C --> E[Protected dependent services]
    E --> F[Environment and release checks]
    F --> G[Controlled deployment]

The request path must reject excessive use before it reaches an expensive operation. The release path must then ensure that the running environment does not undo that protection through exposed diagnostics, mixed credentials, weak headers, or broad cross-origin access.

Security boundaries

Resilience depends on boundaries that callers cannot change. A public request may identify a user or source, but it must not control its own quota, select live credentials, or decide which environment is trusted.

BoundaryRequired protectionFailure prevented
Caller to interfacePer-IP and per-user limits at a trusted layerBrute force, account creation abuse, and source rotation
Interface to dependent serviceUsage quotas and hard provider limitsCost exhaustion and downstream overload
Environment to environmentSeparate keys, data, and provider accountsPreview or development access to live systems
Runtime to browserRestrictive headers and approved originsScript injection, framing, unsafe content handling, and credentialed cross-origin access

Change checklist

When these files or sections are changed, remember to consider these:

  • When a new costly or repeatable interface is added, place it under both user and source limits before it can call a dependent provider.
  • When rate-limit storage changes, confirm that callers cannot read or reset counters through a public data interface.
  • When a deployment target or environment changes, map its credentials to test or live systems explicitly and keep preview access away from production secrets.
  • When response or proxy settings change, recheck the security headers and the allowed-origin list together. Credentialed requests must not use a wildcard origin.
  • When production diagnostics change, verify that debug pages, source maps, stack traces, verbose logs, and repository metadata remain inaccessible.

Important failure modes

TriggerConsequenceGuard
Rate counters are stored in a public tableA caller resets its own limit and continues abuseUse a trusted private store, middleware, or gateway
Only IP or only user limits are appliedAttackers bypass controls by rotating addresses or accountsCombine per-IP and per-user limits
A preview uses production credentialsAn exposed preview can read or change live dataUse environment-specific test or staging credentials
Debug mode or source maps remain enabled in productionErrors or client tools reveal internal code and settingsDisable debug output and production source maps
Authenticated endpoints allow every originA foreign site can make credentialed requestsAllow only approved origins and avoid wildcard CORS

Key files

FileWhy to read it
vibe-security/SKILL.mdDefines the security review sequence and places resilience checks beside identity, data, payment, mobile, and AI concerns.
vibe-security/…/rate-limiting.mdDefines the abuse targets, trusted counter locations, combined caller limits, and billing safeguards.
vibe-security/…/deployment.mdDefines production settings, environment separation, response headers, release checks, and cross-origin rules.
vibe-security/…/secrets-and-env.mdExplains which environment values may be public and which must remain server-side when environments are configured.