secure-software-engineering
Use when designing or implementing software securely: define security requirements, threat-model a feature, choose secure defaults, design authentication and authorization, handle untrusted data and secrets, evaluate dependencies, design multi-tenant trust boundaries, or review s
Install
npx skills add https://github.com/magnus919/agent-skills/tree/main/secure-software-engineering
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install magnus919-agent-skills@llmmart
git clone https://github.com/magnus919/agent-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole magnus919/agent-skills collection as a plugin from our marketplace. Git is the plain clone.
README
Secure Software Engineering
Build security into software decisions before they become expensive defects.
Why Install This Skill
This skill helps an agent turn "make it secure" into concrete design choices: what must be protected, who may do what, where trust changes, and how a team can verify the result. It covers everyday engineering work such as APIs, credentials, dependencies, multi-tenant services, release artifacts, and AI features without assuming a cloud provider or framework.
Instead of treating a checklist or scanner as a security guarantee, the workflow asks for evidence, assumptions, misuse cases, and accountable residual-risk decisions. It complements an assessment skill: use this one while building and changing software, then assess or scan separately when that is the actual task.
For agents with consequential tools, it also addresses protected supervision: who can change controls, how to verify they are active, and when work must stop.
What You Get
| Path | What it provides |
|---|---|
SKILL.md |
A five-phase, prevention-oriented workflow and routing guide. |
references/source-index.md |
Version-pinned primary sources and the decisions they inform. |
references/ |
Focused guidance for threat modeling, controls, review, release, incident learning, AI systems, and multi-tenant boundaries. |
templates/ |
Adaptable threat-model, acceptance-criteria, and review-checklist starting points. |
Quick Start
Install or expose this directory through your Agent Skills-compatible client. Then ask, for example:
Threat-model this multi-tenant document API before implementation.
The resulting model should name assets, boundaries, assumptions, abuse cases, mitigations, evidence, and residual risk rather than simply declare the API secure.
Triggers
- Design or implement a feature securely.
- Threat-model a system, API, integration, tenant boundary, or AI capability.
- Define security acceptance criteria or review a security-sensitive change.
- Choose authentication, authorization, secret handling, dependency, logging, or release-evidence practices.
- Threat-model pooled, bridge, or silo tenant isolation, support impersonation, tenant lifecycle, or shared-resource exhaustion.
Requirements
No runtime dependency, API key, or platform-specific tool is required. The included sources are decision aids; adopt the controls that apply to your organization, contract, regulator, and threat model.
For end-to-end SaaS tenant semantics and placement decisions, use
multi-tenant-saas-architecture. For quantitative tenant capacity and cost
evidence, use capacity-and-cost-engineering; for privacy lifecycle artifacts,
use privacy-engineering.
Skill manifest
Secure Software Engineering
Build security into decisions before defects reach production. This is a prevention-oriented workflow, not a claim that a design or release is secure. Record assumptions, the evidence collected, residual risks, and the owner of any accepted exception.
When To Use
Use this skill to answer "How do we build this securely?" for a new feature, integration, service, API, tenant boundary, AI capability, or release. Start early and revisit affected decisions when architecture, data flows, dependencies, or threats change.
Do not use it for an authorized post-build assessment: use security-audit-methodology. Do not use it as a vulnerability scanner for an existing codebase; use an authorized scanning tool or specialist security assessment. Use spec-driven-development when the task is to formalize the resulting requirements and phase gates, and verification-methodology to make evidence-backed completion claims.
When not to use
Use multi-tenant-saas-architecture for the end-to-end tenant model, control/application-plane placement, commercial lifecycle, and SaaS operating architecture; this skill owns the threat model and enforceable isolation controls. Use capacity-and-cost-engineering for quantitative tenant demand, quota sizing, fairness, load/soak evidence, and unit-cost tradeoffs. Route privacy lifecycle and deletion-verification artifacts to privacy-engineering.
Agent control-plane protection
When an agent can reach assets that supervise or constrain it, load protected-control enforcement. Threat-model monitors, alert routes, audit sinks, authority ceilings, kill switches, evaluation oracles, and gates as protected assets. Enforce rights outside the controlled agent's writable authority, including indirect tools and child identities. A Markdown prohibition is not enforcement. Missing, degraded, redirected, or suppressed mandatory controls are control-integrity incidents; runtime operations owns containment and governance owns rights and human exceptions.
Workflow
- Requirements: identify assets, actors, harm, data classifications, regulatory or contractual constraints, and security outcomes. Write testable acceptance criteria before selecting controls.
- Threat model: map data flows and trust boundaries; state assumptions, abuse cases, mitigations, and residual risk. STRIDE is optional vocabulary, not an exhaustive method.
- Design: choose controls that fit the trust model, including server-side authorization, data isolation, safe failure behavior, and AI capability boundaries. Explain rejected alternatives.
- Implement: make each boundary enforceable in code and configuration; protect input, output, credentials, dependencies, logs, and operational paths.
- Review and release: verify controls with direct evidence, review changes for bypasses, preserve release evidence, and feed incidents or near misses into requirements and tests.
Loop to the affected phase when evidence contradicts an assumption or a design changes. Stop when each material decision has an accountable owner, direct evidence or an explicit gap, and a disposition for residual risk.
Reference Files
| Load when | File |
|---|---|
| You need a version-pinned source and its decision use | references/source-index.md |
| Defining assets, boundaries, abuse cases, or security criteria | references/security-requirements-threat-modeling.md |
| Choosing identity, sessions, permissions, or service access | references/authentication-authorization.md |
| Handling requests, files, URLs, serialized data, output, or AI content | references/input-validation-data-handling.md |
| Adding a key, token, credential, or signing material | references/secrets-lifecycle.md |
| Adding, updating, building, or publishing dependencies | references/dependency-supply-chain.md |
| Designing logs, audit events, monitoring, or forensic evidence | references/secure-logging-audit.md |
| Sharing infrastructure or data across tenants, including control/application planes, tenant context, support access, or tenant lifecycle proof | references/multi-tenant-isolation.md |
| Reviewing a change or defining a security review gate | references/secure-code-review.md |
| Preparing artifacts, exceptions, rollback, or response for release | references/release-evidence.md; load release-engineering to carry those controls and evidence through build, registry, promotion, and deployment gates |
| Learning from an incident, near miss, or escaped defect | references/incident-learning.md |
| Designing an LLM, RAG pipeline, model integration, or agent tool | references/ai-llm-security.md |
Templates
| Use when | File |
|---|---|
| Starting a feature or system threat model | templates/lightweight-threat-model.md |
| Writing security acceptance criteria for a specification or change | templates/security-acceptance-criteria.md |
| Reviewing a security-relevant code change | templates/secure-code-review-checklist.md |
Guardrails
- Treat prompts, retrieved content, tool output, webhooks, files, and client-provided identity or tenant fields as untrusted until a boundary validates them.
- A framework, scan, SBOM, signature, provenance attestation, or checklist is evidence about a limited claim, not proof that software is safe.
- Do not make a control universal: authentication protocols depend on the trust model; row-level security is one isolation mechanism; secret rotation follows events and risk; controls need verification in their actual deployment.
- Keep completed threat models and security acceptance criteria confidential when they expose system boundaries or weaknesses. Use placeholders, never real credentials or private deployment details.
Portability
Use the host environment's normal mechanisms to create artifacts, run tests, and obtain approvals. Do not assume a vendor, cloud, identity provider, database, CI system, or deployment topology.
Files (agent-skills)
-
evals
-
evals.json 13.3 KB
Loading… -
protected-control-challenges.md 1.1 KB
Loading…
-
-
references
-
ai-llm-security.md 2.5 KB
Loading… -
authentication-authorization.md 2 KB
Loading… -
dependency-supply-chain.md 1.9 KB
Loading… -
incident-learning.md 1.7 KB
Loading… -
input-validation-data-handling.md 1.9 KB
Loading… -
multi-tenant-isolation.md 9.3 KB
Loading… -
protected-control-enforcement.md 2.3 KB
Loading… -
release-evidence.md 1.9 KB
Loading… -
secrets-lifecycle.md 1.8 KB
Loading… -
secure-code-review.md 1.9 KB
Loading… -
secure-logging-audit.md 1.8 KB
Loading… -
security-requirements-threat-modeling.md 3.6 KB
Loading… -
source-index.md 4 KB
Loading…
-
-
templates
-
lightweight-threat-model.md 2.3 KB
Loading… -
secure-code-review-checklist.md 2 KB
Loading… -
security-acceptance-criteria.md 2.2 KB
Loading…
-
-
README.md 2.7 KB
# Secure Software Engineering Build security into software decisions before they become expensive defects. ## Why Install This Skill This skill helps an agent turn "make it secure" into concrete design choices: what must be protected, who may do what, where trust changes, and how a team can verify the result. It covers everyday engineering work such as APIs, credentials, dependencies, multi-tenant services, release artifacts, and AI features without assuming a cloud provider or framework. Instead of treating a checklist or scanner as a security guarantee, the workflow asks for evidence, assumptions, misuse cases, and accountable residual-risk decisions. It complements an assessment skill: use this one while building and changing software, then assess or scan separately when that is the actual task. For agents with consequential tools, it also addresses protected supervision: who can change controls, how to verify they are active, and when work must stop. ## What You Get | Path | What it provides | |---|---| | `SKILL.md` | A five-phase, prevention-oriented workflow and routing guide. | | `references/source-index.md` | Version-pinned primary sources and the decisions they inform. | | `references/` | Focused guidance for threat modeling, controls, review, release, incident learning, AI systems, and multi-tenant boundaries. | | `templates/` | Adaptable threat-model, acceptance-criteria, and review-checklist starting points. | ## Quick Start Install or expose this directory through your Agent Skills-compatible client. Then ask, for example: ```text Threat-model this multi-tenant document API before implementation. ``` The resulting model should name assets, boundaries, assumptions, abuse cases, mitigations, evidence, and residual risk rather than simply declare the API secure. ## Triggers - Design or implement a feature securely. - Threat-model a system, API, integration, tenant boundary, or AI capability. - Define security acceptance criteria or review a security-sensitive change. - Choose authentication, authorization, secret handling, dependency, logging, or release-evidence practices. - Threat-model pooled, bridge, or silo tenant isolation, support impersonation, tenant lifecycle, or shared-resource exhaustion. ## Requirements No runtime dependency, API key, or platform-specific tool is required. The included sources are decision aids; adopt the controls that apply to your organization, contract, regulator, and threat model. For end-to-end SaaS tenant semantics and placement decisions, use `multi-tenant-saas-architecture`. For quantitative tenant capacity and cost evidence, use `capacity-and-cost-engineering`; for privacy lifecycle artifacts, use `privacy-engineering`. -
SKILL.md 7.3 KB
--- name: secure-software-engineering description: >- Use when designing or implementing software securely: define security requirements, threat-model a feature, choose secure defaults, design authentication and authorization, handle untrusted data and secrets, evaluate dependencies, design multi-tenant trust boundaries, or review security-sensitive changes. Use for prevention during requirements, design, implementation, and review; not for post-build security assessments or scanning an existing codebase. license: MIT compatibility: No runtime dependency. Host-neutral guidance for authorized software engineering work. --- # Secure Software Engineering Build security into decisions before defects reach production. This is a prevention-oriented workflow, not a claim that a design or release is secure. Record assumptions, the evidence collected, residual risks, and the owner of any accepted exception. ## When To Use Use this skill to answer "How do we build this securely?" for a new feature, integration, service, API, tenant boundary, AI capability, or release. Start early and revisit affected decisions when architecture, data flows, dependencies, or threats change. Do not use it for an authorized post-build assessment: use [security-audit-methodology](../security-audit-methodology/SKILL.md). Do not use it as a vulnerability scanner for an existing codebase; use an authorized scanning tool or specialist security assessment. Use [spec-driven-development](../spec-driven-development/SKILL.md) when the task is to formalize the resulting requirements and phase gates, and [verification-methodology](../verification-methodology/SKILL.md) to make evidence-backed completion claims. ## When not to use Use [multi-tenant-saas-architecture](../multi-tenant-saas-architecture/SKILL.md) for the end-to-end tenant model, control/application-plane placement, commercial lifecycle, and SaaS operating architecture; this skill owns the threat model and enforceable isolation controls. Use [capacity-and-cost-engineering](../capacity-and-cost-engineering/SKILL.md) for quantitative tenant demand, quota sizing, fairness, load/soak evidence, and unit-cost tradeoffs. Route privacy lifecycle and deletion-verification artifacts to [privacy-engineering](../privacy-engineering/SKILL.md). ## Agent control-plane protection When an agent can reach assets that supervise or constrain it, load [protected-control enforcement](references/protected-control-enforcement.md). Threat-model monitors, alert routes, audit sinks, authority ceilings, kill switches, evaluation oracles, and gates as protected assets. Enforce rights outside the controlled agent's writable authority, including indirect tools and child identities. A Markdown prohibition is not enforcement. Missing, degraded, redirected, or suppressed mandatory controls are control-integrity incidents; runtime operations owns containment and governance owns rights and human exceptions. ## Workflow 1. **Requirements**: identify assets, actors, harm, data classifications, regulatory or contractual constraints, and security outcomes. Write testable acceptance criteria before selecting controls. 2. **Threat model**: map data flows and trust boundaries; state assumptions, abuse cases, mitigations, and residual risk. STRIDE is optional vocabulary, not an exhaustive method. 3. **Design**: choose controls that fit the trust model, including server-side authorization, data isolation, safe failure behavior, and AI capability boundaries. Explain rejected alternatives. 4. **Implement**: make each boundary enforceable in code and configuration; protect input, output, credentials, dependencies, logs, and operational paths. 5. **Review and release**: verify controls with direct evidence, review changes for bypasses, preserve release evidence, and feed incidents or near misses into requirements and tests. Loop to the affected phase when evidence contradicts an assumption or a design changes. Stop when each material decision has an accountable owner, direct evidence or an explicit gap, and a disposition for residual risk. ## Reference Files | Load when | File | |---|---| | You need a version-pinned source and its decision use | [references/source-index.md](references/source-index.md) | | Defining assets, boundaries, abuse cases, or security criteria | [references/security-requirements-threat-modeling.md](references/security-requirements-threat-modeling.md) | | Choosing identity, sessions, permissions, or service access | [references/authentication-authorization.md](references/authentication-authorization.md) | | Handling requests, files, URLs, serialized data, output, or AI content | [references/input-validation-data-handling.md](references/input-validation-data-handling.md) | | Adding a key, token, credential, or signing material | [references/secrets-lifecycle.md](references/secrets-lifecycle.md) | | Adding, updating, building, or publishing dependencies | [references/dependency-supply-chain.md](references/dependency-supply-chain.md) | | Designing logs, audit events, monitoring, or forensic evidence | [references/secure-logging-audit.md](references/secure-logging-audit.md) | | Sharing infrastructure or data across tenants, including control/application planes, tenant context, support access, or tenant lifecycle proof | [references/multi-tenant-isolation.md](references/multi-tenant-isolation.md) | | Reviewing a change or defining a security review gate | [references/secure-code-review.md](references/secure-code-review.md) | | Preparing artifacts, exceptions, rollback, or response for release | [references/release-evidence.md](references/release-evidence.md); load [release-engineering](../release-engineering/SKILL.md) to carry those controls and evidence through build, registry, promotion, and deployment gates | | Learning from an incident, near miss, or escaped defect | [references/incident-learning.md](references/incident-learning.md) | | Designing an LLM, RAG pipeline, model integration, or agent tool | [references/ai-llm-security.md](references/ai-llm-security.md) | ## Templates | Use when | File | |---|---| | Starting a feature or system threat model | [templates/lightweight-threat-model.md](templates/lightweight-threat-model.md) | | Writing security acceptance criteria for a specification or change | [templates/security-acceptance-criteria.md](templates/security-acceptance-criteria.md) | | Reviewing a security-relevant code change | [templates/secure-code-review-checklist.md](templates/secure-code-review-checklist.md) | ## Guardrails - Treat prompts, retrieved content, tool output, webhooks, files, and client-provided identity or tenant fields as untrusted until a boundary validates them. - A framework, scan, SBOM, signature, provenance attestation, or checklist is evidence about a limited claim, not proof that software is safe. - Do not make a control universal: authentication protocols depend on the trust model; row-level security is one isolation mechanism; secret rotation follows events and risk; controls need verification in their actual deployment. - Keep completed threat models and security acceptance criteria confidential when they expose system boundaries or weaknesses. Use placeholders, never real credentials or private deployment details. ## Portability Use the host environment's normal mechanisms to create artifacts, run tests, and obtain approvals. Do not assume a vendor, cloud, identity provider, database, CI system, or deployment topology.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.