principle-security

Guide secure system design around trust boundaries and access control.

2|8|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/lugassawan/swe-workbench --skill principle-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: principle-security
Source: https://github.com/lugassawan/swe-workbench/tree/main/skills/principle-security
Command: npx skills add https://github.com/lugassawan/swe-workbench --skill principle-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you prevent common security vulnerabilities by making threat thinking, validation, and access control decisions at design time instead of patching them later.

Core Features & Use Cases

  • Trust-boundary-driven validation: Identify where data crosses trust levels and enforce validation at the boundary with re-validation on every hop.
  • Correct access control design: Separate authentication from authorization, enforce default-deny, and prevent confused-deputy privilege escalation.
  • Secure secrets handling: Keep secrets out of source and logs, design rotation from day one, and use placeholder-only examples.
  • Defense in depth with least privilege: Apply fail-closed defaults, layered controls, minimal permissions, and smallest attack surface.
  • Cryptography misuse resistance: Prefer safe constructions and constant-time comparisons, with attention to key management and secure defaults.

Quick Start

Ask the skill to review your proposed auth, trust boundaries, input validation approach, and secrets/crypto plan and to highlight the highest-risk gaps and design fixes.

Frequently Asked Questions about principle-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design secure authentication and authorization separation before coding?

Designing secure authentication and authorization separation requires enforcing default-deny policies and preventing confused-deputy privilege escalation at the trust boundary. You should split identity verification from access control decisions and apply least-privilege scope to every request.

What is trust-boundary-driven input validation and when do I need it?

Trust-boundary-driven input validation enforces defensive checks wherever data crosses trust levels, requiring re-validation on every hop. You need it when handling untrusted input to mitigate common injection patterns and ensure data integrity across system layers.

What's the best way to handle secrets management and rotation from day one?

Handling secrets management securely means keeping secrets out of source code and logs, designing rotation from day one, and using placeholder-only examples. You should implement rotation-aware secret handling with minimal permissions and fail-closed defaults.

How do I apply defense in depth with least privilege to prevent security vulnerabilities?

Applying defense in depth with least privilege involves layering security controls, enforcing fail-closed defaults, and minimizing the attack surface. You should design systems with multiple independent validation checks and grant only the smallest permissions necessary.

How do I choose misuse-resistant cryptography for secure system design?

Choosing misuse-resistant cryptography means preferring safe constructions, using constant-time comparisons, and applying secure defaults for key management. You should avoid custom crypto implementations and ensure your design specifies safe algorithm choices explicitly.