Security Principles
Use this skill as standing guidance for this domain. Apply the checklist first; read the detailed reference only when the task is substantial, risky, unfamiliar, or review-oriented.
Operating Rules
- Prefer the repository's existing conventions, toolchain, and CI commands over generic defaults.
- Make the smallest coherent change that satisfies the request while preserving behavior.
- Treat tests, linting, dependency hygiene, and security review as part of completion.
- If a principle conflicts with higher-priority repository instructions or an explicit user request, follow the higher-priority instruction and call out the tradeoff.
Core Checklist
- Validate and encode data at every trust boundary; use parameterized queries and safe serializers.
- Enforce authentication, authorization, tenancy, and least privilege server-side.
- Keep secrets out of source, logs, images, Terraform state exposure, and client bundles.
- Avoid command injection, path traversal, unsafe deserialization, SSRF, XSS, CSRF, and insecure direct object references.
- Use secure defaults: TLS, encryption at rest, short-lived credentials, scoped tokens, and safe error messages.
- Maintain dependency, container, and IaC scanning in CI; produce SBOMs where the build system supports them.
- Prefer signed or provenance-backed artifacts for release workflows and align supply-chain controls with SLSA/SSDF concepts.
- Add abuse-case tests for security-sensitive changes and review logs for sensitive data leakage.
Validation
Run applicable checks when they exist in the project; if a tool is missing, report that it was skipped.
gitleaks detect --source . for secret scanning
semgrep --config auto for common vulnerability patterns
trivy fs . or ecosystem-specific dependency scanning
- Add targeted security tests for authorization, input validation, and data exposure risks
Detailed Reference
For the complete principle set with examples and edge cases, read references/principles.md when deeper guidance is useful.
Source: asciifylabs/asciify-skills — distributed by TomeVault.
1---2name: security-principles3description: Security standards for any code change in any language. Use for implementation, review, dependency changes, authentication, authorization, data handling, or release risk. Use when this capability is needed.4---56# Security Principles78Use this skill as standing guidance for this domain. Apply the checklist first; read the detailed reference only when the task is substantial, risky, unfamiliar, or review-oriented.910## Operating Rules1112- Prefer the repository's existing conventions, toolchain, and CI commands over generic defaults.13- Make the smallest coherent change that satisfies the request while preserving behavior.14- Treat tests, linting, dependency hygiene, and security review as part of completion.15- If a principle conflicts with higher-priority repository instructions or an explicit user request, follow the higher-priority instruction and call out the tradeoff.1617## Core Checklist1819- Validate and encode data at every trust boundary; use parameterized queries and safe serializers.20- Enforce authentication, authorization, tenancy, and least privilege server-side.21- Keep secrets out of source, logs, images, Terraform state exposure, and client bundles.22- Avoid command injection, path traversal, unsafe deserialization, SSRF, XSS, CSRF, and insecure direct object references.23- Use secure defaults: TLS, encryption at rest, short-lived credentials, scoped tokens, and safe error messages.24- Maintain dependency, container, and IaC scanning in CI; produce SBOMs where the build system supports them.25- Prefer signed or provenance-backed artifacts for release workflows and align supply-chain controls with SLSA/SSDF concepts.26- Add abuse-case tests for security-sensitive changes and review logs for sensitive data leakage.2728## Validation2930Run applicable checks when they exist in the project; if a tool is missing, report that it was skipped.3132- `gitleaks detect --source .` for secret scanning33- `semgrep --config auto` for common vulnerability patterns34- `trivy fs .` or ecosystem-specific dependency scanning35- Add targeted security tests for authorization, input validation, and data exposure risks3637## Detailed Reference3839For the complete principle set with examples and edge cases, read [references/principles.md](references/principles.md) when deeper guidance is useful.4041---42> Source: [asciifylabs/asciify-skills](https://github.com/asciifylabs/asciify-skills) — distributed by [TomeVault](https://tomevault.io).43<!-- tomevault:4.0:skill_md:2026-06-16 -->