Tensionix ENDERU
GitHub28 репозиториевDaily Tech3 подписчикаaudion.devвитрина продуктовRSSлента выпусков
← Все заметкиProjects

Security Policy

Scope

Audion Office OCR AI is a local portable desktop/workspace tool. It is not designed to be exposed as a public network service.

The GUI must bind only to loopback (127.0.0.1) and remain a local desktop control surface over the existing CLI/Python services.

Both the direct NiceGUI entry point and native window wrapper reject non-loopback hosts. Remote binding requires the explicit AUDION_ALLOW_REMOTE_GUI=1 override and must not be enabled for ordinary document work.

Runtime Model

The project has three user-facing launch paths:

  • English CLI/FZF backend: launcher_project.cmd
  • Russian CLI/FZF backend: launcher_project_ru.cmd
  • local GUI shell: launcher_gui.cmd

All three operate on local workspace folders. CLI/FZF and GUI resolve the same manifest/service operations through system_core/cli_operation.py and system_core/services/office_service.py.

Secrets

API keys are stored locally in text files:

  • config/api_key_openai.txt
  • config/api_key_gemini.txt
  • config/api_key_yandex_studio.txt
  • config/api_key_xai.txt
  • config/api_key_mistral.txt
  • optional extra files under config/keys/openai/
  • optional extra files under config/keys/gemini/

These files must not be committed to version control, attached to public issues, pasted into logs, or included in release archives.

Release staging also excludes input, output, report, workspace, cache, tmp, local path_history.json, Yandex key/folder metadata and generated root PDF files; the staged package recreates only empty working directories.

The GUI may show key-file names and status, but must not display the key value.

Data Handling

Local extraction and office builds process files on the machine.

DEV Markdown PDF rendering is a separate local pipeline. It uses Playwright Chromium from the portable runtime and does not upload Markdown documents to external services.

AI OCR modes send rendered PDF pages or images to the selected provider:

  • OpenAI
  • Gemini
  • Yandex
  • xAI
  • Mistral

Google Cloud Vision OCR is not part of the current data flow and the project does not require separate Google Cloud billing or Cloud Vision service-account credentials.

OCR Brick local modes run locally when using PyMuPDF/Pillow preprocessing and Tesseract or Surya.

Paid API OCR and optional 2-pass prompt hints send rendered pages and/or local OCR hints to the chosen provider. These payloads are still document data and must be treated as data leaving the machine.

When the optional xAI Russian OCR review checkbox is enabled, only a flagged page may be sent to xAI a second time together with its draft transcription and the review prompt. The checkbox is off by default. The local content-addressed OCR cache under cache/ocr_pages/ can retain page images and recognized text so interrupted jobs can resume; protect and clean this cache according to the document's confidentiality requirements.

Every <name>.document package under output/ is a full local document archive. It can contain the exact source file, source and preprocessed page images, every OCR candidate, coordinates, confidence values, provider responses, verification details and manual corrections. Treat it and *.full-archive.zip as at least as sensitive as the original document. Export metadata redacts key/token/secret/password parameters, and API key values must never be copied into provider result files or archives.

Rebuilding DOCX, Searchable PDF, XLSX, ODT, Markdown, HTML or JSON from an existing DocumentModel is local and makes no provider request. Searchable PDF retains the exact page image and adds an invisible OCR layer; redaction must therefore be performed on both the visual source and OCR data before external distribution.

When the Mistral second-pass selector includes Yandex, the same cleaned page raster is sent independently to both Mistral and Yandex. Suspicious pages can reduce Yandex calls only when a local Tesseract comparison passes; without an independent comparison the implementation conservatively sends the selected page to Yandex. Provider results and fusion decisions are stored under the DocumentModel package and inherit the source document's sensitivity.

Gemini Batch writes local JSONL/manifest files first. The job is sent to Google only when the user enables the submit toggle, but the JSONL may still contain rendered document images and should be protected.

Model-list refresh calls the selected provider's model-list endpoint with the selected local key. It does not upload documents, but it still contacts the provider over the network.

Use AI OCR or resolver modes only when policy allows sending document images or crop images to that provider.

Reports And Outputs

User-facing deliverables belong in output/.

Machine-readable reports and review artifacts belong in report/, including:

  • result.json
  • latest_result.json
  • mirror.json
  • manual_review.xlsx
  • review_items.json
  • resolver_candidates.json
  • safe_autofix_candidates.json
  • OCR/quality/numeric-check artifacts under workspace/, report/ and cache/

Do not place private machine reports in public release notes, issues, screenshots, or examples.

Git Exclusions

The following folders contain generated, user-specific, secret, or runtime data and should stay out of Git:

  • runtime/
  • wheelhouse/
  • output/
  • logs/
  • release/
  • report/
  • workspace/
  • data/
  • ._runtime/
  • cache/
  • tmp/
  • generated root PDF/
  • install/download/
  • system_core/powershell/

External Dependencies

Important dependency families:

  • document builders: python-docx, openpyxl, python-pptx
  • PDF/image tooling: PyMuPDF, Pillow
  • DEV Markdown PDF rendering: playwright and portable Chromium under runtime/.playwright/
  • local OCR bridge: pytesseract
  • optional external OCR engine: portable Tesseract OCR under runtime/tesseract/
  • optional local OCR engine: Surya under tools/optional-ocr-engines/
  • optional image enhancement: Real-ESRGAN ncnn-vulkan under tools/realesrgan-ncnn-vulkan/
  • provider SDKs or direct HTTP APIs for OpenAI, Gemini, Yandex, xAI and Mistral
  • GUI dependencies for NiceGUI/pywebview

pytesseract does not install tesseract.exe; Tesseract is not part of the core bundle. The project prefers runtime/tesseract/tesseract.exe, then AUDION_TESSERACT_EXE, then a system PATH fallback. If none is available, local Tesseract OCR and 2-pass checks are unavailable instead of failing silently.

Reporting

Report security issues privately to the maintainer.

Do not open public issues containing:

  • API keys
  • private documents
  • OCR images or crop previews
  • logs with secrets
  • proprietary file samples
  • generated reports from confidential files
Правлено 28.08.2026