Application Security

Secure-by-Design: Should Security Become a Software Architecture Requirement?

CISA's secure-by-design guidance, expanded last month with more international partners, asks software makers to treat security as a core business requirement. For architects, that means making security a first-class quality attribute: specified, designed, tested and reviewed like performance or availability. Here is how.

By EthicalHat Research · · 3 min read
Infographic: Security as an architecture requirement

In April, CISA and partner agencies published their secure-by-design principles, and in May we asked whether security should start with the developer. Last month, CISA released an expanded version of the guidance, co-sealed by a larger group of international agencies, with more detail on how software makers can demonstrate they are building secure products.

The guidance speaks mainly to executives and product leaders. But its core idea, that security should be designed in rather than tested in, lands squarely on software architecture. Should security be an architecture requirement? We think the answer is yes, and that it should be treated with the same rigour as any other quality attribute.

Security as a quality attribute

Architects already work with quality attributes: performance, scalability, availability, maintainability. Each has explicit requirements ("p99 latency under 300 ms"), design tactics (caching, replication), trade-offs and verification (load tests).

Security is often handled differently: as a checklist applied late, or as a separate team's concern. Treating it as a first-class quality attribute means:

  • explicit, testable requirements,
  • design tactics chosen deliberately,
  • trade-offs recorded and reviewed, and
  • continuous verification.

Step 1: specify measurable requirements

"The system must be secure" cannot be designed or tested. Better:

  • "All service-to-service traffic is mutually authenticated and encrypted."
  • "Every data access is authorised against the calling user's tenant; cross-tenant access is impossible through any API."
  • "No service holds long-lived cloud credentials; all use workload identity."
  • "Administrative actions require phishing-resistant MFA and are logged immutably."
  • "Customer data at rest is encrypted with keys managed per region."

Step 2: threat-model the architecture

Threat modelling at the architecture level asks what can go wrong at each trust boundary: between users and the edge, between services, between the application and its data stores, and with third parties. Frameworks such as STRIDE give structure; the output is a set of threats mapped to design decisions.

flowchart LR
  U[Users] -->|TLS, auth| Edge[API gateway]
  Edge -->|mTLS, identity| S1[Orders service]
  Edge -->|mTLS, identity| S2[Payments service]
  S1 -->|scoped creds| DB1[(Orders DB)]
  S2 -->|scoped creds| DB2[(Payments DB<br/>PCI scope)]
  S2 -->|outbound allow-list| PSP[Payment provider]
  classDef boundary stroke-dasharray: 5 5

Every arrow is a trust boundary with questions attached: who is authenticated, what is authorised, what is logged, and what happens if the component on the other side is compromised?

Step 3: choose patterns that eliminate vulnerability classes

The secure-by-design guidance emphasises removing classes of vulnerability rather than finding instances. Architecture is where that happens:

Vulnerability classArchitectural tactic
InjectionData access layer with parameterised queries only; no string-built SQL anywhere
Broken access controlCentralised authorisation service or policy engine; tenant-scoped data access by construction
Memory corruptionMemory-safe languages for new components, especially parsers
Credential theftWorkload identity and short-lived tokens; no static secrets
Lateral movementService identity, mTLS and default-deny network policy
Sensitive data exposureData classification, field-level encryption, minimisation

Step 4: record decisions and trade-offs

Security decisions involve trade-offs with cost, latency, usability and delivery time. Record them in architecture decision records (ADRs) so they are explicit and revisitable:

markdown
# ADR-0142: Centralise authorisation in a policy service

## Status
Accepted

## Context
Authorisation logic is duplicated across 14 services; two recent pentest findings were
inconsistent tenant checks. Secure-by-design goal: cross-tenant access impossible by construction.

## Decision
All services call the policy decision point (OPA sidecar) for resource access decisions.
Data access libraries require an authorisation context; queries without one fail to compile.

## Consequences
+ One place to reason about and test authorisation rules
+ Removes a vulnerability class rather than individual bugs
- Adds ~2 ms per request; policy service becomes critical path (run as sidecar, cache decisions)
- Migration effort: ~6 sprints across teams

Step 5: verify continuously

  • Architecture fitness functions: automated checks that the architecture still meets its security requirements, such as "no service has an IAM role with wildcard actions", "no public endpoints without the gateway" or "all images signed".
  • Security tests for cross-tenant access, authentication bypass and privilege escalation in CI.
  • Threat model updates whenever architecture changes significantly.
  • Penetration tests focused on architecture assumptions, not just individual bugs.

Who owns it?

Architects own security as a quality attribute, just as they own performance. That does not remove the need for security specialists; it changes the relationship. Security teams provide threat intelligence, patterns, reviews and testing; architects make security part of every design and trade-off.

The bottom line

Should security be a software architecture requirement? Yes, not as a checklist but as a quality attribute with measurable requirements, deliberate design tactics, recorded trade-offs and continuous verification. That is how "secure by design" moves from a policy slogan to something engineering teams can build, test and demonstrate.

Our application security testing and CISO as a Service teams help organisations embed security into architecture practice, from threat modelling to fitness functions.

EthicalHat Research

The EthicalHat research team: penetration testers, SOC analysts and engineers writing about security, software engineering and AI.

Want an expert opinion on your own systems?

Email info@ethicalhat.com or call +1-844-838-4422. Our security engineers are happy to talk it through.