# violetsoul/macos-sert-audit architecture

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

- Interactive diagram: https://gitdiagram.com/violetsoul/macos-sert-audit
- Repository: https://github.com/violetsoul/macos-sert-audit

## Overview

This is a read-only macOS certificate and device-configuration audit utility. A user runs the shell script, which scans documented keychain stores and reports certificate metadata, optional trust details, and basic profile/MDM information. The README documents capabilities but no source excerpts were provided, so internal command invocations and implementation flow cannot be verified; dashed edges mark those unverified integrations.

Main entry points: [`macos-cert-audit.sh`](https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh) (Audit script)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audit["Audit runtime"]
  node_runner["Audit script"]
  node_certs["Certificate scan"]
end

subgraph group_results["Audit results"]
  node_certdata["Certificate metadata"]
  node_trust["Trust settings"]
  node_profiles["Profile and MDM"]
  node_report["Mode-specific report"]
end

subgraph group_macos["macOS sources"]
  node_keychains[("Keychain stores")]
  node_security["macOS security"]
  node_openssl["OpenSSL"]
  node_profilescmd["profiles command"]
end

node_user(("Operator"))

node_user -->|"runs"| node_runner
node_runner -->|"performs audit"| node_certs
node_certs -->|"scans"| node_keychains
node_certs -.->|"uses"| node_security
node_certs -.->|"uses"| node_openssl
node_certs -->|"collects"| node_certdata
node_runner -->|"reports on request"| node_trust
node_runner -->|"includes when supported"| node_profiles
node_runner -->|"selects report mode"| node_report
node_runner -.->|"queries"| node_profilescmd

click node_runner "https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh"
click node_certs "https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh"
click node_certdata "https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh"
click node_trust "https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh"
click node_profiles "https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh"
click node_report "https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh"

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_runner,node_certs toneBlue
class node_certdata,node_trust,node_profiles,node_report toneAmber
class node_keychains,node_security,node_openssl,node_profilescmd toneMint
class node_user toneIndigo
```

## Components

### Audit runtime

- [Audit script](https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh): `macos-cert-audit.sh`
- [Certificate scan](https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh): `macos-cert-audit.sh`

### Audit results

- [Certificate metadata](https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh): `macos-cert-audit.sh`
- [Trust settings](https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh): `macos-cert-audit.sh`
- [Profile and MDM](https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh): `macos-cert-audit.sh`
- [Mode-specific report](https://github.com/violetsoul/macos-sert-audit/blob/main/macos-cert-audit.sh): `macos-cert-audit.sh`

### macOS sources

- **Keychain stores**
- **macOS security**
- **OpenSSL**
- **profiles command**

### Other components

- **Operator**

## Connections

- Operator → Audit script: runs (evidence: `README.md`)
- Audit script → Certificate scan: performs audit (evidence: `README.md`)
- Certificate scan → Keychain stores: scans (evidence: `README.md`)
- Certificate scan → macOS security: uses
- Certificate scan → OpenSSL: uses
- Certificate scan → Certificate metadata: collects (evidence: `README.md`)
- Audit script → Trust settings: reports on request (evidence: `README.md`)
- Audit script → Profile and MDM: includes when supported (evidence: `README.md`)
- Audit script → Mode-specific report: selects report mode (evidence: `README.md`)
- Audit script → profiles command: queries
