Skip to content
Skills Library
Security · Building & coding

secure-development

/secure-development

Security-by-design implementation practices covering input sanitization, safe auth, SQLi/XSS/SSRF prevention, and secrets handling. Use when building secure code.

Repository
TES-SKILLS ↗
Licence
Apache-2.0
Last repository change
01.11.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 01.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Security-by-design implementation practices covering input sanitization, safe auth, SQLi/XSS/SSRF prevention, and secrets handling. Use when building secure code.

Original author description

Security-by-design implementation practices covering input sanitization, safe auth, SQLi/XSS/SSRF prevention, and secrets handling. Use when building secure code.

How it works

  1. Purpose & Activation
  2. 1. Defensive Engineering Guardrails
  3. 2. Common Vulnerability Defenses
  4. 3. Expected Deliverables
  5. 4. Progressive Disclosure (Reference Documents)
Original SKILL.md headings · 56 lines, 411 words
SKILL.md preview
---
name: secure-development
description: Security-by-design implementation practices covering input sanitization, safe auth, SQLi/XSS/SSRF prevention, and secrets handling. Use when building secure code.
compatibility:
  - hermes
  - opencode
  - codex
  - claude-code
  - gemini-cli
  - generic
---

# Secure Development

## Purpose & Activation
`secure-development` embeds defensive engineering principles into software during implementation. It ensures code is secure by default against common exploit classes, rather than relying solely on post-hoc audits.

- **Primary Skill For:** Implementing authentication systems, authorization rules, input sanitization, cryptographic operations, and database access.
- **Composition:** Pair with `software-engineering` when building REST APIs or user services; pair with `threat-modeling` when designing new security trust boundaries.
- **Ownership Boundary:** Forensic security reviews and vulnerability evidence reporting belong to `security-audit`.

---

## 1. Defensive Engineering Guardrails

1. **Input Validation & Canonicalization:**
   - Validate external input against strict allowlists (types, lengths, character sets, ranges).
   - Canonicalize file paths, URLs, and encodings before validating against access policies.
2. **Parameterized Data Access:**
   - Never concatenate raw user input into SQL queries, ORM fragments, system commands, or template strings.
   - Always use parameterized queries, prepared statements, or ORM parameter bindings.
3. **Multi-Tenant Isolation & Server-Side Authorization:**
   - Every database query for tenant data must filter by `tenant_id` at the database layer.
   - Enforce server-side role and permission checks on every single request. Never rely on client-asserted identity or roles.
4. **Cryptographic Discipline:**
   - Use standard, battle-tested cryptographic libraries (e.g. `cryptography`, `argon2`, `bcrypt`).
   - Never implement custom encryption algorithms, hashing methods, or pseudo-random generators.
5. **Secrets Hygiene:**
   - Never commit API keys, private certificates, or passwords into source files or version control.
   - Load secrets exclusively from environment variables or dedicated secret managers.

---

## 2. Common Vulnerability Defenses

- **SQL Injection:** Strict parameterized binding (`cursor.execute("SELECT ... WHERE id = %s", (user_id,))`).
- **Path Traversal:** Validate paths using `os.path.commonpath([base_dir, resolved_path]) == base_dir`.
- **Command Injection:** Avoid `shell=True` or `exec()`; pass explicit argument lists to `subprocess.run(["cmd", arg])`.
- **XSS:** Use contextual auto-escaping templating engines (e.g. React JSX, Jinja2 autoescape).
- **CSRF:** Enforce `SameSite=Lax` or `Strict` cookies and cryptographic anti-CSRF tokens for state-changing endpoints.
- **SSRF:** Validate target URLs against an explicit domain allowlist; block loopback (`127.0.0.1`), cloud metadata (`169.254.169.254`), and RFC 1918 private subnets.

---

## 3. Expected Deliverables
1. **Defensive Implementation:** Production code with robust bounds checking and boundary defenses.
2. **Security Unit Tests:** Automated regression tests demonstrating that malicious payloads (e.g. `../../etc/passwd`, `' OR 1=1 --`) are rejected with clean validation errors.

---

## 4. Progressive Disclosure (Reference Documents)
Consult these bundled documents only when specific deep guidance is needed:

- **Defense-in-depth architectural patterns:** Consult [defense-in-depth.md](references/defense-in-depth.md).
- **Pre-commit secure development checks:** Consult [secure-coding-checklist.md](checklists/secure-coding-checklist.md).
- **Security controls and threat mapping:** Consult [security-control-matrix.md](templates/security-control-matrix.md).
Files in this package (4)
  • SKILL.md 4 KB
  • checklists/secure-coding-checklist.md 1 KB
  • references/defense-in-depth.md 1 KB
  • templates/security-control-matrix.md 1 KB

Versions

The database has no other skills named secure-development.

Database snapshot: 13.11.2026 · package version f7cbbf8ce051 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100frontend-security-coder
    Expert in secure frontend coding practices specializing in XSS prevention, output sanitization, and client-side security patterns. Use for frontend security implementations or client-side security code reviews.
  • 100security-audit
    Audits code for security issues and writes secure code, checking against the OWASP Top 10 risk categories with concrete, language-specific checks - broken access control and IDOR, injection, XSS, SSRF, authentication, sessions and JWTs, secrets, cryptography, unsafe…
  • 95vibesec
    Security-first code review & vulnerability prevention (IDOR, XSS, CSRF, SSRF, SQLi, Auth/JWT, Mass Assignment, Sensitive Data Exposure). Use when writing web features, designing endpoints, or auditing security.
  • 100security-review
    Reviews changed code for realistic security risks in authn/authz, input handling, injection, secrets, uploads, SSRF, CSRF/XSS, webhooks, dependencies, and local-agent shell or file access. Use when a change touches auth, user input, endpoints, payments, uploads, shell execution, or sensitive data.
  • 100security-expert
    Expert defensive application security and secure code review (OWASP Top 10). Trigger keywords: security, vulnerability, OWASP, injection, SQL injection, XSS, CSRF, SSRF, authentication, authorization, access control, secrets, JWT, session, dependency, secure coding,…
  • 90vulnerability-guide
    Reference for common web vulnerabilities and how to explain them. Use when the user asks about XSS, SQLi, CSRF, CORS, CSP, HSTS, TLS, IDOR, SSRF, injection, cookie security, secrets, or how to fix a specific finding.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.