Skip to main content

● Security Rules

Every check. Categorized.

208 rules grouped into 16 categories and ranked by severity. Each finding ships with a plain-English reason and the fix.

Dedicated rules now span eleven languages — JavaScript, TypeScript, Python, PHP, Ruby, Go, Java, C#, Swift, Kotlin, and Rust — and 23 frameworks, from Next.js, Express, NestJS, Remix, Astro and SvelteKit to FastAPI, Django, Flask, Laravel, Symfony, Rails, Spring Boot, ASP.NET Core, Go web, Supabase, Firebase and Expo. Every scan also runs an AI review and secret detection on any language, and your report shows the coverage depth (Deep / Standard) for each language it found.

SECRETS · 30 RULES

Secrets

Hardcoded credentials, API keys, and tokens that should be in environment variables.

RuleSeverity

AWS access key ID

secrets/aws-access-key

critical

AWS secret access key

secrets/aws-secret-key

critical

Stripe secret key

secrets/stripe-secret-key

critical

GitHub personal access token

secrets/github-token

critical

OpenAI API key (legacy + sk-proj/svcacct/None)

secrets/openai-api-key

critical

Anthropic API key (sk-ant-...)

secrets/anthropic-api-key

critical

Google AI Studio / Gemini API key

secrets/google-ai-key

critical

xAI / Grok API key

secrets/grok-xai-key

critical

Groq API key (gsk_...)

secrets/groq-api-key

critical

Replicate API token (r8_...)

secrets/replicate-token

critical

Perplexity API key (pplx-...)

secrets/perplexity-api-key

high

Hugging Face access token (hf_...)

secrets/huggingface-token

high

Together AI API key

secrets/together-api-key

high

Mistral AI API key

secrets/mistral-api-key

high

Cohere API key

secrets/cohere-api-key

high

DeepSeek API key

secrets/deepseek-api-key

high

ElevenLabs API key

secrets/elevenlabs-api-key

high

Pinecone vector DB API key (pcsk_...)

secrets/pinecone-api-key

critical

Weaviate vector DB API key

secrets/weaviate-api-key

high

VS Code Marketplace publish token (VSCE_PAT)

secrets/vsce-publish-token

critical

Open VSX publish token

secrets/ovsx-publish-token

critical

Supabase service role key

secrets/supabase-service-role

critical

Private key (RSA, EC, etc.)

secrets/private-key

critical

JWT signing secret

secrets/jwt-secret

critical

Database connection string with credentials

secrets/database-url

critical

SendGrid API key

secrets/sendgrid-api-key

critical

Slack webhook URL

secrets/slack-webhook

critical

Generic API key pattern

secrets/generic-api-key

high

Hardcoded password

secrets/generic-password

high

Default credentials in code

secrets/default-credentials

critical

INJECTION · 41 RULES

Injection

SQL injection, command injection, and other code injection vectors.

RuleSeverity

SQL query built with string concatenation

injection/sql-string-concat

critical

User input passed to shell command

injection/command-injection

critical

Dynamic code execution with eval()

injection/eval-usage

critical

Unsanitized file path from user input

injection/path-traversal

high

Object merge with unvalidated user input

injection/prototype-pollution

high

SQL Query Built with String Formatting (Python)

injection/python-sql-formatting

critical

Unsafe YAML Deserialization (Python)

injection/python-unsafe-yaml-load

critical

OS Command Injection (Python)

injection/python-command-injection

critical

Code Execution via eval/exec (Python)

injection/python-eval-exec

critical

Unsafe Deserialization (Python)

injection/python-unsafe-deserialization

critical

Server-Side Request Forgery (Python)

injection/python-ssrf

high

Path Traversal (Python)

injection/python-path-traversal

high

PHP Object Injection via unserialize()

injection/php-object-injection

critical

OS Command Injection (PHP)

injection/php-command-injection

critical

SQL Injection via Interpolated Query (PHP)

injection/php-sql-injection

critical

Unrestricted File Upload (PHP)

injection/php-unrestricted-upload

high

Path Traversal (PHP)

injection/php-path-traversal

high

Server-Side Request Forgery (PHP curl)

injection/php-ssrf

high

SQL Injection via String Interpolation (Ruby/Rails)

injection/ruby-sql-injection

critical

OS Command Injection (Ruby)

injection/ruby-command-injection

critical

Unsafe Deserialization (Ruby)

injection/ruby-unsafe-deserialization

critical

Unsafe Reflection / Code Execution (Ruby)

injection/ruby-unsafe-reflection

critical

Mass Assignment (Ruby/Rails)

injection/ruby-mass-assignment

high

Server-Side Request Forgery (Ruby)

injection/ruby-ssrf

high

OS Command Injection (Go)

injection/go-command-injection

critical

SQL Injection via fmt.Sprintf (Go)

injection/go-sql-injection

critical

SQL Injection via String Concatenation (Java)

injection/java-sql-injection

critical

OS Command Injection (Java)

injection/java-command-injection

critical

Insecure Deserialization (Java)

injection/java-insecure-deserialization

critical

Path Traversal (Java)

injection/java-path-traversal

high

Server-Side Request Forgery (Java)

injection/java-ssrf

high

SQL Injection via Interpolated Raw SQL (C#)

injection/csharp-sql-injection

critical

Insecure Deserialization (C#)

injection/csharp-insecure-deserialization

critical

OS Command Injection (C#)

injection/csharp-command-injection

critical

SQL Injection via format! (Rust)

injection/rust-sql-injection

critical

OS Command Injection (Rust)

injection/rust-command-injection

critical

SQL Injection via String Interpolation (Swift)

injection/swift-sql-injection

critical

OS Command Injection (Swift)

injection/swift-command-injection

critical

SQL Injection via String Template (Kotlin)

injection/kotlin-sql-injection

critical

Path Traversal (Kotlin)

injection/kotlin-path-traversal

high

Insecure Deserialization (Kotlin/Jackson)

injection/kotlin-insecure-deserialization

critical

XSS · 9 RULES

XSS

Cross-site scripting vulnerabilities that allow attackers to inject client-side scripts.

RuleSeverity

Setting innerHTML with dynamic content

xss/innerhtml-usage

high

Using dangerouslySetInnerHTML in React

xss/dangerously-set-html

high

Using document.write() with dynamic content

xss/document-write

medium

Unescaped user input in template

xss/unescaped-output

medium

Reflected XSS via echo of User Input (PHP)

xss/php-reflected-echo

high

XSS via html_safe / raw (Ruby/Rails)

xss/ruby-html-safe

high

XSS via template.HTML Bypass (Go)

xss/go-template-html-bypass

high

XSS via Html.Raw / MarkupString (C#)

xss/csharp-razor-html-raw

high

WKWebView Script Injection (Swift)

xss/swift-webview-innerhtml

high

AUTH · 2 RULES

Auth

Authentication weaknesses that could let attackers bypass login or forge sessions.

RuleSeverity

JWT verified with hardcoded secret

auth/hardcoded-jwt-verify

high

CORS allows all origins (*)

auth/cors-wildcard

high

AUTHORIZATION · 5 RULES

Authorization

Missing or broken access control checks that could let users access resources they shouldn't.

RuleSeverity

Data access without ownership verification

authz/missing-ownership-check

high

Admin check only on frontend

authz/admin-check-frontend-only

critical

Delete endpoint without authentication

authz/delete-without-auth

critical

Role/permission taken from client request

authz/role-from-client

critical

Sequential IDs expose data to enumeration

authz/idor-sequential-id

medium

CRYPTO · 15 RULES

Crypto

Weak or insecure cryptographic implementations.

RuleSeverity

Using MD5 or SHA1 for security purposes

crypto/weak-algorithm

high

Math.random() used for security-sensitive values

crypto/math-random

high

Weak Password Hash (PHP md5/sha1)

crypto/php-weak-password-hash

high

JWT Signature Not Verified (Go)

crypto/go-jwt-parse-unverified

high

Weak Password Hash (Go md5/sha1)

crypto/go-weak-password-hash

high

Weak Cryptographic Algorithm (Java)

crypto/java-weak-algorithm

high

JWT Validation Disabled (C#)

crypto/csharp-jwt-validation-disabled

high

Weak Password Hash (C# MD5/SHA1)

crypto/csharp-weak-password-hash

high

JWT Signature Validation Disabled (Rust)

crypto/rust-jwt-validation-disabled

high

TLS Certificate Validation Disabled (Rust)

crypto/rust-tls-disabled

high

Weak Password Hash (Rust)

crypto/rust-weak-password-hash

high

TLS Validation Disabled (Swift)

crypto/swift-tls-disabled

high

Weak Hash (Swift Insecure.MD5/SHA1)

crypto/swift-weak-hash

medium

Trust-All TLS / Hostname Verifier (Kotlin)

crypto/kotlin-trust-all-tls

high

Insecure Random for a Security Value (Python)

crypto/python-weak-random

high

CONFIG · 11 RULES

Config

Configuration files that expose sensitive data or enable debug modes in production.

RuleSeverity

.env file committed to version control

config/env-file-committed

critical

Debug mode enabled in production config

config/debug-mode-enabled

medium

Insecure NextAuth.js configuration

config/insecure-nextauth-config

high

Agent workspace config committed to repo

config/agent-config-tracked

medium

TLS Certificate Verification Disabled (Go)

config/go-tls-skip-verify

high

XML External Entity (XXE) (Java)

config/java-xxe

high

Spring Security Misconfiguration (Java)

config/java-spring-permit-all

high

Sensitive Data in UserDefaults (Swift)

config/swift-insecure-storage

high

Cleartext HTTP Request (Swift)

config/swift-cleartext-http

medium

Android WebView JS Bridge on Untrusted Content (Kotlin)

config/kotlin-webview-jsbridge

high

XML External Entity (XXE) (Kotlin)

config/kotlin-xxe

high

PII · 3 RULES

PII

Personally identifiable information leaked through logs, storage, or API responses.

RuleSeverity

Email addresses logged to console

pii/email-in-logs

medium

Sensitive data in console.log

pii/console-log-sensitive

medium

Sensitive data stored without encryption

pii/unencrypted-storage

high

BAAS · 13 RULES

BaaS

Backend-as-a-Service misconfigurations for Supabase, Firebase, and similar platforms.

RuleSeverity

Supabase service key used on client

baas/supabase-service-key-client

critical

Supabase RLS policy bypassed

baas/supabase-rls-bypass

high

Supabase table without Row Level Security

baas/supabase-rls-disabled

critical

Supabase RLS policy allows all rows (USING true)

baas/supabase-rls-policy-allows-all

critical

Postgres anon role granted broad privileges

baas/supabase-anon-overgrant

high

Service-role key used in client-reachable route

baas/supabase-service-role-client-reachable

critical

Supabase RLS trusts a JWT claim it doesn't issue

baas/supabase-rls-policy-jwt-claim-not-verified

high

Anon key used for server-side mutations

baas/supabase-anon-key-server-mutation

high

Supabase storage bucket without access policies

baas/supabase-storage-no-policy

high

Direct query to auth.users table

baas/supabase-auth-users-direct

medium

Supabase auth with unvalidated redirect URL

baas/supabase-insecure-redirect

high

Firebase rules allow all reads/writes

baas/firebase-rules-allow-all

critical

Storage bucket publicly accessible

baas/storage-bucket-public

high

LLM / AI · 19 RULES

LLM / AI

Security issues specific to LLM-powered applications and AI integrations.

RuleSeverity

System prompt exposed to client

llm/system-prompt-exposed

high

Unsanitized user input in LLM prompt

llm/user-input-to-prompt

critical

AI API key hardcoded in source

llm/api-key-hardcoded

critical

AI API key leaks to browser via env prefix

llm/api-key-client-env

critical

LLM output used without validation

llm/no-output-validation

medium

LLM tool call executed without validation

llm/tool-call-no-validation

high

RAG retrieval vulnerable to prompt injection

llm/rag-injection

high

System prompt leaks through LLM output

llm/prompt-leak-via-output

medium

LLM output executed as code

llm/output-as-code

critical

MCP tool used without version pinning (rug-pull risk)

llm/mcp-tool-no-pinning

medium

LangChain RecursiveUrlLoader without SSRF guard (CVE-2026-27795)

llm/langchain-recursive-url-loader-unsafe

high

LangChain loads prompt template from untrusted path (CVE-2026-34070)

llm/langchain-load-prompt-from-path

high

Vercel AI SDK called with raw user input

llm/ai-sdk-input-as-prompt

high

AI agent run on PR title/body without sanitizing

llm/agent-runs-on-unsanitized-pr-content

critical

LLM call without max_tokens or cost limit

llm/no-max-tokens

medium

.env or secrets file read into LLM prompt

llm/env-file-read-into-prompt

critical

Code writes to .git/hooks (CVE-2026-26268 vector)

llm/agent-writes-to-git-hooks

high

Branch name or repo field passed to shell without sanitizing

llm/codex-branch-name-shell-injection

critical

OpenAI Assistants/Responses API without tool allowlist

llm/openai-assistant-tool-no-allowlist

high

COST & BILLING EXPOSURE · 3 RULES

Cost & Billing Exposure

Findings that put your wallet at risk, not just your data — missing usage caps, unbounded paid-API fan-out, and AI keys wired to the browser. Also see headers/rate-limit-missing-auth-route for signup abuse that runs up account-creation costs.

RuleSeverity

Vercel AI SDK call without an output token ceiling

cost/ai-sdk-no-token-cap

medium

Paid API called in a loop over unvalidated request data

cost/unbounded-paid-send-loop

high

AI SDK client configured to run in the browser

cost/ai-client-dangerously-allow-browser

critical

HEADERS · 13 RULES

Headers

Missing or misconfigured HTTP security headers and server-side request issues.

RuleSeverity

Missing Content Security Policy

headers/missing-csp

medium

Missing Strict-Transport-Security header

headers/missing-hsts

medium

Missing X-Frame-Options header

headers/missing-x-frame-options

medium

Server-side request to user-provided URL

headers/ssrf-unvalidated-url

high

Redirect to unvalidated URL

headers/open-redirect

high

Missing Referrer-Policy header

headers/missing-referrer-policy

low

Missing X-Content-Type-Options header

headers/missing-x-content-type-options

low

Missing Permissions-Policy header

headers/missing-permissions-policy

low

CORS allows credentials with wildcard origin

headers/cors-credentials-wildcard

critical

Cookie set without Secure/HttpOnly flags

headers/cookie-missing-secure

high

Auth route without rate limiting

headers/rate-limit-missing-auth-route

high

Server request may reach cloud metadata endpoint

headers/ssrf-cloud-metadata

critical

Server request may reach internal IP range

headers/ssrf-internal-ip

high

DEPENDENCIES · 9 RULES

Dependencies

Dependency risks from unpinned versions, typosquatting, and suspicious install scripts.

RuleSeverity

Unpinned dependency versions

deps/unpinned-versions

medium

Package name similar to popular package

deps/typosquatting-risk

medium

Package runs scripts on install

deps/postinstall-script

high

Potentially AI-hallucinated package name

deps/slopsquatting-risk

high

Remote code fetched and executed

deps/eval-fetched-code

critical

CDN script without Subresource Integrity

deps/cdn-no-integrity

medium

Known-malicious package (Cline 2.3.0, openclaw, postmark-mcp)

deps/known-malicious-package

critical

Likely AI-hallucinated package name (extended list)

deps/slopsquatting-risk-extended

high

No dependency lockfile in project

deps/no-lockfile

medium

CLIENT SECURITY · 4 RULES

Client Security

Client-side security patterns — token storage, error exposure, file uploads, and CSRF protection.

RuleSeverity

Auth token stored in localStorage (XSS risk)

client/jwt-in-localstorage

high

Error stack trace sent to client

client/error-stack-exposed

medium

File upload without type or size validation

client/file-upload-no-validation

high

State-changing endpoint without CSRF protection

client/missing-csrf-state-change

medium

AI AGENT CONFIG · 14 RULES

AI Agent Config

IDE, agent, and CI misconfig that turns prompt injection into RCE. Covers MCP servers, .cursorrules, .github/workflows, Cursor Auto-Run, and the Pwn Request family.

RuleSeverity

AI agent config file contains invisible Unicode

ai-agent/invisible-unicode-in-config

critical

MCP server runs an arbitrary shell command

ai-agent/mcp-stdio-shell-command

critical

MCP server points to a public HTTP URL

ai-agent/mcp-public-http-endpoint

high

Cursor Auto-Run / YOLO mode enabled

ai-agent/cursor-auto-run-enabled

high

Agent tool allowlist disabled or empty

ai-agent/agent-allowlist-disabled

high

Agent configured to auto-approve all tool calls

ai-agent/auto-approve-tools

high

CI agent reads PR title or body without sanitizing

ai-agent/ci-agent-untrusted-pr-input

critical

CI agent triggers on pull_request from forks

ai-agent/ci-agent-pull-request-fork

high

PR title or body interpolated into shell step

ai-agent/github-action-injection-from-pr

critical

Agent config path suggests workspace file was committed

ai-agent/agent-config-not-gitignored

low

GitHub Action uses pull_request_target + checks out PR code

ai-agent/pwn-request-checkout

critical

Workflow grants write-all permissions to AI agent job

ai-agent/workflow-write-all-permissions

high

JSON schema loaded from untrusted remote URL

ai-agent/jetbrains-junie-json-schema-remote

medium

.cursor/rules/*.mdc files present — review recommended

ai-agent/cursor-mdc-rules-directory-presence

low

LARAVEL (PHP FRAMEWORK) · 17 RULES

Laravel (PHP framework)

59 dedicated rules for Laravel — our deepest framework coverage. Catches the footguns that raw-PHP rules miss because Laravel abstracts them: Eloquent, Blade, middleware, Artisan, storage, and config. A sample of the 59 below.

RuleSeverity

Mass assignment — ::create/fill with request()->all()

injection/laravel-mass-assignment

critical

SQL injection — request input concatenated into whereRaw/selectRaw

injection/laravel-raw-sql-concat

critical

OS command injection — shell_exec / proc_open on request input

injection/laravel-os-command-request

critical

PHP object injection — unserialize on request input

deserialization/laravel-unserialize-request

critical

Template injection — Blade::render on a user string (SSTI)

injection/laravel-blade-render-request

critical

Hardcoded APP_KEY committed in source

secrets/laravel-hardcoded-app-key

critical

Auth middleware stripped with withoutMiddleware()

auth/laravel-without-middleware-auth

high

Gate::before closure returns true — authorization bypass

auth/laravel-gate-always-true

high

Blade unescaped output — {!! $var !!}

xss/laravel-blade-unescaped

high

Reflected XSS — response()->make with unescaped request input

xss/laravel-response-make-reflected

high

Path traversal — getClientOriginalName() used to build a storage path

file/laravel-store-user-filename

high

TLS verification disabled — Http::withoutVerifying()

ssrf/laravel-http-without-verifying

high

CORS allows any origin with credentials

misconfig/laravel-cors-credentials-wildcard

high

Insecure randomness — mt_rand / rand used for a token or OTP

crypto/laravel-insecure-random-token

high

CSRF protection disabled by wildcard exclusion

config/laravel-csrf-disabled

high

APP_DEBUG=true — stack traces exposed in production

config/laravel-debug-enabled

medium

Debug statement left in code — dd() / dump() / var_dump

misconfig/laravel-debug-statement-left

medium

False positive?

Suppress any rule by ID. It won't block CI or clutter your reports.

npx @ship-safe/cli ignore {rule-id}-r "reason"

See Configuration for details on .shipsafeignore.