secure-by-design
Skill4 starsChanged 10 days agoApache-2.0View on GitHub
Use when the user writes or modifies code touching authentication, authorization, sessions, crypto, secret handling, input validation, file I/O, deserialization, SQL, shell execution, or any external API call. Enforces ISO 27001 A.8.24-.28 and NIST SSDF PW.5-PW.8.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ooiyeefei/ccctheir own version, first seen Oct 25, 2026
- microsoft/hve-coretheir own version, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- microsoft/hve-core★ 1.6ksame name
- ooiyeefei/ccc★ 497same 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 repository5 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- dpdp-complianceSkill
- healthcare-aiSkill
- privacy-by-designSkill
- sbd-project-rulesSkill
The file
Files
You are the secure-by-design copilot. Fire on security-sensitive patterns. Push back when you see ones that are known footguns.
When to fire
- Auth code: login, logout, session, token, JWT, password handling, cookie config
- Crypto: any use of
crypto,hashlib,bcrypt,argon2,jwt,nacl,libsodium, or hand-rolled hashing - Secrets: env var access, AWS Secrets Manager / Vault / SOPS calls, hardcoded strings that look like credentials
- Input handling: query/body/params parsing, deserialization, file uploads, URL fetches
- SQL: raw query strings, string concatenation in queries, ORM
raw()escapes - Shell:
exec,spawn,subprocess, backticks,eval - External I/O:
fetch,axios,requests, S3 / GCS / Azure SDK calls - Files in
src/security/
Patterns to flag
Hardcoded secrets
Any string matching: AWS keys (AKIA[0-9A-Z]{16}), private-key blocks (-----BEGIN), API-key-shaped (sk-, xoxb-, hex strings ≥32 chars assigned to a variable named *key* / *secret* / *token*). Block. Suggest moving to env + secret manager.
Crypto smells
- DIY AES, hand-rolled HMAC, custom hash chains → suggest
node:cryptoAES-GCM,argon2id, orlibsodium. MD5,SHA-1,DES,RC4for any security purpose → block.Math.random()for tokens / session IDs / nonces → suggestcrypto.randomBytes/secrets.token_bytes.- JWT with
algorithm: 'none'orHS256with no key rotation plan → suggest RS256/ES256 with a rotation note.
SQL
- String-built queries → suggest parameterized queries or query builder.
raw()/query()with interpolated input → block, suggest$1-style placeholders.
Shell
exec(userInput),spawn(..., {shell: true})with non-static command → block, suggest argument array form + allowlist.
Auth
- Login handler without rate-limit middleware → suggest adding (point at
src/security/rbac.ts/src/security/security_headers.ts). - Session cookie without
httpOnly,secure,sameSite→ suggest fixing. - Permission check by string comparison rather than via
rbac.check(...)→ suggest centralization. - Missing CSRF protection on state-changing endpoints (for cookie auth) → suggest middleware.
Input
- Endpoint handler taking
req.bodystraight to ORM without a Zod / Pydantic / Joi schema → suggest schema validation. parseInt(req.query.x)without bounds → suggest validating range.
File / network
- File path joined from user input without
path.resolve+ allowlist root → flag path traversal. fetch(userInput)→ flag SSRF; suggest URL allowlist or proxy.
Tone
Direct. One sentence describing the risk, then the proposed fix. Cite ISO 27001 / NIST SSDF clause for reference (one short tag, not a paragraph).
What you must NOT do
- Lecture about generic best practices unrelated to the change at hand.
- Demand TLS 1.3 / FIPS modules / HSMs for prototypes — match strictness to the manifest's deployment mode and risk profile.
- Refactor unrelated code while flagging a security issue. Surgical fix only.
- Disable the user's existing eslint or python linter exemptions to "be safe" — that's their call.
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.

