How prathameshsail72-hue/cyberguard works
Purpose and execution surface
CYBERGUARD is a Python 3 desktop cybersecurity assessment application. Its primary PyQt6 entry point is main.py; cyberguard_v3.py appears to be an alternate/versioned application entry path. The repository also contains a separate web-shaped surface in app.py, with HTML templates and static Chart.js assets, suggesting a parallel or legacy browser UI rather than the documented primary runtime.
Desktop application composition
The desktop shell organizes security tools, analytics, and awareness features into PyQt views and reusable widgets:
• Application startup/window orchestration: main.py, cyberguard_v3.py
• Feature-level screens: ui/views/dashboard_view.py, ui/views/url_view.py, ui/views/phishing_view.py
• Shared presentation primitives and styling: ui/components/chart_widget.py, ui/components/terminal_log.py, ui/styles.py
Views are the boundary between user interactions and analyzer/database calls; core modules should remain UI-independent.
Security analysis engines
Independent core modules implement the primary assessment stages:
• URL/domain inspection, including protocol, structure, and headers: core/url_analyzer.py
• Text-based phishing/social-engineering signal detection: core/phishing_detector.py
• Password strength, entropy, dictionary, and cracking-risk analysis: core/password_analyzer.py
• File hashing, extension, and signature/integrity inspection: core/file_integrity.py
These engines receive user-provided URLs, text, passwords, or local files and return findings/risk-oriented results for rendering and persistence.
Risk workflow and dashboard analytics
A typical control flow is: a user selects an assessment view, supplies an artifact, the corresponding core analyzer evaluates it, and the UI presents risk details and likely records the event. The dashboard consumes persisted scan history to aggregate total scans, health/risk metrics, critical findings, and distribution visualizations:
• Dashboard aggregation/display: ui/views/dashboard_view.py
• Risk display components: ui/components/risk_badge.py, ui/components/circular_gauge.py
• Browser-side chart rendering for the alternate web surface: static/css/js/charts.js
Persistence boundary
SQLite is the local system of record for audits and awareness data. Database access is centralized rather than embedded in analyzers:
• Database facade/queries: database/db_manager.py
• Additional database module surface: database.py, database/__init__.py
• Embedded operational database: cyberguard_desktop.db
This boundary supports durable scan history and dashboard reporting while keeping the assessment engines primarily deterministic and local.
Awareness and non-scan workflows
The application includes interactive education flows distinct from artifact analysis:
• Quiz interface: ui/views/quiz_view.py
• Survey/benchmarking interface: ui/views/survey_view.py
• Desktop screens for file and password workflows: ui/views/file_view.py, ui/views/password_view.py
Runtimes and external boundaries
The documented runtime is Python 3.9+ with PyQt6, SQLite3, and PyQtGraph-style visualization; dependencies are declared in requirements.txt. URL analysis crosses the local boundary through network/HTTP(S) and TLS/header inspection. File analysis accesses user-selected local files. The alternate web surface uses templates/base.html, templates/index.html, and static/css/style.css; deployment intent may be represented by render.yaml.
Main entry points: url_view.py Assessment views · db_manager.py Database manager · main.py Desktop entry point · file_view.py File and password views
Components 18
Desktop application
Primary PyQt6 runtime and user workflows.
- Desktop entry point · Primary application startup and window orchestration.
main.py - Versioned entry path · Alternate desktop application entry path.
cyberguard_v3.py - Assessment views · URL and phishing interaction boundaries.
ui/views/url_view.py - File and password views · Local-file and password assessment workflows.
ui/views/file_view.py - Dashboard · Aggregates scan history into health and risk metrics.
ui/views/dashboard_view.py - Quiz and survey · Education and benchmarking workflows.
ui/views/quiz_view.py - Shared UI components · Charts, terminal logging, and risk indicators.
ui/components/chart_widget.py
Assessment engines
UI-independent local security analysis.
- URL analyzer · Inspects URL protocol, structure, headers, and TLS-related signals.
core/url_analyzer.py - Phishing detector · Detects text-based social-engineering signals.
core/phishing_detector.py - Password analyzer · Evaluates strength, entropy, dictionary exposure, and cracking risk.
core/password_analyzer.py - File integrity analyzer · Checks hashes, extensions, and signatures.
core/file_integrity.py - HTTP(S) and TLS targets · Remote boundary used for URL inspection.
- User-selected files · Local artifact boundary for integrity checks.
Local persistence
SQLite audit and awareness storage.
- Database manager · Centralized queries and persistence access.
database/db_manager.py - Operational SQLite DB · Durable scan history and awareness data.
cyberguard_desktop.db
Alternate web surface
Parallel or legacy browser-oriented interface.
- Web app · Separate browser-oriented application surface.
app.py - Web templates · Base and index browser UI.
templates/index.html - Browser charts · Client-side chart rendering for the web surface.
static/css/js/charts.js
Connections 19
- Desktop entry point → Assessment views: opens
- Desktop entry point → File and password views: opens
- Desktop entry point → Dashboard: opens
- Desktop entry point → Quiz and survey: opens
- Versioned entry path → Assessment views: alternate runtime
- Assessment views → URL analyzer: analyzes URLs
- Assessment views → Phishing detector: analyzes text
- File and password views → File integrity analyzer: inspects files
- File and password views → Password analyzer: evaluates passwords
- URL analyzer → HTTP(S) and TLS targets: inspects
- File integrity analyzer → User-selected files: reads
- Assessment views → Database manager: records findings
- File and password views → Database manager: records findings
- Quiz and survey → Database manager: stores responses
- Dashboard → Database manager: queries history
- Database manager → Operational SQLite DB: persists
- Dashboard → Shared UI components: renders metrics
- Web app → Web templates: serves
- Web templates → Browser charts: loads