~/ai_assets_directory_
Cursor Rule verified · tested by us 88 stars
cursor-rules-owasp.mdc

Cursor AI Project Rules for Modern Development

A security-first Cursor rule bundle covering PHP/Drupal, JavaScript/React/Vue and Python, with a dedicated OWASP Top 10 rule for each of the four vulnerability categories per language, plus a tag-based installer.

Overview

This bundle of Cursor rules focuses on enforcing coding standards and, above all, OWASP Top 10 security practices across PHP/Drupal, JavaScript/React/Vue and Python. Instead of one generic security rule, it ships one dedicated .mdc file per OWASP risk category (broken access control, injection, cryptographic failures, SSRF, insecure design, and more) for each language, plus a set of core rules for git commits, GitHub Actions, testing and documentation upkeep.

How it works

  1. The installer (install.php) offers Core, Web Stack, Python or All rule sets, or a tag-based selection (--tags "language:php standard:owasp-top10", --tags "framework:react", etc.).
  2. Core rules apply to any project (commit message standards, GitHub Actions, README maintenance, testing guidelines).
  3. Web Development rules split into Frontend, Backend (PHP/Drupal), Security (one .mdc per OWASP category per language) and DevOps/CI.
  4. Python rules mirror the same OWASP-category structure for Python codebases.
  5. Manual installation is also supported: clone the repo and copy .cursor/rules/* into your project.

Examples

# Install only JavaScript security rules
curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php \
  | php -- --tags "language:javascript category:security"

Best suited for teams that want OWASP Top 10 coverage baked into Cursor's suggestions for PHP/Drupal, JS/React/Vue or Python projects, not just generic style rules.

Installation

You need the Cursor editor, and PHP just to run the installer script (not for the rules content itself).

  1. Download and run the interactive installer:
    curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php -o install.php
    php install.php
    
    Pick Core, Web Stack, Python or All when prompted.
  2. Or skip the prompts and install by tag, for example only the PHP OWASP rules:
    curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php \
      | php -- --tags "language:php standard:owasp-top10"
    
  3. Or install manually: clone the repo and copy .cursor/rules/* into your project.
  4. Reopen the project in Cursor to confirm the rules auto-attach to matching files.

Related assets