# tolugit/aws-app-security-testing-pipeline architecture

> Architecture diagram of the GitHub repository tolugit/aws-app-security-testing-pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tolugit/aws-app-security-testing-pipeline
- Repository: https://github.com/tolugit/aws-app-security-testing-pipeline

## Overview

This is a Spring Boot dashboard microservice with a widget-count endpoint and two widget lookup variants: one intentionally SQL-injection-vulnerable raw query and one parameterized-equivalent lookup. The request handler owns calls to the repository and JDBC layer; both reach the database through separate paths. The tree includes PostgreSQL and ZAP deployment manifests, and source comments describe ZAP/OpenRASP testing intent, but their runtime wiring is not shown in the sampled source, so those flows are omitted.

Main entry points: [`app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java`](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java) (Widget endpoints), [`app/dashboard-service/src/main/java/com/ast/dashboard/WidgetRepository.java`](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetRepository.java) (Widget repository), [`app/dashboard-service/src/main/java/com/ast/dashboard/DashboardServiceApplication.java`](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/DashboardServiceApplication.java) (Spring Boot app), [`app/dashboard-service/src/main/java/com/ast/dashboard/Widget.java`](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/Widget.java) (Widget entity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_controller["Widget endpoints"]
end

subgraph group_persistence["Persistence"]
  node_repository["Widget repository"]
  node_jdbc["Raw SQL access"]
  node_widget["Widget entity<br/>[Widget.java]"]
end

subgraph group_runtime["Service Runtime"]
  node_application["Spring Boot app"]
end

node_client(("API client"))
node_postgres[("PostgreSQL")]

node_application -->|"starts service"| node_controller
node_client -->|"calls routes"| node_controller
node_controller -->|"counts / filters"| node_repository
node_controller -->|"runs raw query"| node_jdbc
node_repository -->|"maps entity"| node_widget
node_repository -->|"reads / counts"| node_postgres
node_jdbc -->|"queries"| node_postgres

click node_application "https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/DashboardServiceApplication.java"
click node_controller "https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java"
click node_repository "https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetRepository.java"
click node_jdbc "https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java"
click node_widget "https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/Widget.java"

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_controller,node_client toneBlue
class node_repository,node_jdbc,node_widget,node_postgres toneAmber
class node_application toneMint
```

## Components

### HTTP API

- [Widget endpoints](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java): `app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java`

### Persistence

- [Widget repository](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetRepository.java): `app/dashboard-service/src/main/java/com/ast/dashboard/WidgetRepository.java`
- [Raw SQL access](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java): `app/dashboard-service/src/main/java/com/ast/dashboard/WidgetController.java`
- [Widget entity](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/Widget.java): `app/dashboard-service/src/main/java/com/ast/dashboard/Widget.java`

### Service Runtime

- [Spring Boot app](https://github.com/tolugit/aws-app-security-testing-pipeline/blob/main/app/dashboard-service/src/main/java/com/ast/dashboard/DashboardServiceApplication.java): `app/dashboard-service/src/main/java/com/ast/dashboard/DashboardServiceApplication.java`

### Other components

- **API client**
- **PostgreSQL**

## Connections

- Spring Boot app → Widget endpoints: starts service
- API client → Widget endpoints: calls routes
- Widget endpoints → Widget repository: counts / filters
- Widget endpoints → Raw SQL access: runs raw query
- Widget repository → Widget entity: maps entity
- Widget repository → PostgreSQL: reads / counts
- Raw SQL access → PostgreSQL: queries
