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/j4flmao/agent-skillsWrote 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/j4flmao/agent-skills/secure-by-default)<a href="https://agentmods.dev/rules/j4flmao/agent-skills/secure-by-default"><img src="https://agentmods.dev/badge/rules/j4flmao/agent-skills/secure-by-default/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/j4flmao/agent-skills/secure-by-default"><img src="https://agentmods.dev/badge/rules/j4flmao/agent-skills/secure-by-default.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.00024 | $0.01185 |
| Opus 5.5 | $0.00010 | $0.00474 |
| Sonnet 5.5 | $0.00005 | $0.00237 |
| Haiku 4.5 | $0.00002 | $0.00119 |
Grade E, and why
secure-by-default scanned grade E with 3 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 23d 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
- **Action**: Pin GitHub Actions and container base images by digest/SHA for anything that runs with secrets. Prefer package managers over `curl ... | sh`; if an installer script is unavoidable, download it, check its ch Cloud metadata endpointhighServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
- **Action**: Server-side fetches of user-supplied URLs need an SSRF guard: allow-list hosts, block private/link-local ranges (including `169.254.169.254`), and re-check after redirects. Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **Action**: Pin GitHub Actions and container base images by digest/SHA for anything that runs with secrets. Prefer package managers over `curl ... | sh`; if an installer script is unavoidable, download it, check its ch How it starts
The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Secure by Default
Cursor/AI MUST apply this baseline to all generated code, configuration, infrastructure, CI, and shell commands, whichever skill is active. Domain rules (crypto, database, distributed systems, RAG, ML, eBPF, MISRA-C, ZK, MCP) add detail on top of it.
1. Secrets
- Rule: Never write a real or realistic secret (API key, password, token, private key, connection string with credentials) into code, config, docs, tests, or commit messages.
- Action: Read secrets from environment variables or a secret manager (Vault, AWS Secrets Manager, GCP Secret Manager, Azure Key Vault, Doppler, 1Password). Use workload identity (IAM roles, IRSA, Workload Identity Federation, OIDC in CI) instead of static cloud keys. In examples use obvious placeholders like
<api-key>or${API_KEY}. - Action: Never log secrets, tokens, or full request bodies that may contain them; redact before logging.
2. Untrusted input
- Rule: Treat every input as hostile: HTTP params, headers, files, queue messages, webhooks, LLM output, and content fetched from the web.
- Action: Validate with an allow-list schema at the boundary (Zod, Pydantic, JSON Schema). Use parameterized queries or an ORM (never string-built SQL), safe templating with auto-escaping (never
innerHTML/dangerouslySetInnerHTMLwith user data), and argument arrays for subprocesses (nevershell=True/ string-built commands). - Action: Server-side fetches of user-supplied URLs need an SSRF guard: allow-list hosts, block private/link-local ranges (including
169.254.169.254), and re-check after redirects. - Action: Never deserialize untrusted data with unsafe loaders (
pickle,yaml.loadwithoutSafeLoader, Java native serialization).
3. Authentication and authorization
- Rule: Every endpoint and every object access checks authorization on the server (deny by default); hiding a button is not access control.
- Action: Check object ownership on each read/write to prevent IDOR. Use vetted auth libraries or an identity provider (OIDC); hash passwords per
crypto-deprecation.md; rate-limit login, signup, password reset, and OTP endpoints; require MFA for admin access.
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.
- 23d ago First seen · 55 lines · 24 tokens per session scan E 0ad37663f450
secure-by-default is a cursor rule published in the GitHub repository j4flmao/agent-skills (47 stars, last pushed 17d ago), licensed MIT. It adds 24 tokens to every session and 1,185 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it E with 3 findings (downloads and executes remote code, cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.
secure-by-default compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| secure-by-defaultj4flmao/agent-skills | Cursor rule | 47 | 17d ago | MIT | E | 24 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 204k | 12d ago | MIT | A | 604 | Cursor |
| angular-20angular/angular | Cursor rule | 102k | today | MIT | A | 0 | Cursor |
| dev-standardapache/superset | Cursor rule | 76k | today | Apache-2.0 | A | 1,147 | Cursor |
| prefer-assertions-over-defensive-checksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| prefer-direct-imports-over-module-mocksprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |
| shared-plane-packagesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Cursor |