dougvk/Unlimited-OCR-RDNA4
0
1# Security policy2 3## Custom model code4 5Unlimited-OCR requires custom Python. This project never follows a floating model revision during inference.6 7`prepare`:8 91. downloads one pinned Baidu revision into a unique partial directory under a preparation lock;102. fully hashes every expected code, configuration, tokenizer, index, license, and weight file;113. applies exact, count-checked source transformations;124. verifies the patched tree, rejects symlinks and unexpected files, and records an exact local manifest;135. publishes the completed directory only after all checks pass.14 15`run` uses only the prepared local directory with `local_files_only=True`, `HF_HUB_OFFLINE=1`, and16`TRANSFORMERS_OFFLINE=1`. Those settings prevent model resolution from using the network; they are not a process sandbox.17 18## Untrusted documents19 20Model output is untrusted Markdown/raw HTML data. The runtime does not call `eval()` on it. Output paths use an exclusive,21random same-directory temporary file and an atomic no-replace publish; symlinks and input/output aliases are rejected.22`--force` alone enables atomic replacement.23 24Images and PDFs can still trigger bugs in Pillow, PDFium/pypdfium2, PyTorch, Transformers, or the model code. PDF rendering25has per-page and aggregate pixel/byte limits, but hostile inputs still belong under a dedicated unprivileged account or26an appropriately restricted container. Do not expose this CLI directly as a public upload service without process/network27sandboxing, input-byte limits, timeouts, and admission controls.28 29## Reporting30 31Please report vulnerabilities privately through GitHub's security-advisory interface for this repository. Do not include32private documents, credentials, model-cache tokens, or sensitive OCR output in a report.33 