# shreyatapaswi600/browser-extension-security-framework architecture

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

- Interactive diagram: https://gitdiagram.com/shreyatapaswi600/browser-extension-security-framework
- Repository: https://github.com/shreyatapaswi600/browser-extension-security-framework

## Overview

This repository is a browser-extension security analyzer with a CLI analysis path, a browser-based reporting interface, and a FastAPI service for uploaded extensions and dynamic-analysis capabilities. The evidenced CLI workflow runs manifest and JavaScript/data-flow analysis, builds evidence, and assesses risk; the web UI exposes upload, analysis-stage, dashboard, and report views. Dynamic execution is explicitly disabled pending sandbox validation. Some service and simulator wiring is unsampled, so those relationships are omitted rather than inferred.

Main entry points: [`browser-extension-security-analyzer/src/App.jsx`](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/App.jsx) (Analyzer App), [`main.py`](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/main.py) (CLI Orchestrator), [`browser-extension-security-analyzer/src/pages/Dashboard.jsx`](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/pages/Dashboard.jsx) (Dashboard), [`browser-extension-security-analyzer/src/components/AnalysisPipeline.jsx`](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/AnalysisPipeline.jsx) (Stage Pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Static Analysis"]
  node_cli["CLI Orchestrator<br/>[main.py]"]
  node_manifest["Manifest Analyzer"]
  node_ast["AST Analyzer<br/>[ast_analyzer.py]"]
  node_dataflow["Data Flow Analyzer"]
  node_evidence["Evidence Engine<br/>[evidence_engine.py]"]
  node_risk["Risk Engine<br/>[risk_engine.py]"]
  node_context["Context Analyzer"]
  node_extractor["Source Extractor<br/>[extractor.py]"]
  node_jsanalyzer["JavaScript Analyzer<br/>[js_analyzer.py]"]
  node_reasoning["Reasoning Engine"]
  node_programmodel["Program Model<br/>[program_model.py]"]
end

subgraph group_service["Analysis Service"]
  node_api["Analyzer API<br/>[main.py]"]
  node_upload["Upload Routes<br/>[upload_routes.py]"]
  node_db[("Analysis Database")]
end

subgraph group_webui["Analyzer Interface"]
  node_frontend["Analyzer App<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_uploadui["Upload Interface<br/>[UploadBox.jsx]"]
  node_pipeline["Stage Pipeline"]
  node_reports["Recent Reports<br/>[RecentReports.jsx]"]
  node_securityreport["Security Report<br/>[SecurityReport.jsx]"]
  node_sidebar["Navigation Sidebar<br/>[Sidebar.jsx]"]
  node_topbar["Top Bar<br/>[Topbar.jsx]"]
  node_steps["Analysis Step<br/>[AnalysisStep.jsx]"]
end

subgraph group_dynamic["Dynamic Analysis"]
  node_dynengine["Dynamic Engine<br/>[engine.py]"]
  node_browser["Browser Manager<br/>[browser_manager.py]"]
  node_network["Network Monitor<br/>[network_monitor.py]"]
  node_dom["DOM Observer<br/>[dom_observer.py]"]
  node_sandbox["Sandbox Readiness<br/>[sandbox_manager.py]"]
  node_simulation["Attack Simulator"]
end

node_user(("Extension Analyst"))

node_user -->|"submits extension"| node_cli
node_cli -->|"analyzes manifest"| node_manifest
node_cli -->|"analyzes code"| node_ast
node_cli -->|"traces flows"| node_dataflow
node_cli -->|"builds evidence"| node_evidence
node_cli -->|"assesses risk"| node_risk
node_ast -->|"uses model"| node_programmodel
node_user -->|"uses interface"| node_frontend
node_frontend -->|"renders page"| node_dashboard
node_frontend -->|"renders upload"| node_uploadui
node_frontend -->|"renders stages"| node_pipeline
node_frontend -->|"renders reports"| node_reports
node_frontend -->|"renders navigation"| node_sidebar
node_frontend -->|"renders header"| node_topbar
node_dashboard -->|"renders stages"| node_pipeline
node_dashboard -->|"renders reports"| node_reports
node_uploadui -->|"displays report"| node_securityreport
node_pipeline -->|"renders steps"| node_steps
node_api -->|"runs manifest analysis"| node_manifest
node_api -->|"runs static analysis"| node_jsanalyzer
node_browser -->|"records requests"| node_network
node_browser -->|"installs observer"| node_dom
node_sandbox -.->|"reports readiness"| node_user

click node_cli "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/main.py"
click node_manifest "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/manifest_analyzer.py"
click node_ast "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/ast_analyzer.py"
click node_dataflow "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/data_flow_analyzer.py"
click node_evidence "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/evidence_engine.py"
click node_risk "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/risk_engine.py"
click node_context "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/context_analyzer.py"
click node_extractor "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/extractor.py"
click node_jsanalyzer "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/js_analyzer.py"
click node_reasoning "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/reasoning_engine.py"
click node_programmodel "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/program_model.py"
click node_api "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/main.py"
click node_upload "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/upload_routes.py"
click node_db "https://github.com/shreyatapaswi600/browser-extension-security-framework/tree/main/dynamic_analyzer_service/database"
click node_frontend "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/App.jsx"
click node_dashboard "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/pages/Dashboard.jsx"
click node_uploadui "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/UploadBox.jsx"
click node_pipeline "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/AnalysisPipeline.jsx"
click node_reports "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/RecentReports.jsx"
click node_securityreport "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/SecurityReport.jsx"
click node_sidebar "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/Sidebar.jsx"
click node_topbar "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/Topbar.jsx"
click node_steps "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/AnalysisStep.jsx"
click node_dynengine "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/core_analyzer/engine.py"
click node_browser "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/core_analyzer/browser_manager.py"
click node_network "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/interceptors/network_monitor.py"
click node_dom "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/interceptors/dom_observer.py"
click node_sandbox "https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/core_analyzer/sandbox_manager.py"
click node_simulation "https://github.com/shreyatapaswi600/browser-extension-security-framework/tree/main/dynamic_analyzer_service/attack_simulator"

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_cli,node_manifest,node_ast,node_dataflow,node_evidence,node_risk,node_context,node_extractor,node_jsanalyzer,node_reasoning,node_programmodel toneBlue
class node_api,node_upload,node_db toneAmber
class node_frontend,node_dashboard,node_uploadui,node_pipeline,node_reports,node_securityreport,node_sidebar,node_topbar,node_steps toneMint
class node_dynengine,node_browser,node_network,node_dom,node_sandbox,node_simulation toneRose
class node_user toneIndigo
```

## Components

### Static Analysis

- [CLI Orchestrator](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/main.py): `main.py`
- [Manifest Analyzer](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/manifest_analyzer.py): `analyzer/manifest_analyzer.py`
- [AST Analyzer](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/ast_analyzer.py): `analyzer/ast_analyzer.py`
- [Data Flow Analyzer](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/data_flow_analyzer.py): `analyzer/data_flow_analyzer.py`
- [Evidence Engine](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/evidence_engine.py): `analyzer/evidence_engine.py`
- [Risk Engine](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/risk_engine.py): `analyzer/risk_engine.py`
- [Context Analyzer](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/context_analyzer.py): `analyzer/context_analyzer.py`
- [Source Extractor](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/extractor.py): `analyzer/extractor.py`
- [JavaScript Analyzer](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/js_analyzer.py): `analyzer/js_analyzer.py`
- [Reasoning Engine](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/reasoning_engine.py): `analyzer/reasoning_engine.py`
- [Program Model](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/analyzer/program_model.py): `analyzer/program_model.py`

### Analysis Service

- [Analyzer API](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/main.py): `dynamic_analyzer_service/main.py`
- [Upload Routes](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/upload_routes.py): `dynamic_analyzer_service/upload_routes.py`
- [Analysis Database](https://github.com/shreyatapaswi600/browser-extension-security-framework/tree/main/dynamic_analyzer_service/database): `dynamic_analyzer_service/database`

### Analyzer Interface

- [Analyzer App](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/App.jsx): `browser-extension-security-analyzer/src/App.jsx`
- [Dashboard](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/pages/Dashboard.jsx): `browser-extension-security-analyzer/src/pages/Dashboard.jsx`
- [Upload Interface](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/UploadBox.jsx): `browser-extension-security-analyzer/src/components/UploadBox.jsx`
- [Stage Pipeline](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/AnalysisPipeline.jsx): `browser-extension-security-analyzer/src/components/AnalysisPipeline.jsx`
- [Recent Reports](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/RecentReports.jsx): `browser-extension-security-analyzer/src/components/RecentReports.jsx`
- [Security Report](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/SecurityReport.jsx): `browser-extension-security-analyzer/src/components/SecurityReport.jsx`
- [Navigation Sidebar](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/Sidebar.jsx): `browser-extension-security-analyzer/src/components/Sidebar.jsx`
- [Top Bar](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/Topbar.jsx): `browser-extension-security-analyzer/src/components/Topbar.jsx`
- [Analysis Step](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/browser-extension-security-analyzer/src/components/AnalysisStep.jsx): `browser-extension-security-analyzer/src/components/AnalysisStep.jsx`

### Dynamic Analysis

- [Dynamic Engine](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/core_analyzer/engine.py): `dynamic_analyzer_service/core_analyzer/engine.py`
- [Browser Manager](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/core_analyzer/browser_manager.py): `dynamic_analyzer_service/core_analyzer/browser_manager.py`
- [Network Monitor](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/interceptors/network_monitor.py): `dynamic_analyzer_service/interceptors/network_monitor.py`
- [DOM Observer](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/interceptors/dom_observer.py): `dynamic_analyzer_service/interceptors/dom_observer.py`
- [Sandbox Readiness](https://github.com/shreyatapaswi600/browser-extension-security-framework/blob/main/dynamic_analyzer_service/core_analyzer/sandbox_manager.py): `dynamic_analyzer_service/core_analyzer/sandbox_manager.py`
- [Attack Simulator](https://github.com/shreyatapaswi600/browser-extension-security-framework/tree/main/dynamic_analyzer_service/attack_simulator): `dynamic_analyzer_service/attack_simulator`

### Other components

- **Extension Analyst**

## Connections

- Extension Analyst → CLI Orchestrator: submits extension (evidence: `main.py`)
- CLI Orchestrator → Manifest Analyzer: analyzes manifest (evidence: `main.py`)
- CLI Orchestrator → AST Analyzer: analyzes code (evidence: `main.py`)
- CLI Orchestrator → Data Flow Analyzer: traces flows (evidence: `main.py`)
- CLI Orchestrator → Evidence Engine: builds evidence (evidence: `main.py`)
- CLI Orchestrator → Risk Engine: assesses risk (evidence: `main.py`)
- AST Analyzer → Program Model: uses model (evidence: `analyzer/ast_analyzer.py`)
- Extension Analyst → Analyzer App: uses interface
- Analyzer App → Dashboard: renders page (evidence: `browser-extension-security-analyzer/src/App.jsx`)
- Analyzer App → Upload Interface: renders upload (evidence: `browser-extension-security-analyzer/src/App.jsx`)
- Analyzer App → Stage Pipeline: renders stages (evidence: `browser-extension-security-analyzer/src/App.jsx`)
- Analyzer App → Recent Reports: renders reports (evidence: `browser-extension-security-analyzer/src/App.jsx`)
- Analyzer App → Navigation Sidebar: renders navigation (evidence: `browser-extension-security-analyzer/src/App.jsx`)
- Analyzer App → Top Bar: renders header (evidence: `browser-extension-security-analyzer/src/App.jsx`)
- Dashboard → Stage Pipeline: renders stages (evidence: `browser-extension-security-analyzer/src/pages/Dashboard.jsx`)
- Dashboard → Recent Reports: renders reports (evidence: `browser-extension-security-analyzer/src/pages/Dashboard.jsx`)
- Upload Interface → Security Report: displays report (evidence: `browser-extension-security-analyzer/src/components/UploadBox.jsx`)
- Stage Pipeline → Analysis Step: renders steps (evidence: `browser-extension-security-analyzer/src/components/AnalysisPipeline.jsx`)
- Analyzer API → Manifest Analyzer: runs manifest analysis (evidence: `dynamic_analyzer_service/main.py`)
- Analyzer API → JavaScript Analyzer: runs static analysis (evidence: `dynamic_analyzer_service/main.py`)
- Browser Manager → Network Monitor: records requests (evidence: `dynamic_analyzer_service/core_analyzer/browser_manager.py`)
- Browser Manager → DOM Observer: installs observer (evidence: `dynamic_analyzer_service/core_analyzer/browser_manager.py`)
- Sandbox Readiness → Extension Analyst: reports readiness
