secure-coding

Featured

Apply security-conscious thinking when generating or modifying code. Enforces trust boundary awareness, input validation, injection prevention, secrets management, and defense-in-depth authorization. Use when generating code that handles user input, authentication, authorization, database queries, external APIs, or file operations, or when the user mentions 'security review', 'secure this', 'check for vulnerabilities', 'trust boundary', 'input validation', or 'OWASP'. Loaded automatically by the code-generating molecules (code-forge, refactor-safely, bug-fix). This skill governs the security posture of generated code -- not architecture (see architecture) and not code craft (see clean-code).

Code & Development 190 stars 13 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
76
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Secure Coding ## Config Resolution Projects can customize this skill's standards. Resolution order: 1. Read `.lattice/config.yaml` in the repo root. 2. If found, check `paths.secure_coding` for a custom document path. 3. If a custom document exists at that path, read it and check its YAML frontmatter for `mode`: - **`mode: override`**: the custom document has full precedence. Use it instead of the embedded defaults. It must be comprehensive -- treat it as the sole reference. - **`mode: overlay`** (or no mode field): read the embedded `./references/defaults.md` first, then apply the custom document's sections on top. A custom section replaces the matching default section (matched by exact heading); new sections append after the defaults. 4. If a custom path is configured but no document exists at it → tell the user which configured path is missing, then fall back to `./references/defaults.md`. 5. If there is no config file or no `paths.secure_coding` key, read `./references/defaults.md`. 6. **Language adaptation**: if `paths.language_idioms` is set in the config and the document exists, read its **"Error Handling"** section and adapt §2 (Input Validation Patterns) error-message patterns to the language's idioms. Language idioms take precedence over the pseudocode defaults. ## Self-Validation Checklist **STOP after generating each component. Verify ALL checks before proceeding. A check clearly fails → fix the code before presenting. A check is a judgment call with ...

Details

Author
techygarg
Repository
techygarg/lattice
Created
6 months ago
Last Updated
4 days ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

secure-coding

Apply OWASP-grounded secure coding when writing or reviewing backend, frontend, API, data, or infrastructure code, handling auth/secrets/user input, or doing a security pass. Use whenever code touches authentication, authorization, secrets, databases, file/network I/O, deserialization, or external input — and during the security-engineer QA lens and /ship-check.

1 Updated 1 months ago
StielChancellor
Code & Development Featured

clean-code

Apply clean code principles when generating or modifying implementation code. Enforces function focus, naming clarity, complexity management, error handling, and self-documenting style. Use when the user mentions 'clean code', 'code quality', 'coding guidelines', or 'implementation quality'. Loaded automatically by the code-generating molecules (code-forge, refactor-safely, bug-fix). This skill governs the craft of writing individual code units -- not architecture (see architecture), not security posture (see secure-coding), not test structure (see test-quality), and not refactoring workflows (see refactor-safely).

190 Updated 4 days ago
techygarg
API & Backend Listed

dev-secure-coding

Use when writing or modifying application code in any language — endpoints, handlers, database queries, HTTP clients, file access, forms, config loading — and whenever adding or upgrading a dependency. Applies whenever code touches user input, credentials, SQL, shell commands, file paths, external URLs, or authentication, even if the request never mentions security. Also use before declaring code finished, to self-check what was written. Triggers on "create an endpoint", "add this library", "connect to this API", "save this to the database", "read this file", "add login". Complements the stack skills (dev-python-clean-code, golang-clean-code, dev-react-internal, dev-angular-internal) rather than replacing them.

0 Updated 1 months ago
slackwero