# lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform architecture

> Architecture diagram of the GitHub repository lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform
- Repository: https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform

## Overview

VulnerFix is a Django vulnerability assessment and remediation platform. Users authenticate, submit authorized source code, and receive scan findings; the scan task runs isolated static analysis, normalizes findings, and matches them to the vulnerability knowledge base. Developers can review findings and remediation proposals, while reports summarize scan and fix outcomes. The README documents Bandit, Semgrep, custom rules, and sandbox restrictions; unsampled views and integrations are shown only where documented or referenced by the index.

Main entry points: [`apps/scans/tasks.py`](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/tasks.py) (Scan Task), [`apps/scans/user_views.py`](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/user_views.py) (Scan Portal), [`apps/detection/detector.py`](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/detection/detector.py) (Sandboxed Detection), [`apps/reports/views.py`](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/reports/views.py) (Report Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Scanning"]
  node_account_views["Account Views<br/>[views.py]"]
  node_scan_portal["Scan Portal<br/>[user_views.py]"]
  node_scan_tasks["Scan Task<br/>[tasks.py]"]
  node_scan_store[("Scans and Findings<br/>[models.py]")]
end

subgraph group_analysis["Detection and Matching"]
  node_detector["Sandboxed Detection<br/>[detector.py]"]
  node_sandbox_runner["Scanner Runner<br/>[detector_runner.py]"]
  node_normalizer["Finding Normalizer<br/>[normalizer.py]"]
  node_payloads["Test Payloads<br/>[library.py]"]
  node_matcher["Vulnerability Matcher<br/>[matcher.py]"]
  node_knowledge_store[("Knowledge and Feedback<br/>[models.py]")]
  node_knowledge_views["Knowledge Management<br/>[views.py]"]
end

subgraph group_remediation["Remediation"]
  node_fix_views["Fix Review<br/>[views.py]"]
  node_fix_engine["Template Fix Engine<br/>[engine.py]"]
  node_fix_templates["Reviewed Fix Templates<br/>[__init__.py]"]
  node_verification["Fix Verification<br/>[verification.py]"]
  node_fix_tasks["Remediation Tasks<br/>[tasks.py]"]
  node_fix_store[("Fix Proposals<br/>[models.py]")]
end

subgraph group_reporting["Reporting"]
  node_report_views["Report Views<br/>[views.py]"]
  node_metrics["Evaluation Metrics<br/>[metrics.py]"]
  node_pdf["PDF Reports<br/>[pdf.py]"]
end

node_user(("User"))
node_developer(("Developer"))
node_celery["Celery Worker<br/>[celery.py]"]
node_broker["Redis Broker"]

node_user -->|"authenticates"| node_account_views
node_developer -->|"authenticates"| node_account_views
node_account_views -.->|"accesses portal"| node_scan_portal
node_user -->|"submits code"| node_scan_portal
node_scan_portal -->|"queues scan"| node_scan_tasks
node_scan_portal -->|"creates scan"| node_scan_store
node_scan_tasks -->|"updates findings"| node_scan_store
node_scan_tasks -->|"runs analysis"| node_detector
node_scan_tasks -->|"normalizes output"| node_normalizer
node_scan_tasks -->|"matches findings"| node_matcher
node_detector -->|"runs in container"| node_sandbox_runner
node_detector -.->|"uses test payloads"| node_payloads
node_matcher -->|"reads vulnerability data"| node_knowledge_store
node_knowledge_views -->|"manages knowledge"| node_knowledge_store
node_knowledge_views -->|"queues retraining"| node_matcher
node_developer -->|"teaches vulnerabilities"| node_knowledge_views
node_developer -->|"reviews fixes"| node_fix_views
node_fix_views -.->|"requests proposal"| node_fix_engine
node_fix_engine -->|"applies template"| node_fix_templates
node_fix_tasks -->|"verifies fix"| node_verification
node_verification -->|"reruns analysis"| node_detector
node_verification -->|"updates proposal"| node_fix_store
node_report_views -->|"computes metrics"| node_metrics
node_report_views -->|"generates PDF"| node_pdf
node_report_views -->|"reads scans"| node_scan_store
node_metrics -->|"reads feedback"| node_knowledge_store
node_metrics -->|"reads fix outcomes"| node_fix_store
node_scan_tasks -.->|"runs as task"| node_celery
node_celery -.->|"dispatches tasks"| node_broker

click node_account_views "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/accounts/views.py"
click node_scan_portal "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/user_views.py"
click node_scan_tasks "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/tasks.py"
click node_scan_store "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/models.py"
click node_detector "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/detection/detector.py"
click node_sandbox_runner "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/sandbox/detector_runner.py"
click node_normalizer "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/detection/normalizer.py"
click node_payloads "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/detection/payloads/library.py"
click node_matcher "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/knowledge/matcher.py"
click node_knowledge_store "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/knowledge/models.py"
click node_knowledge_views "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/knowledge/views.py"
click node_fix_views "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/views.py"
click node_fix_engine "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/engine.py"
click node_fix_templates "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/templates_fix/__init__.py"
click node_verification "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/verification.py"
click node_fix_tasks "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/tasks.py"
click node_fix_store "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/models.py"
click node_report_views "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/reports/views.py"
click node_metrics "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/reports/metrics.py"
click node_pdf "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/reports/pdf.py"
click node_celery "https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/config/celery.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_account_views,node_scan_portal,node_scan_tasks,node_scan_store,node_user toneBlue
class node_detector,node_sandbox_runner,node_normalizer,node_payloads,node_matcher,node_knowledge_store,node_knowledge_views,node_broker toneAmber
class node_fix_views,node_fix_engine,node_fix_templates,node_verification,node_fix_tasks,node_fix_store toneMint
class node_report_views,node_metrics,node_pdf,node_celery toneRose
class node_developer toneIndigo
```

## Components

### Access and Scanning

- [Account Views](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/accounts/views.py): `apps/accounts/views.py`
- [Scan Portal](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/user_views.py): `apps/scans/user_views.py`
- [Scan Task](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/tasks.py): `apps/scans/tasks.py`
- [Scans and Findings](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/scans/models.py): `apps/scans/models.py`

### Detection and Matching

- [Sandboxed Detection](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/detection/detector.py): `apps/detection/detector.py`
- [Scanner Runner](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/sandbox/detector_runner.py): `sandbox/detector_runner.py`
- [Finding Normalizer](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/detection/normalizer.py): `apps/detection/normalizer.py`
- [Test Payloads](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/detection/payloads/library.py): `apps/detection/payloads/library.py`
- [Vulnerability Matcher](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/knowledge/matcher.py): `apps/knowledge/matcher.py`
- [Knowledge and Feedback](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/knowledge/models.py): `apps/knowledge/models.py`
- [Knowledge Management](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/knowledge/views.py): `apps/knowledge/views.py`

### Remediation

- [Fix Review](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/views.py): `apps/remediation/views.py`
- [Template Fix Engine](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/engine.py): `apps/remediation/engine.py`
- [Reviewed Fix Templates](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/templates_fix/__init__.py): `apps/remediation/templates_fix/__init__.py`
- [Fix Verification](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/verification.py): `apps/remediation/verification.py`
- [Remediation Tasks](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/tasks.py): `apps/remediation/tasks.py`
- [Fix Proposals](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/remediation/models.py): `apps/remediation/models.py`

### Reporting

- [Report Views](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/reports/views.py): `apps/reports/views.py`
- [Evaluation Metrics](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/reports/metrics.py): `apps/reports/metrics.py`
- [PDF Reports](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/apps/reports/pdf.py): `apps/reports/pdf.py`

### Other components

- **User**
- **Developer**
- [Celery Worker](https://github.com/lobaina-ehsan/vulnerfix-vulnerability-remediation-verification-platform/blob/main/config/celery.py): `config/celery.py`
- **Redis Broker**

## Connections

- User → Account Views: authenticates (evidence: `README.md`)
- Developer → Account Views: authenticates (evidence: `README.md`)
- Account Views → Scan Portal: accesses portal
- User → Scan Portal: submits code (evidence: `README.md`)
- Scan Portal → Scan Task: queues scan (evidence: `apps/scans/user_views.py`)
- Scan Portal → Scans and Findings: creates scan (evidence: `apps/scans/user_views.py`)
- Scan Task → Scans and Findings: updates findings (evidence: `apps/scans/tasks.py`)
- Scan Task → Sandboxed Detection: runs analysis (evidence: `apps/scans/tasks.py`)
- Scan Task → Finding Normalizer: normalizes output (evidence: `apps/scans/tasks.py`)
- Scan Task → Vulnerability Matcher: matches findings (evidence: `apps/scans/tasks.py`)
- Sandboxed Detection → Scanner Runner: runs in container (evidence: `README.md`)
- Sandboxed Detection → Test Payloads: uses test payloads
- Vulnerability Matcher → Knowledge and Feedback: reads vulnerability data (evidence: `apps/knowledge/matcher.py`)
- Knowledge Management → Knowledge and Feedback: manages knowledge (evidence: `apps/knowledge/views.py`)
- Knowledge Management → Vulnerability Matcher: queues retraining (evidence: `apps/knowledge/views.py`)
- Developer → Knowledge Management: teaches vulnerabilities (evidence: `README.md`)
- Developer → Fix Review: reviews fixes (evidence: `README.md`)
- Fix Review → Template Fix Engine: requests proposal
- Template Fix Engine → Reviewed Fix Templates: applies template (evidence: `apps/remediation/engine.py`)
- Remediation Tasks → Fix Verification: verifies fix (evidence: `apps/remediation/tasks.py`)
- Fix Verification → Sandboxed Detection: reruns analysis (evidence: `apps/remediation/verification.py`)
- Fix Verification → Fix Proposals: updates proposal (evidence: `apps/remediation/verification.py`)
- Report Views → Evaluation Metrics: computes metrics (evidence: `apps/reports/views.py`)
- Report Views → PDF Reports: generates PDF (evidence: `apps/reports/views.py`)
- Report Views → Scans and Findings: reads scans (evidence: `apps/reports/views.py`)
- Evaluation Metrics → Knowledge and Feedback: reads feedback (evidence: `apps/reports/metrics.py`)
- Evaluation Metrics → Fix Proposals: reads fix outcomes (evidence: `apps/reports/metrics.py`)
- Scan Task → Celery Worker: runs as task (evidence: `apps/scans/tasks.py`)
- Celery Worker → Redis Broker: dispatches tasks
