security-by-design
Skill0 starsChanged 59 days agoMITView on GitHub
Secure coding rules derived from the client's Security by Design checklist. Load when writing or reviewing code that touches authentication, authorization (RBAC), data/secret handling, logging, cryptography, user input, sessions/cookies, error handling or exports. Do not load for purely layout/CSS or documentation work.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mattiazi/skillstheir own version, first seen Oct 20, 2026
- mmondora/claude-skillstheir own version, first seen Feb 14, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- mattiazi/skills★ 1same name
- mmondora/claude-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- esl-domainSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Validate and sanitise: every input and output — including the spreadsheets read during migration and any externally supplied library.
- Distinctive: line 41
Never: put sensitive data or credentials in URLs or query strings (no GET for auth).
- Distinctive: line 46
Every event: source, timestamp, outcome/summary (for non-repudiation).
- Distinctive: line 51
No deprecated algorithms. Strong at-rest encryption (e.g.
- Distinctive: line 52
All traffic over TLS ≥ 1.2.
- Distinctive: line 55
Do not introduce unnecessary dependencies (minimize attack surface).
- Distinctive: line 56
No dependency with known unresolved Critical/High vulnerabilities.
- Very specific: line 64
Every PR touching one of these areas must be able to pass the security gate (/security-review).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secure coding — rules
Guiding principles: least privilege · minimize attack surface · secure defaults · defense in depth · separation of duties · no security-by-obscurity · fix properly. Apply these by default, not on request. When in doubt, the safer choice wins.
The numbers in brackets are control ids in the client's own security-by-design checklist. Keeping them makes
/security-reviewreports map 1:1 onto the form the client's security function expects — which is the difference between a review they can accept and one they have to re-do.
Secrets and credentials (6, 11, 28) — non-negotiable
- Never hardcode credentials or secrets in code or versioned files. Use environment variables / a vault.
- Never log secrets (passwords, tokens, certificates, keys). Sensitive data in logs only masked or hashed.
- Credentials towards backends/databases are always encrypted, never in clear.
Authentication & authorization (9, 10, 12, 13, 19, 23)
- Authority is verified server-side; UI gating is UX only, not security.
- Enforce RBAC with least privilege and need-to-know per
governance/rbac-matrix.md; respect separation of duties. - Local passwords (if ever present) with bcrypt / PBKDF2 / scrypt — never simple or reversible hashing.
- Sessions: inactivity timeout; session id with a generic name, random ≥128 bit, no PII.
- Session cookies with Secure and HttpOnly flags.
- No backdoor, default account or mechanism that bypasses the controls. The dev login is env-gated and forbidden in production (ADR-0002).
Input, output, errors (24, 25, 28)
- Validate and sanitise every input and output — including the spreadsheets read during migration and any externally supplied library. Assume hostile input: the source data library already contains a material share of malformed cells, and a parser that trusts produces corrupt data long before there is an attacker.
- Explicit exception handling; the application does not crash uncontrolled.
- On error show a generic error page; never a stack trace or internal detail to the user.
- Never put sensitive data or credentials in URLs or query strings (no GET for auth); use POST.
- CSRF protection on state-changing actions (one-time token / re-auth).
Logging & audit (2, 6, 7, 8)
- Logs are append-only: the code offers no path to delete or modify them.
- Every event: source, timestamp, outcome/summary (for non-repudiation).
- Log all user management and governance actions (grant/revoke, create/update/delete, approvals, releases) with who and when.
Cryptography & transport (20, 22)
- No deprecated algorithms. Strong at-rest encryption (e.g. AES-256-GCM) where applicable in code.
- All traffic over TLS ≥ 1.2. No cleartext channel.
Dependencies & supply chain (43, code side)
- Do not introduce unnecessary dependencies (minimize attack surface). Prefer maintained libraries.
- No dependency with known unresolved Critical/High vulnerabilities.
What is NOT the code's job (defer)
Infrastructure (IDPS, WAF, DNSSEC, anti-malware, backup, HA, disk/DB-level encryption at rest,
environment separation) → Platform/Ops, often N/A when the client hosts. SSO/MFA, password policy
and CA certificates → the auth spec + the client's IT. See governance/security-controls-map.md.
Operating rule
Every PR touching one of these areas must be able to pass the security gate (/security-review). If a
requirement does not apply to the PR, declare it explicitly (N/A + reason) rather than ignoring it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

