Files
OpenVPN-Monitoring-Simple/DOCS/Changes/2026-10-05_Code_Review_PLAN.md
T
ayurishchevandClaude Sonnet 5.5 ad6995bb63 Docs restructure, code review, gatherer reliability, JWT key fail-closed
Documentation
- Three levels: DOCS/General (overview, configuration), DOCS/Deployment
  (choose a method, first steps), details per method in Containers/ and
  System_Services/; new root README and DOCS/README map.
- Remove superseded pages (Deployment.md, Deployment_Docker/Native.md, Index.md);
  split the two scenario guides by section.
- Isolate the Timeweb/Hysteria2 records in DEPLOYMENTS/timeweb-hysteria2/
  (not linked from DOCS, listed in .graphifyignore).
- Add DOCS/code_review/ with a time-stamped analysis of the code base.

Gatherer (BUG-02, BUG-03)
- Session key (CN, address, connected_since_ts), baseline from the
  active_sessions snapshot, grace period for sessions missing from the status.
- Status file integrity (TITLE/TIME/END) and freshness; a torn read skips the tick.
- Cache applied after commit; main loop survives exceptions, backs off, and
  stops cleanly on SIGTERM/SIGINT; new client rows start with the first
  frame's totals; five tests.

JWT signing key (SEC-01)
- No built-in default: Core and Profiler refuse to start with a missing,
  placeholder or short (< 32) key; shipped config.ini has an empty value.
- Same rule in install.sh, update.sh (issues a new key when missing or weak),
  docker lib/entrypoint; five tests, conftest.py for the test key.

Each change has a plan and a summary under DOCS/Changes/.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 20:30:45 +03:00

1.8 KiB

Анализ кодовой базы: план (2026-10-05)

Цель

Комплексная оценка кодовой базы с опорой на граф знаний (graphify-out/): архитектура, безопасность, корректность, сопровождаемость, тесты, эксплуатация. Результат фиксируется в DOCS/code_review/ с отметкой времени в имени файла.

Метод

  1. Граф: метрики по областям, связи между компонентами, узлы-мосты, когезия сообществ, самые связные узлы.
  2. Чтение кода: APP_CORE (API, сборщик, БД), APP_PROFILER (роутеры, PKI, процесс, генератор), root-помощник ovpmon-helper, UI (маршруты, API-клиент, места риска XSS), контейнеры и compose, скрипты deploy/.
  3. Инструменты в изолированном venv вне репозитория: pyflakes, bandit, shellcheck, bash -n, оба набора тестов.
  4. Каждая находка помечается статусом проверки: подтверждено кодом, воспроизведено инструментом, не воспроизведено.

Границы

Код и конфигурации не меняются. Динамическое тестирование на живом хосте, сканирование уязвимостей зависимостей (pip-audit, npm audit) и нагрузочные испытания не выполняются.

Результат

DOCS/code_review/<UTC-время>_Codebase_Analysis.md и сводка по выполненному в 2026-10-05_Code_Review.md.