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.
git clone --depth 1 https://github.com/brendadeeznuts1111/betting-brain-v3Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/production-security)<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/production-security"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/production-security/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/production-security"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/production-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01542 | $0.01542 |
| Opus 5.5 | $0.00617 | $0.00617 |
| Sonnet 5.5 | $0.00308 | $0.00308 |
| Haiku 4.5 | $0.00154 | $0.00154 |
Grade A, and why
production-security scanned grade A with 0 findings 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 3mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Production Security Patterns
Metadata:
- Status: ✅ Active
- Always Apply: true
- Topics: #security #production #scale
- Last Updated: 2025-10-07
🔍 Code Searchability Patterns
Find security-patterns Issues with ast-grep
# Find parseFloat($$$)
# Find env.$DB.prepare(`SELECT $QUERY`)
# Find new Date()
# Find WASM.*exports
ast-grep --pattern 'parseFloat($$$)' src/
ast-grep --pattern 'env.$DB.prepare(`SELECT $QUERY`)' src/
ast-grep --pattern 'new Date()' src/
ast-grep --pattern 'WASM.*exports' src/
sg -p 'parseFloat($$$)' src/
sg -p 'env.$DB.prepare(`SELECT' src/
sg -p 'new' src/
sg -p 'WASM.*exports' src/
security-patterns Discovery Commands
sg search "parseFloat" src/
sg search "SELECT" src/
sg search "new Date()" src/
sg search "WASM" src/
Search Examples
# Find parseFloat usage (security risk)
sg search 'parseFloat($$$)' src/
# Find SQL injection risks
sg search 'env.$DB.prepare(`SELECT' src/
# Find timezone issues
sg search 'new' src/
# Find WASM memory leaks
sg search 'WASM.*exports' src/
Overview
This rule enforces production-ready security patterns for sports betting platforms handling real money at scale.
All patterns are enforced via ast-grep rules in the rules/ directory.
Critical Security Rules
1. No parseFloat on Stakes (CRITICAL)
Rule: rules/no-parsefloat-stake.yaml
Why: parseFloat("100abc") returns 100, accepting garbage input. For betting stakes, this is catastrophic.
// ❌ DANGEROUS
const stake = parseFloat(userInput); // Accepts "100abc" → 100
// ✅ SAFE
const stake = Number(userInput);
if (isNaN(stake) || stake <= 0) {
throw Errors.validationError('Invalid stake amount');
}
Enforcement:
sg scan --filter "no-parsefloat-stake" --error
2. D1 SQL Injection Prevention (CRITICAL)
Rule: rules/d1-sql-injection.yaml
Why: Template literal interpolation bypasses D1's parameterization.
// ❌ SQL INJECTION RISK
const userId = request.query.id;
await env.ANALYTICS.prepare(`SELECT * FROM users WHERE id = '${userId}'`).all();
// ✅ PARAMETERIZED QUERY
await env.ANALYTICS.prepare(`SELECT * FROM users WHERE id = ?`)
.bind(userId)
.all();
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.
- 3mo ago First seen · 249 lines · 1,542 tokens per session scan A 482254017f25
production-security is a cursor rule published in the GitHub repository brendadeeznuts1111/betting-brain-v3 (8 stars, last pushed 20d ago), licensed MIT. It adds 1,542 tokens to every session, about $0.0062 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
production-security compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| production-securitybrendadeeznuts1111/betting-brain-v3 | Cursor rule | 8 | 20d ago | MIT | A | 1,542 | Cursor |
| typescript-importsfirtoz/cf-multiworker-starter-kit | Cursor rule | 12 | 1mo ago | none | A | 687 | Cursor |
| docssupermemoryai/supermemory | Cursor rule | 32k | yesterday | MIT | A | 314 | Cursor |
| naminglouisbrulenaudet/monorepo-template | Cursor rule | 19 | 8d ago | Apache-2.0 | A | 0 | Cursor |
| cursorrulesspeakeasy-api/gram | Cursor rule | 281 | today | AGPL-3.0 | A | 45 | Cursor |
| workers-patternsfirtoz/cf-multiworker-starter-kit | Cursor rule | 12 | 1mo ago | none | A | 1,378 | Cursor |
| git-workflowfirtoz/cf-multiworker-starter-kit | Cursor rule | 12 | 1mo ago | none | A | 593 | Cursor |