# Rules Every rule safe-anything checks, generated from `safe-anything --list-rules --json`. Each links to the OWASP page that explains the problem and the fix. ## Code (24) | Rule | Severity | CWE | OWASP | What it means | | --- | --- | --- | --- | --- | | [`code.xss-inner-html`](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html) | medium | [CWE-79](https://cwe.mitre.org/data/definitions/79.html) | A03:2021 Injection | HTML is written from a variable; if it holds user input, scripts run in the page (XSS). | | [`code.xss-document-write`](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html) | medium | [CWE-79](https://cwe.mitre.org/data/definitions/79.html) | A03:2021 Injection | document.write puts raw HTML into the page; with user input this is XSS. | | [`code.xss-dangerously-set-inner-html`](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html) | medium | [CWE-79](https://cwe.mitre.org/data/definitions/79.html) | A03:2021 Injection | dangerouslySetInnerHTML renders raw HTML; with user content this is XSS. | | [`code.xss-v-html`](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html) | medium | [CWE-79](https://cwe.mitre.org/data/definitions/79.html) | A03:2021 Injection | Raw HTML is rendered from a variable; with user content this is XSS. | | [`code.xss-reflected`](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html) | medium | [CWE-79](https://cwe.mitre.org/data/definitions/79.html) | A03:2021 Injection | Request input is printed into the page without escaping (reflected XSS). | | [`code.xss-raw-html`](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html) | medium | [CWE-79](https://cwe.mitre.org/data/definitions/79.html) | A03:2021 Injection | A value is marked as safe HTML, so Rails will not escape it (XSS if it holds user input). | | [`code.eval`](https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_Cheat_Sheet.html) | high | [CWE-95](https://cwe.mitre.org/data/definitions/95.html) | A03:2021 Injection | Code is evaluated from a string at run time; if any part comes from input, an attacker can run code. | | [`code.command-injection`](https://cheatsheetseries.owasp.org/cheatsheets/OS_Command_Injection_Defense_Cheat_Sheet.html) | high | [CWE-78](https://cwe.mitre.org/data/definitions/78.html) | A03:2021 Injection | A shell command is built from variables, so input can run other commands (command injection). | | [`code.sql-injection`](https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html) | high | [CWE-89](https://cwe.mitre.org/data/definitions/89.html) | A03:2021 Injection | A SQL query is built from variables by string formatting, so input can change the query (SQL injection). | | [`code.path-traversal`](https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html) | high | [CWE-22](https://cwe.mitre.org/data/definitions/22.html) | A01:2021 Broken Access Control | A file path comes straight from the request, so ../ can reach any file on the server (path traversal). | | [`code.ssrf`](https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html) | high | [CWE-918](https://cwe.mitre.org/data/definitions/918.html) | A10:2021 Server-Side Request Forgery | The server fetches a URL taken from the request, so users can reach internal services (SSRF). | | [`code.tls-verify-off`](https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html) | medium | [CWE-295](https://cwe.mitre.org/data/definitions/295.html) | A02:2021 Cryptographic Failures | TLS certificate checks are turned off, so anyone on the network can read or change the traffic. | | [`code.weak-hash`](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html) | low | [CWE-328](https://cwe.mitre.org/data/definitions/328.html) | A02:2021 Cryptographic Failures | MD5 and SHA-1 are broken for security use (collisions; too fast for passwords). | | [`code.weak-cipher`](https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html) | medium | [CWE-327](https://cwe.mitre.org/data/definitions/327.html) | A02:2021 Cryptographic Failures | A weak cipher or ECB mode is used; ECB leaks patterns and DES/RC4 are broken. | | [`code.insecure-cookie`](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html) | low | [CWE-614](https://cwe.mitre.org/data/definitions/614.html) | A05:2021 Security Misconfiguration | A cookie is set without HttpOnly or Secure, so scripts or plain HTTP can read it. | | [`code.jwt-none`](https://cheatsheetseries.owasp.org/cheatsheets/JSON_Web_Token_Cheat_Sheet.html) | high | [CWE-347](https://cwe.mitre.org/data/definitions/347.html) | A07:2021 Identification and Authentication Failures | JWT signatures are not checked, so anyone can forge a token. | | [`code.cors-wildcard`](https://cheatsheetseries.owasp.org/cheatsheets/HTML5_Security_Cheat_Sheet.html) | low | [CWE-942](https://cwe.mitre.org/data/definitions/942.html) | A05:2021 Security Misconfiguration | CORS allows every origin. Fine for public data; risky for anything behind a login. | | [`code.insecure-random`](https://cheatsheetseries.owasp.org/cheatsheets/Cryptographic_Storage_Cheat_Sheet.html) | medium | [CWE-338](https://cwe.mitre.org/data/definitions/338.html) | A02:2021 Cryptographic Failures | A secret value is made with a non-cryptographic random generator, which can be predicted. | | [`code.debug-enabled`](https://cheatsheetseries.owasp.org/cheatsheets/Error_Handling_Cheat_Sheet.html) | medium | [CWE-489](https://cwe.mitre.org/data/definitions/489.html) | A05:2021 Security Misconfiguration | The app runs in debug mode; the debugger can run code and leaks internals. | | [`code.template-injection`](https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_Cheat_Sheet.html) | high | [CWE-1336](https://cwe.mitre.org/data/definitions/1336.html) | A03:2021 Injection | A template is built from request input, so users can run code in the template engine (SSTI). | | [`code.unsafe-deserialization`](https://cheatsheetseries.owasp.org/cheatsheets/Deserialization_Cheat_Sheet.html) | high | [CWE-502](https://cwe.mitre.org/data/definitions/502.html) | A08:2021 Software and Data Integrity Failures | Untrusted data is deserialized with a format that can run code or build arbitrary objects. | | [`code.file-inclusion`](https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html) | critical | [CWE-22](https://cwe.mitre.org/data/definitions/22.html) | A01:2021 Broken Access Control | A file to include comes from the request, so attackers can load other files or remote code. | | [`code.sql-grant-all`](https://cheatsheetseries.owasp.org/cheatsheets/Database_Security_Cheat_Sheet.html) | medium | [CWE-250](https://cwe.mitre.org/data/definitions/250.html) | A01:2021 Broken Access Control | A database user gets every privilege on every database. | | [`code.sql-plaintext-password`](https://cheatsheetseries.owasp.org/cheatsheets/Database_Security_Cheat_Sheet.html) | medium | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A database password is written in a SQL file. | ## Secrets (17) | Rule | Severity | CWE | OWASP | What it means | | --- | --- | --- | --- | --- | | [`secret.aws-access-key`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | An AWS access key id is written in the file. | | [`secret.github-token`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A GitHub token is written in the file. | | [`secret.gitlab-token`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A GitLab personal access token is written in the file. | | [`secret.slack-token`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | high | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A Slack token is written in the file. | | [`secret.stripe-live-key`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A live Stripe secret key is written in the file. | | [`secret.npm-token`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | An npm access token is written in the file. | | [`secret.huggingface-token`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A Hugging Face access token is written in the file. | | [`secret.anthropic-key`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | An Anthropic API key is written in the file. | | [`secret.openai-key`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | critical | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | An OpenAI API key is written in the file. | | [`secret.google-api-key`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | high | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A Google API key is written in the file. | | [`secret.private-key`](https://cheatsheetseries.owasp.org/cheatsheets/Key_Management_Cheat_Sheet.html) | critical | [CWE-321](https://cwe.mitre.org/data/definitions/321.html) | A02:2021 Cryptographic Failures | A private key is stored in the repository. | | [`secret.hardcoded-password`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | high | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A password or secret is written in the code. | | [`secret.url-credentials`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | high | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A connection string carries a username and password. | | [`secret.env-file`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | medium | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | A .env file with values is in the repository; these usually hold real secrets. | | [`secret.env-example-value`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | high | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A07:2021 Identification and Authentication Failures | An example env file holds what looks like a real secret value; example files are meant to be committed and shared. | | [`secret.public-env-secret`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | high | [CWE-200](https://cwe.mitre.org/data/definitions/200.html) | A05:2021 Security Misconfiguration | A secret is given a public env prefix, so the build ships it inside the client bundle where anyone can read it. | | [`secret.env-not-ignored`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | medium | [CWE-538](https://cwe.mitre.org/data/definitions/538.html) | A05:2021 Security Misconfiguration | The project has env files but .gitignore does not exclude .env, so real secrets are one git add away from the repository. | ## Agent setups (9) | Rule | Severity | CWE | OWASP | What it means | | --- | --- | --- | --- | --- | | [`agent.bypass-permissions`](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/) | high | [CWE-250](https://cwe.mitre.org/data/definitions/250.html) | LLM06:2025 Excessive Agency | The agent is set to run every action without asking, so one bad instruction can do anything on this machine. | | [`agent.unrestricted-shell`](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/) | high | [CWE-250](https://cwe.mitre.org/data/definitions/250.html) | LLM06:2025 Excessive Agency | Every shell command is pre-approved, so the agent can run anything without asking. | | [`agent.remote-script`](https://genai.owasp.org/llmrisk/llm032025-supply-chain/) | high | [CWE-494](https://cwe.mitre.org/data/definitions/494.html) | LLM03:2025 Supply Chain | A script is downloaded and run straight from the internet; whoever controls that URL controls this machine. | | [`agent.prompt-injection`](https://genai.owasp.org/llmrisk/llm01-prompt-injection/) | medium | [CWE-1427](https://cwe.mitre.org/data/definitions/1427.html) | LLM01:2025 Prompt Injection | Instruction text tells the agent to override its rules or hide actions from the user (prompt injection). | | [`agent.sensitive-file-access`](https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/) | high | [CWE-200](https://cwe.mitre.org/data/definitions/200.html) | LLM02:2025 Sensitive Information Disclosure | Agent instructions read credential files such as SSH keys or cloud credentials. | | [`agent.hidden-unicode`](https://genai.owasp.org/llmrisk/llm01-prompt-injection/) | high | [CWE-1427](https://cwe.mitre.org/data/definitions/1427.html) | LLM01:2025 Prompt Injection | Invisible Unicode characters are in agent instructions; they can hide text the agent reads but you don't see. | | [`agent.mcp-unpinned`](https://genai.owasp.org/llmrisk/llm032025-supply-chain/) | medium | [CWE-1357](https://cwe.mitre.org/data/definitions/1357.html) | LLM03:2025 Supply Chain | An MCP server is started from a package or image with no pinned version. | | [`agent.mcp-plaintext-secret`](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) | high | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | LLM02:2025 Sensitive Information Disclosure | An MCP server's token or key is written in plain text in the config. | | [`agent.mcp-insecure-url`](https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html) | high | [CWE-319](https://cwe.mitre.org/data/definitions/319.html) | A02:2021 Cryptographic Failures | A remote MCP server is reached over plain HTTP. | ## Mobile (9) | Rule | Severity | CWE | OWASP | What it means | | --- | --- | --- | --- | --- | | [`mobile.android-debuggable`](https://mas.owasp.org/MASVS/11-MASVS-RESILIENCE/) | high | [CWE-489](https://cwe.mitre.org/data/definitions/489.html) | MASVS-RESILIENCE | The app is debuggable; anyone with the APK can attach a debugger and read its memory. | | [`mobile.android-allow-backup`](https://mas.owasp.org/MASVS/05-MASVS-STORAGE/) | low | [CWE-922](https://cwe.mitre.org/data/definitions/922.html) | MASVS-STORAGE | App data can be copied off the device with adb backup. | | [`mobile.android-cleartext`](https://mas.owasp.org/MASVS/08-MASVS-NETWORK/) | medium | [CWE-319](https://cwe.mitre.org/data/definitions/319.html) | MASVS-NETWORK | Plain HTTP traffic is allowed, so data can be read or changed on the network. | | [`mobile.android-exported-provider`](https://mas.owasp.org/MASVS/09-MASVS-PLATFORM/) | high | [CWE-926](https://cwe.mitre.org/data/definitions/926.html) | MASVS-PLATFORM | A content provider is exported with no permission, so any app on the device can read its data. | | [`mobile.webview-js-bridge`](https://mas.owasp.org/MASVS/09-MASVS-PLATFORM/) | medium | [CWE-749](https://cwe.mitre.org/data/definitions/749.html) | MASVS-PLATFORM | Native methods are exposed to JavaScript in a WebView; any page it loads can call them. | | [`mobile.webview-file-access`](https://mas.owasp.org/MASVS/09-MASVS-PLATFORM/) | high | [CWE-749](https://cwe.mitre.org/data/definitions/749.html) | MASVS-PLATFORM | A WebView lets file:// pages read other files and origins. | | [`mobile.world-readable`](https://mas.owasp.org/MASVS/05-MASVS-STORAGE/) | high | [CWE-922](https://cwe.mitre.org/data/definitions/922.html) | MASVS-STORAGE | A file or preferences store is readable or writable by every app on the device. | | [`mobile.ios-ats-disabled`](https://mas.owasp.org/MASVS/08-MASVS-NETWORK/) | high | [CWE-319](https://cwe.mitre.org/data/definitions/319.html) | MASVS-NETWORK | App Transport Security is off, so the app may load anything over plain HTTP. | | [`mobile.insecure-storage`](https://mas.owasp.org/MASVS/05-MASVS-STORAGE/) | medium | [CWE-922](https://cwe.mitre.org/data/definitions/922.html) | MASVS-STORAGE | A token or password is saved in plain storage that other code, backups or XSS can read. | ## Config (15) | Rule | Severity | CWE | OWASP | What it means | | --- | --- | --- | --- | --- | | [`config.remote-script`](https://cheatsheetseries.owasp.org/cheatsheets/Software_Supply_Chain_Security_Cheat_Sheet.html) | medium | [CWE-494](https://cwe.mitre.org/data/definitions/494.html) | A08:2021 Software and Data Integrity Failures | A script is downloaded and piped straight into a shell, with no pinning or checksum. | | [`config.docker-unpinned-image`](https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html) | low | [CWE-1357](https://cwe.mitre.org/data/definitions/1357.html) | A06:2021 Vulnerable and Outdated Components | The base image has no version tag (or uses latest), so builds change without notice. | | [`config.docker-secret-env`](https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html) | high | [CWE-798](https://cwe.mitre.org/data/definitions/798.html) | A05:2021 Security Misconfiguration | A secret is baked into the image; anyone who pulls it can read it from the layers. | | [`config.docker-add-url`](https://cheatsheetseries.owasp.org/cheatsheets/Software_Supply_Chain_Security_Cheat_Sheet.html) | low | [CWE-494](https://cwe.mitre.org/data/definitions/494.html) | A08:2021 Software and Data Integrity Failures | ADD downloads a remote file at build time without checking it. | | [`config.docker-root-user`](https://cheatsheetseries.owasp.org/cheatsheets/Kubernetes_Security_Cheat_Sheet.html) | medium | [CWE-250](https://cwe.mitre.org/data/definitions/250.html) | A05:2021 Security Misconfiguration | The container runs as root, so a break-out starts with full privileges. | | [`config.gha-pull-request-target`](https://cheatsheetseries.owasp.org/cheatsheets/CI_CD_Security_Cheat_Sheet.html) | medium | [CWE-829](https://cwe.mitre.org/data/definitions/829.html) | A08:2021 Software and Data Integrity Failures | pull_request_target runs with repository secrets on code from forks; checking out the PR head here is a known takeover path. | | [`config.gha-write-all`](https://cheatsheetseries.owasp.org/cheatsheets/CI_CD_Security_Cheat_Sheet.html) | medium | [CWE-829](https://cwe.mitre.org/data/definitions/829.html) | A08:2021 Software and Data Integrity Failures | The workflow token can write to everything in the repository. | | [`config.gha-unpinned-action`](https://cheatsheetseries.owasp.org/cheatsheets/CI_CD_Security_Cheat_Sheet.html) | medium | [CWE-829](https://cwe.mitre.org/data/definitions/829.html) | A08:2021 Software and Data Integrity Failures | A third-party action runs from a moving branch, so any push to it runs in your CI with your secrets. | | [`config.gha-script-injection`](https://cheatsheetseries.owasp.org/cheatsheets/CI_CD_Security_Cheat_Sheet.html) | high | [CWE-78](https://cwe.mitre.org/data/definitions/78.html) | A03:2021 Injection | Text an outsider controls (a PR title, issue body, branch name) is pasted into the workflow, so it can run commands. | | [`config.privileged-container`](https://cheatsheetseries.owasp.org/cheatsheets/Kubernetes_Security_Cheat_Sheet.html) | high | [CWE-250](https://cwe.mitre.org/data/definitions/250.html) | A05:2021 Security Misconfiguration | A container runs privileged (or may gain privileges), which gives it near-root access to the host. | | [`config.k8s-host-access`](https://cheatsheetseries.owasp.org/cheatsheets/Kubernetes_Security_Cheat_Sheet.html) | high | [CWE-250](https://cwe.mitre.org/data/definitions/250.html) | A05:2021 Security Misconfiguration | The pod shares the host's network, process or IPC namespace. | | [`config.tf-open-ingress`](https://cheatsheetseries.owasp.org/cheatsheets/Infrastructure_as_Code_Security_Cheat_Sheet.html) | medium | [CWE-284](https://cwe.mitre.org/data/definitions/284.html) | A01:2021 Broken Access Control | A network rule is open to the whole internet. | | [`config.tf-public-bucket`](https://cheatsheetseries.owasp.org/cheatsheets/Infrastructure_as_Code_Security_Cheat_Sheet.html) | high | [CWE-284](https://cwe.mitre.org/data/definitions/284.html) | A01:2021 Broken Access Control | A storage bucket is public. | | [`config.nginx-autoindex`](https://cheatsheetseries.owasp.org/cheatsheets/Attack_Surface_Analysis_Cheat_Sheet.html) | low | [CWE-548](https://cwe.mitre.org/data/definitions/548.html) | A05:2021 Security Misconfiguration | Directory listing is on, so every file in the folder can be browsed. | | [`config.weak-tls-version`](https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Security_Cheat_Sheet.html) | medium | [CWE-326](https://cwe.mitre.org/data/definitions/326.html) | A02:2021 Cryptographic Failures | Old TLS or SSL versions are enabled; they have known attacks. | ## Dependencies (1) | Rule | Severity | CWE | OWASP | What it means | | --- | --- | --- | --- | --- | | [`dependency.known-vulnerability`](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerable_Dependency_Management_Cheat_Sheet.html) | high | [CWE-1395](https://cwe.mitre.org/data/definitions/1395.html) | A06:2021 Vulnerable and Outdated Components | A locked dependency version has a published advisory (OSV.dev). |