Defense in depth

From RedHatProductSecurity/prodsec-skills · View interactive version

Defense in depth is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Apply defense-in-depth by layering multiple independent security controls. Use when reviewing system architecture, evaluating whether a single control is the only barrier, or assessing blast radius of a component compromise.

How to use this skill

Skill file

Defense in Depth

Principle: Security should be viewed holistically. Wherever possible, multiple levels of security controls should be used. No single control provides perfect security, but layering different controls makes attacks extremely complex and unlikely to succeed.

Key Aspects

Layered Security Controls

Implement multiple independent layers, each providing a different line of defense:

| Layer | Examples |

|---|---|

| Network | Firewalls, network segmentation, VPN, private subnets |

| Host | OS hardening, host-based IDS, patch management |

| Application | Input validation, authentication, authorization, output encoding |

| Data | Encryption at rest and in transit, access controls, backup |

| Monitoring | Intrusion detection, log aggregation, alerting, SIEM |

Redundancy and Diversity

Compartmentalization

Continuous Monitoring and Updating

Architecture Review Questions

When reviewing a system's security architecture, ask:

  1. What happens if the firewall/WAF is bypassed? Is there application-level input validation?
  2. What happens if authentication is compromised? Are there authorization checks on every resource?
  3. What happens if a service is breached? Can the attacker move laterally to other services?
  4. What happens if a database is accessed? Is the data encrypted at rest?
  5. What happens if an attacker operates undetected? Are there monitoring and alerting mechanisms?

If any answer is "nothing else protects us," that is a defense-in-depth gap.

Implementation Checklist

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.