# arhavinth/cloud-native-security-platform architecture

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

- Interactive diagram: https://gitdiagram.com/arhavinth/cloud-native-security-platform
- Repository: https://github.com/arhavinth/cloud-native-security-platform

## Overview

This is a cloud-native security platform spanning CI security checks, GitOps deployment, Kubernetes/Istio enforcement, telemetry, and AI-assisted investigation. The principal investigation flow is denial telemetry from Prometheus, structured as evidence by the analyst, assessed through Ollama, and returned for human review. The demo API and runtime policy provide the secured workload context. AI implementation and the demo API were sampled; links among unsampled deployment and observability components reflect README documentation.

Main entry points: [`prometheus.yaml`](https://github.com/arhavinth/cloud-native-security-platform/blob/master/prometheus.yaml) (Prometheus), [`ai-security/app/main.py`](https://github.com/arhavinth/cloud-native-security-platform/blob/master/ai-security/app/main.py) (AI Security Analyst), [`.github/workflows/security-pipeline.yml`](https://github.com/arhavinth/cloud-native-security-platform/blob/master/.github/workflows/security-pipeline.yml) (Security Pipeline), [`kubernetes/base/peer-authentication.yaml`](https://github.com/arhavinth/cloud-native-security-platform/blob/master/kubernetes/base/peer-authentication.yaml) (Istio Runtime Security)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["Delivery and Provisioning"]
  node_ci["Security Pipeline"]
  node_registry[("Container Registry")]
  node_gitops["Argo CD<br/>[application.yaml]"]
  node_terraform["Infrastructure Provisioning<br/>[main.tf]"]
end

subgraph group_runtime["Kubernetes Runtime Security"]
  node_cluster["Kubernetes Cluster"]
  node_demo["Security Demo API<br/>[main.py]"]
  node_mesh["Istio Runtime Security"]
  node_authorization["Authorization Policy"]
  node_security_test["Security Test Client"]
  node_opa["Policy Validation<br/>[security.rego]"]
end

subgraph group_observability["Telemetry and Observability"]
  node_prometheus[("Prometheus<br/>[prometheus.yaml]")]
  node_prom_config["Prometheus Configuration"]
  node_grafana["Grafana"]
end

subgraph group_analysis["AI Security Analysis"]
  node_analyst["AI Security Analyst<br/>[main.py]"]
  node_ollama["Ollama Qwen"]
end

node_developer(("Developer"))
node_reviewer(("Human Security Reviewer"))

node_developer -->|"triggers checks"| node_ci
node_ci -->|"builds image"| node_registry
node_registry -->|"supplies image"| node_cluster
node_gitops -->|"reconciles config"| node_cluster
node_terraform -.->|"provisions infrastructure"| node_cluster
node_security_test -->|"tests access"| node_demo
node_mesh -->|"enforces policy"| node_authorization
node_authorization -->|"allows workload access"| node_demo
node_opa -->|"validates policy"| node_ci
node_prom_config -.->|"configures collection"| node_prometheus
node_mesh -->|"emits denial telemetry"| node_prometheus
node_prometheus -->|"provides telemetry"| node_grafana
node_analyst -->|"queries denial evidence"| node_prometheus
node_analyst -->|"requests assessment"| node_ollama
node_analyst -->|"returns findings"| node_reviewer
node_reviewer -->|"guides improvements"| node_gitops

click node_ci "https://github.com/arhavinth/cloud-native-security-platform/blob/master/.github/workflows/security-pipeline.yml"
click node_gitops "https://github.com/arhavinth/cloud-native-security-platform/blob/master/argocd/application.yaml"
click node_terraform "https://github.com/arhavinth/cloud-native-security-platform/blob/master/infrastructure/terraform/main.tf"
click node_demo "https://github.com/arhavinth/cloud-native-security-platform/blob/master/application/app/main.py"
click node_mesh "https://github.com/arhavinth/cloud-native-security-platform/blob/master/kubernetes/base/peer-authentication.yaml"
click node_authorization "https://github.com/arhavinth/cloud-native-security-platform/blob/master/kubernetes/base/authorization-policy.yaml"
click node_security_test "https://github.com/arhavinth/cloud-native-security-platform/blob/master/kubernetes/base/security-test-client.yaml"
click node_opa "https://github.com/arhavinth/cloud-native-security-platform/blob/master/policy/kubernetes/security.rego"
click node_prometheus "https://github.com/arhavinth/cloud-native-security-platform/blob/master/prometheus.yaml"
click node_prom_config "https://github.com/arhavinth/cloud-native-security-platform/blob/master/prometheus-config.yaml"
click node_analyst "https://github.com/arhavinth/cloud-native-security-platform/blob/master/ai-security/app/main.py"

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_ci,node_registry,node_gitops,node_terraform,node_reviewer toneBlue
class node_cluster,node_demo,node_mesh,node_authorization,node_security_test,node_opa toneAmber
class node_prometheus,node_prom_config,node_grafana toneMint
class node_analyst,node_ollama toneRose
class node_developer toneIndigo
```

## Components

### Delivery and Provisioning

- [Security Pipeline](https://github.com/arhavinth/cloud-native-security-platform/blob/master/.github/workflows/security-pipeline.yml): `.github/workflows/security-pipeline.yml`
- **Container Registry**
- [Argo CD](https://github.com/arhavinth/cloud-native-security-platform/blob/master/argocd/application.yaml): `argocd/application.yaml`
- [Infrastructure Provisioning](https://github.com/arhavinth/cloud-native-security-platform/blob/master/infrastructure/terraform/main.tf): `infrastructure/terraform/main.tf`

### Kubernetes Runtime Security

- **Kubernetes Cluster**
- [Security Demo API](https://github.com/arhavinth/cloud-native-security-platform/blob/master/application/app/main.py): `application/app/main.py`
- [Istio Runtime Security](https://github.com/arhavinth/cloud-native-security-platform/blob/master/kubernetes/base/peer-authentication.yaml): `kubernetes/base/peer-authentication.yaml`
- [Authorization Policy](https://github.com/arhavinth/cloud-native-security-platform/blob/master/kubernetes/base/authorization-policy.yaml): `kubernetes/base/authorization-policy.yaml`
- [Security Test Client](https://github.com/arhavinth/cloud-native-security-platform/blob/master/kubernetes/base/security-test-client.yaml): `kubernetes/base/security-test-client.yaml`
- [Policy Validation](https://github.com/arhavinth/cloud-native-security-platform/blob/master/policy/kubernetes/security.rego): `policy/kubernetes/security.rego`

### Telemetry and Observability

- [Prometheus](https://github.com/arhavinth/cloud-native-security-platform/blob/master/prometheus.yaml): `prometheus.yaml`
- [Prometheus Configuration](https://github.com/arhavinth/cloud-native-security-platform/blob/master/prometheus-config.yaml): `prometheus-config.yaml`
- **Grafana**

### AI Security Analysis

- [AI Security Analyst](https://github.com/arhavinth/cloud-native-security-platform/blob/master/ai-security/app/main.py): `ai-security/app/main.py`
- **Ollama Qwen**

### Other components

- **Developer**
- **Human Security Reviewer**

## Connections

- Developer → Security Pipeline: triggers checks (evidence: `README.md`)
- Security Pipeline → Container Registry: builds image (evidence: `README.md`)
- Container Registry → Kubernetes Cluster: supplies image (evidence: `README.md`)
- Argo CD → Kubernetes Cluster: reconciles config (evidence: `README.md`)
- Infrastructure Provisioning → Kubernetes Cluster: provisions infrastructure
- Security Test Client → Security Demo API: tests access (evidence: `README.md`)
- Istio Runtime Security → Authorization Policy: enforces policy (evidence: `README.md`)
- Authorization Policy → Security Demo API: allows workload access (evidence: `README.md`)
- Policy Validation → Security Pipeline: validates policy (evidence: `README.md`)
- Prometheus Configuration → Prometheus: configures collection
- Istio Runtime Security → Prometheus: emits denial telemetry (evidence: `README.md`)
- Prometheus → Grafana: provides telemetry (evidence: `README.md`)
- AI Security Analyst → Prometheus: queries denial evidence (evidence: `ai-security/app/main.py`)
- AI Security Analyst → Ollama Qwen: requests assessment (evidence: `ai-security/app/main.py`)
- AI Security Analyst → Human Security Reviewer: returns findings (evidence: `README.md`)
- Human Security Reviewer → Argo CD: guides improvements (evidence: `README.md`)
