javascript-software-data-integrity-failures

A set of JavaScript security checks based on OWASP A08, a recognised category covering software and data integrity failures.

In plain words
What is it for?
It checks unsafe parsing, eval usage, missing Subresource Integrity hashes, and package installation commands that skip verification.
Why use it?
It flags code and installation commands that could trust altered data, load unsafe scripts, or disable package integrity checks.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/ivangrynenko/cursorrules/javascript-software-data-integrity-failures
Clone the repo
git clone --depth 1 https://github.com/ivangrynenko/cursorrules

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 5,588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.05588
Opus 5 $0.00000 $0.02794
Sonnet 5 $0.00000 $0.01118
Haiku 4.5 $0.00000 $0.00559

Measured 2d ago against content hash 1e49cab578ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

javascript-software-data-integrity-failures scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const pluginCode = await fetch(pluginPath).then(r => r.text());
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/rules/javascript-software-data-integrity-failures.mdc · 663 lines

How it starts

The opening of the file, as written. The whole thing — 663 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JavaScript Software and Data Integrity Failures (OWASP A08:2021)

actions:

  • type: enforce conditions:

    Pattern 1: Insecure Deserialization

    • pattern: "(?:JSON\.parse|eval)\s*\((?:[^)]|\n)*(?:localStorage|sessionStorage|document\.cookie|location|window\.name|fetch|axios|\$\.(?:get|post)|XMLHttpRequest)" message: "Insecure deserialization of user-controlled data detected. Validate and sanitize data before parsing JSON or using eval."

    Pattern 2: Missing Subresource Integrity

    • pattern: "<script\s+src=['"][^'"]+['"]\s*>" negative_pattern: "integrity=['"]sha(?:256|384|512)-[a-zA-Z0-9+/=]+" message: "Script tag without Subresource Integrity (SRI) hash. Add integrity and crossorigin attributes for third-party scripts."

    Pattern 3: Insecure Package Installation

    • pattern: "(?:npm|yarn)\s+(?:install|add)\s+(?:[\w@\-\.\/:]+\s+)*--no-(?:verify|integrity|signature)" message: "Package installation with integrity checks disabled. Always verify package integrity during installation."

    Pattern 4: Insecure Object Deserialization

    • pattern: "(?:require|import)\s+'"['"]" message: "Using potentially unsafe serialization/deserialization libraries. Ensure proper validation and sanitization of serialized data."

    Pattern 5: Missing Dependency Verification

    • pattern: "package\.json" negative_pattern: ""(?:scripts|devDependencies)":\s*{[^}]"(?:audit|verify|check)":\s"(?:npm|yarn)\s+audit" file_pattern: "package\.json$" message: "Missing dependency verification in package.json. Add npm/yarn audit to your scripts section."

    Pattern 6: Insecure Dynamic Imports

    • pattern: "(?:import|require)\s*\(\s*(?:variable|[a-zA-Z_$][a-zA-Z0-9_$]|[^]`|'[^']'|"[^"]")\s*\)" negative_pattern: "(?:allowlist|whitelist|validate)" message: "Potentially insecure dynamic imports. Validate or restrict the modules that can be dynamically imported."

    Pattern 7: Prototype Pollution

    • pattern: "Object\.assign\(\s*(?:[^,]+)\s*,\s*(?:JSON\.parse|req\.body|req\.query|req\.params|formData\.get)" message: "Potential prototype pollution vulnerability. Use Object.create(null) or sanitize objects before merging."

    Pattern 8: Missing CI/CD Pipeline Integrity Checks

    • pattern: "(?:\.github\/workflows\/|\.gitlab-ci\.yml|azure-pipelines\.yml|Jenkinsfile)" negative_pattern: "(?:npm\s+audit|yarn\s+audit|checksum|integrity|verify|signature)" file_pattern: "(?:\.github\/workflows\/.*\.ya?ml|\.gitlab-ci\.yml|azure-pipelines\.yml|Jenkinsfile)$" message: "Missing security checks in CI/CD pipeline. Add dependency scanning, integrity verification, and signature validation."

    Pattern 9: Insecure Update Mechanism

    • pattern: "(?:update|upgrade|install)\s*\([^)]\)\s\{[^}]*?\}" negative_pattern: "(?:verify|checksum|hash|signature|integrity)" message: "Potentially insecure update mechanism. Implement integrity verification for all updates."

    Pattern 10: Insecure Plugin Loading

    • pattern: "(?:plugin|addon|extension)\.(?:load|register|install|add)\s*\([^)]*\)" negative_pattern: "(?:verify|validate|checksum|hash|signature|integrity)" message: "Insecure plugin loading mechanism. Implement integrity verification for all plugins."

    Pattern 11: Insecure Data Binding

    • pattern: "(?:eval|new\s+Function|setTimeout|setInterval)\s*\(\s*(?:[^,)]+\.(?:value|innerHTML|innerText|textContent)|[^,)]+\[[^\]]+\])" message: "Insecure data binding using eval or Function constructor. Use safer alternatives like JSON.parse or template literals."

Read the full file on GitHub · 663 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 663 lines · 5,588 tokens per session scan A 1e49cab578ec

Subscribe to this mod's changes

javascript-software-data-integrity-failures is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (87 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,588 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.