# aniiyer-host/secureci architecture

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

- Interactive diagram: https://gitdiagram.com/aniiyer-host/secureci
- Repository: https://github.com/aniiyer-host/secureci

## Overview

SecureCI’s main workflow takes a source build through security scanning, report normalization, and PostgreSQL import, then serves persisted evidence through a REST API to a dashboard. The graph also preserves the documented scanner types and SBOM capability. Pipeline stages and dashboard behavior are documented in the README; source excerpts verify the parsers, importer, database pool, and API queries. The dashboard’s client-side implementation and Jenkinsfile were not sampled, so those links rely on README statements.

Main entry points: [`Jenkinsfile`](https://github.com/aniiyer-host/secureci/blob/main/Jenkinsfile) (Jenkins Pipeline), [`scripts/semgrep_parser.py`](https://github.com/aniiyer-host/secureci/blob/main/scripts/semgrep_parser.py) (Semgrep Parser), [`scripts/npm_audit_parser.py`](https://github.com/aniiyer-host/secureci/blob/main/scripts/npm_audit_parser.py) (npm audit Parser), [`scripts/zap_parser.py`](https://github.com/aniiyer-host/secureci/blob/main/scripts/zap_parser.py) (ZAP Parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Build and Scanning"]
  node_jenkins["Jenkins Pipeline"]
  node_target["Test Application<br/>[server.js]"]
  node_scanners{{"Security Scanners"}}
end

subgraph group_normalization["Report Normalization"]
  node_semgrep["Semgrep Parser<br/>[semgrep_parser.py]"]
  node_npmparser["npm audit Parser"]
  node_zappar["ZAP Parser<br/>[zap_parser.py]"]
  node_syftparser["Syft Parser<br/>[syft_parser.py]"]
  node_fingerprint["Fingerprinting<br/>[fingerprint.py]"]
end

subgraph group_persistence["Evidence Storage"]
  node_importer["Report Importer<br/>[importer.js]"]
  node_dbpool["PostgreSQL Pool<br/>[db.js]"]
  node_postgres[("Evidence Database<br/>[schema.sql]")]
end

subgraph group_presentation["Dashboard and API"]
  node_api["REST API<br/>[app.js]"]
  node_dashboard["Security Dashboard<br/>[index.html]"]
end

node_github(("GitHub"))

node_github -->|"provides source"| node_jenkins
node_jenkins -->|"runs scans"| node_scanners
node_jenkins -->|"builds and starts"| node_target
node_scanners -->|"Semgrep output"| node_semgrep
node_scanners -->|"npm audit output"| node_npmparser
node_scanners -->|"ZAP output"| node_zappar
node_scanners -->|"Syft output"| node_syftparser
node_jenkins -->|"runs parser"| node_semgrep
node_jenkins -->|"runs parser"| node_npmparser
node_jenkins -->|"runs parser"| node_zappar
node_jenkins -->|"runs parser"| node_syftparser
node_semgrep -->|"generates IDs"| node_fingerprint
node_npmparser -->|"generates IDs"| node_fingerprint
node_zappar -->|"generates IDs"| node_fingerprint
node_jenkins -->|"imports reports"| node_importer
node_importer -->|"queries through"| node_dbpool
node_dbpool -->|"connects to"| node_postgres
node_api -->|"queries"| node_dbpool
node_dashboard -->|"loads dashboard data"| node_api

click node_jenkins "https://github.com/aniiyer-host/secureci/blob/main/Jenkinsfile"
click node_target "https://github.com/aniiyer-host/secureci/blob/main/target-app/server.js"
click node_semgrep "https://github.com/aniiyer-host/secureci/blob/main/scripts/semgrep_parser.py"
click node_npmparser "https://github.com/aniiyer-host/secureci/blob/main/scripts/npm_audit_parser.py"
click node_zappar "https://github.com/aniiyer-host/secureci/blob/main/scripts/zap_parser.py"
click node_syftparser "https://github.com/aniiyer-host/secureci/blob/main/scripts/syft_parser.py"
click node_fingerprint "https://github.com/aniiyer-host/secureci/blob/main/scripts/fingerprint.py"
click node_importer "https://github.com/aniiyer-host/secureci/blob/main/server/importer.js"
click node_dbpool "https://github.com/aniiyer-host/secureci/blob/main/server/db.js"
click node_postgres "https://github.com/aniiyer-host/secureci/blob/main/database/schema.sql"
click node_api "https://github.com/aniiyer-host/secureci/blob/main/app.js"
click node_dashboard "https://github.com/aniiyer-host/secureci/blob/main/public/index.html"

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_jenkins,node_target,node_scanners toneBlue
class node_semgrep,node_npmparser,node_zappar,node_syftparser,node_fingerprint toneAmber
class node_importer,node_dbpool,node_postgres toneMint
class node_api,node_dashboard toneRose
class node_github toneIndigo
```

## Components

### Build and Scanning

- [Jenkins Pipeline](https://github.com/aniiyer-host/secureci/blob/main/Jenkinsfile): `Jenkinsfile`
- [Test Application](https://github.com/aniiyer-host/secureci/blob/main/target-app/server.js): `target-app/server.js`
- **Security Scanners**

### Report Normalization

- [Semgrep Parser](https://github.com/aniiyer-host/secureci/blob/main/scripts/semgrep_parser.py): `scripts/semgrep_parser.py`
- [npm audit Parser](https://github.com/aniiyer-host/secureci/blob/main/scripts/npm_audit_parser.py): `scripts/npm_audit_parser.py`
- [ZAP Parser](https://github.com/aniiyer-host/secureci/blob/main/scripts/zap_parser.py): `scripts/zap_parser.py`
- [Syft Parser](https://github.com/aniiyer-host/secureci/blob/main/scripts/syft_parser.py): `scripts/syft_parser.py`
- [Fingerprinting](https://github.com/aniiyer-host/secureci/blob/main/scripts/fingerprint.py): `scripts/fingerprint.py`

### Evidence Storage

- [Report Importer](https://github.com/aniiyer-host/secureci/blob/main/server/importer.js): `server/importer.js`
- [PostgreSQL Pool](https://github.com/aniiyer-host/secureci/blob/main/server/db.js): `server/db.js`
- [Evidence Database](https://github.com/aniiyer-host/secureci/blob/main/database/schema.sql): `database/schema.sql`

### Dashboard and API

- [REST API](https://github.com/aniiyer-host/secureci/blob/main/app.js): `app.js`
- [Security Dashboard](https://github.com/aniiyer-host/secureci/blob/main/public/index.html): `public/index.html`

### Other components

- **GitHub**

## Connections

- GitHub → Jenkins Pipeline: provides source (evidence: `README.md`)
- Jenkins Pipeline → Security Scanners: runs scans (evidence: `README.md`)
- Jenkins Pipeline → Test Application: builds and starts (evidence: `README.md`)
- Security Scanners → Semgrep Parser: Semgrep output (evidence: `README.md`)
- Security Scanners → npm audit Parser: npm audit output (evidence: `README.md`)
- Security Scanners → ZAP Parser: ZAP output (evidence: `README.md`)
- Security Scanners → Syft Parser: Syft output (evidence: `README.md`)
- Jenkins Pipeline → Semgrep Parser: runs parser (evidence: `README.md`)
- Jenkins Pipeline → npm audit Parser: runs parser (evidence: `README.md`)
- Jenkins Pipeline → ZAP Parser: runs parser (evidence: `README.md`)
- Jenkins Pipeline → Syft Parser: runs parser (evidence: `README.md`)
- Semgrep Parser → Fingerprinting: generates IDs (evidence: `scripts/semgrep_parser.py`)
- npm audit Parser → Fingerprinting: generates IDs (evidence: `scripts/npm_audit_parser.py`)
- ZAP Parser → Fingerprinting: generates IDs (evidence: `scripts/zap_parser.py`)
- Jenkins Pipeline → Report Importer: imports reports (evidence: `README.md`)
- Report Importer → PostgreSQL Pool: queries through (evidence: `server/importer.js`)
- PostgreSQL Pool → Evidence Database: connects to (evidence: `server/db.js`)
- REST API → PostgreSQL Pool: queries (evidence: `app.js`)
- Security Dashboard → REST API: loads dashboard data (evidence: `README.md`)
