# friendsofphp/security-advisories architecture

> Architecture diagram of the GitHub repository friendsofphp/security-advisories, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/friendsofphp/security-advisories
- Repository: https://github.com/friendsofphp/security-advisories

## Overview

This repository is a community-maintained database of PHP security advisories, organized by Composer package and consumed by `composer audit`. Contributors add YAML records; the separate `validator.php` command scans records and checks their structure and values. The tree shows the advisory corpus distributed across many package directories, so it has no single exact source path. The validator excerpt is partial; its internal validation stages are consolidated rather than inferred beyond what is shown.

Main entry points: [`validator.php`](https://github.com/friendsofphp/security-advisories/blob/master/validator.php) (Validator command)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_advisories["Advisory database"]
  node_records["Advisory records"]
end

subgraph group_validation["Validation"]
  node_validator["Validator command<br/>[validator.php]"]
end

node_contributors(("Contributors"))
node_composer_audit["Composer audit"]

node_contributors -->|"submit YAML"| node_records
node_composer_audit -->|"checks dependencies"| node_records
node_validator -->|"scans and validates"| node_records

click node_validator "https://github.com/friendsofphp/security-advisories/blob/master/validator.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_records toneBlue
class node_validator toneAmber
class node_contributors,node_composer_audit toneIndigo
```

## Components

### Advisory database

- **Advisory records**

### Validation

- [Validator command](https://github.com/friendsofphp/security-advisories/blob/master/validator.php): `validator.php`

### Other components

- **Contributors**
- **Composer audit**

## Connections

- Contributors → Advisory records: submit YAML (evidence: `README.md`)
- Composer audit → Advisory records: checks dependencies (evidence: `README.md`)
- Validator command → Advisory records: scans and validates (evidence: `validator.php`)
