# parijagitsss/vulnscope architecture

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

- Interactive diagram: https://gitdiagram.com/parijagitsss/vulnscope
- Repository: https://github.com/parijagitsss/vulnscope

## Overview

VulnScope is a local-only Flask employee portal built as a hands-on web application VAPT lab. Users explore the portal through login, directory, tickets, and settings; the assessment script then exercises the same HTTP endpoints, records findings, and supports remediation verification. The graph covers the documented portal capabilities and the documented assessment/reporting branch. Source excerpts show the app-to-database and scanner-to-HTTP interactions; unsampled templates and styles are represented only where the README establishes their role.

Main entry points: [`app/app.py`](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py) (Flask Routes), [`app/database.py`](https://github.com/parijagitsss/vulnscope/blob/main/app/database.py) (SQLite Data), [`scanner/run_assessment.py`](https://github.com/parijagitsss/vulnscope/blob/main/scanner/run_assessment.py) (Assessment Runner), [`app/templates`](https://github.com/parijagitsss/vulnscope/tree/main/app/templates) (Portal Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Employee Portal"]
  node_flask["Flask Routes<br/>[app.py]"]
  node_dashboard["Dashboard<br/>[app.py]"]
  node_directory["Employee Directory<br/>[app.py]"]
  node_ticket_views["Ticket Views<br/>[app.py]"]
  node_ticket_comments["Ticket Comments<br/>[app.py]"]
  node_settings["Account Settings<br/>[app.py]"]
  node_portal_ui["Portal Interface"]
  node_portal_js["Navigation Toggle<br/>[portal.js]"]
end

subgraph group_security["Security Controls"]
  node_auth["Authentication<br/>[app.py]"]
  node_security_controls["Request Security<br/>[app.py]"]
end

subgraph group_assessment["Assessment Workflow"]
  node_scanner["Assessment Runner<br/>[run_assessment.py]"]
  node_findings["Assessment Findings<br/>[run_assessment.py]"]
  node_vapt_report["VAPT Report<br/>[VAPT_REPORT.md]"]
end

subgraph group_persistence["Portal Data"]
  node_sqlite[("SQLite Data<br/>[database.py]")]
end

node_employee(("Portal User"))
node_http_target(("Local HTTP Portal"))
node_security_tools["Security Tools"]

node_employee -->|"uses portal"| node_flask
node_flask -->|"routes login"| node_auth
node_flask -->|"routes dashboard"| node_dashboard
node_flask -->|"routes search"| node_directory
node_flask -->|"routes tickets"| node_ticket_views
node_flask -->|"routes comments"| node_ticket_comments
node_flask -->|"routes settings"| node_settings
node_flask -->|"enforces controls"| node_security_controls
node_portal_ui -.->|"loads script"| node_portal_js
node_auth -->|"reads users"| node_sqlite
node_dashboard -->|"reads portal data"| node_sqlite
node_directory -->|"searches employees"| node_sqlite
node_ticket_views -->|"reads tickets"| node_sqlite
node_ticket_comments -->|"reads and writes"| node_sqlite
node_settings -->|"updates profile"| node_sqlite
node_scanner -->|"sends test requests"| node_http_target
node_http_target -.->|"routes requests"| node_flask
node_scanner -->|"writes findings"| node_findings
node_scanner -.->|"documents methodology"| node_vapt_report
node_security_tools -.->|"assesses portal"| node_http_target

click node_flask "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_auth "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_dashboard "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_directory "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_ticket_views "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_ticket_comments "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_settings "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_security_controls "https://github.com/parijagitsss/vulnscope/blob/main/app/app.py"
click node_portal_ui "https://github.com/parijagitsss/vulnscope/tree/main/app/templates"
click node_portal_js "https://github.com/parijagitsss/vulnscope/blob/main/app/static/portal.js"
click node_sqlite "https://github.com/parijagitsss/vulnscope/blob/main/app/database.py"
click node_scanner "https://github.com/parijagitsss/vulnscope/blob/main/scanner/run_assessment.py"
click node_findings "https://github.com/parijagitsss/vulnscope/blob/main/scanner/run_assessment.py"
click node_vapt_report "https://github.com/parijagitsss/vulnscope/blob/main/docs/VAPT_REPORT.md"

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_flask,node_dashboard,node_directory,node_ticket_views,node_ticket_comments,node_settings,node_portal_ui,node_portal_js,node_employee toneBlue
class node_auth,node_security_controls toneAmber
class node_scanner,node_findings,node_vapt_report toneMint
class node_sqlite toneRose
class node_http_target,node_security_tools toneIndigo
```

## Components

### Employee Portal

- [Flask Routes](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`
- [Dashboard](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`
- [Employee Directory](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`
- [Ticket Views](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`
- [Ticket Comments](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`
- [Account Settings](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`
- [Portal Interface](https://github.com/parijagitsss/vulnscope/tree/main/app/templates): `app/templates`
- [Navigation Toggle](https://github.com/parijagitsss/vulnscope/blob/main/app/static/portal.js): `app/static/portal.js`

### Security Controls

- [Authentication](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`
- [Request Security](https://github.com/parijagitsss/vulnscope/blob/main/app/app.py): `app/app.py`

### Assessment Workflow

- [Assessment Runner](https://github.com/parijagitsss/vulnscope/blob/main/scanner/run_assessment.py): `scanner/run_assessment.py`
- [Assessment Findings](https://github.com/parijagitsss/vulnscope/blob/main/scanner/run_assessment.py): `scanner/run_assessment.py`
- [VAPT Report](https://github.com/parijagitsss/vulnscope/blob/main/docs/VAPT_REPORT.md): `docs/VAPT_REPORT.md`

### Portal Data

- [SQLite Data](https://github.com/parijagitsss/vulnscope/blob/main/app/database.py): `app/database.py`

### Other components

- **Portal User**
- **Local HTTP Portal**
- **Security Tools**

## Connections

- Portal User → Flask Routes: uses portal (evidence: `README.md`)
- Flask Routes → Authentication: routes login (evidence: `app/app.py`)
- Flask Routes → Dashboard: routes dashboard (evidence: `app/app.py`)
- Flask Routes → Employee Directory: routes search (evidence: `app/app.py`)
- Flask Routes → Ticket Views: routes tickets (evidence: `app/app.py`)
- Flask Routes → Ticket Comments: routes comments (evidence: `app/app.py`)
- Flask Routes → Account Settings: routes settings (evidence: `app/app.py`)
- Flask Routes → Request Security: enforces controls (evidence: `app/app.py`)
- Portal Interface → Navigation Toggle: loads script
- Authentication → SQLite Data: reads users (evidence: `app/app.py`)
- Dashboard → SQLite Data: reads portal data (evidence: `app/app.py`)
- Employee Directory → SQLite Data: searches employees (evidence: `app/app.py`)
- Ticket Views → SQLite Data: reads tickets (evidence: `app/app.py`)
- Ticket Comments → SQLite Data: reads and writes (evidence: `app/app.py`)
- Account Settings → SQLite Data: updates profile (evidence: `app/app.py`)
- Assessment Runner → Local HTTP Portal: sends test requests (evidence: `scanner/run_assessment.py`)
- Local HTTP Portal → Flask Routes: routes requests
- Assessment Runner → Assessment Findings: writes findings (evidence: `scanner/run_assessment.py`)
- Assessment Runner → VAPT Report: documents methodology (evidence: `README.md`)
- Security Tools → Local HTTP Portal: assesses portal (evidence: `README.md`)
