Security Engineering Handbook

Purpose

Security engineering is the discipline of building systems that remain secure even when under attack.

Security is not a feature or a phase. It is a property of the entire system that must be considered from design through operations.

This handbook defines the principles, standards and practices for building and maintaining secure systems within this organization.

It builds upon the Engineering Fundamentals Handbook and Software Architecture Handbook, applying their principles to the security domain.

Scope

This handbook covers:

Principles

Defense in Depth

No single security control is sufficient. Layer multiple independent defenses so that if one fails, another provides protection.

Layers include:

Least Privilege

Every user, process and system should have only the minimum permissions necessary to perform its function.

Apply least privilege at every level:

Secure by Default

Systems should be secure in their default configuration.

Engineers should explicitly opt into reduced security, not opt into increased security. Defaults should be restrictive.

Fail Securely

When a system fails, it should fail in a secure state.

Never Trust User Input

All user input is potentially malicious until validated.

This applies to:

Security is Everyone's Responsibility

Security is not the sole responsibility of a security team.

Every engineer is responsible for understanding security principles and applying them in their work.

Threat Modeling

Threat modeling is the practice of identifying potential threats and designing mitigations before they are exploited.

When to Threat Model

STRIDE Framework

ThreatDefinitionExample
SpoofingImpersonating another userStealing session token.
or system.
TamperingModifying data or codeModifying request parameters.
without authorization.
RepudiationDenying an action wasUser claims they did not
performed.make a transaction.
InformationExposing information toLeaking customer data through
Disclosureunauthorized parties.an API endpoint.
Denial ofMaking a system unavailableFlooding an endpoint with
Serviceto legitimate users.requests to exhaust resources.
Elevation ofGaining unauthorized accessExploiting a vulnerability to
Privilegeto higher permissions.gain admin access.

Secure Development Lifecycle

Integrate security into every phase of development.

Design Phase

Development Phase

Testing Phase

Deployment Phase

Operations Phase

Common Vulnerabilities

SQL Injection

Occurs when untrusted input is concatenated into SQL queries.

Prevention:

Cross-Site Scripting (XSS)

Occurs when untrusted input is rendered in HTML without escaping.

Prevention:

Cross-Site Request Forgery (CSRF)

Occurs when an attacker tricks a user into performing an action they did not intend.

Prevention:

Insecure Direct Object Reference (IDOR)

Occurs when an attacker can access a resource by guessing or manipulating an identifier.

Prevention:

Security Misconfiguration

Occurs when default configurations are insecure.

Prevention:

Security Standards

Password Storage

Encryption

Authentication

Logging

AI Integration

AI assistants can support security engineering through:

AI limitations in security:

When using AI for security work, provide:

Capability Map

This handbook is the entry point for the Security Engineering capability. The following documents form the complete capability:

Handbooks

Glossaries

Guides

Playbooks

Checklists

Learning Paths

References

AI Workflows

Related Documents