Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omtex/blob/main/AUDIT_SCOPE.md # omtex aien-dev/omtex Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omtex / AUDIT_SCOPE.md` 111 lines ยท 6078 bytes Raw Blame History Rendered 1 # Audit scope 2 3 Written for an outside, independent security audit. Revision described: 4 ``4c86614a1ee09a5b8ca4da6c2f4a7bc958d1fd64`` on `main`, 2026-10-26. Everything below is taken from the repository's own files at 5 that revision; items marked NOT_RUN were not executed while writing this document. 6 7 ## What this repository is 8 9 An Omega library, `lib/omtex.om` (1,176 lines, an `om2` unit), that writes LaTeX. A paper 10 (`examples/*/paper.om`) is concatenated after the library and compiled with the pinned `omc`; the 11 resulting generator prints the `.tex` file, and `paper.gen check OMC DIR` compiles every Omega 12 listing to confirm it is accepted or refused as stated. `docs/DESIGN.md` (110 lines) is the 13 contract for escaping, the math check, listings and refusal codes. `tools/` holds `build.sh`, 14 `pin.sh`, `compare.sh` and `zenodo-draft.sh`; `tests/run.sh` is the suite. Licence: Apache 2.0 15 (`LICENSE`, `NOTICE`). 16 17 ## What to review, in priority order 18 19 1. Prose escaping in `lib/omtex.om` against the table in `docs/DESIGN.md` ("Prose markup"): 20 always-escaped characters, paired quotes and emphasis, cite and ref keys, the allowed 21 backslash escapes, and refusal of control bytes and malformed UTF-8 (trap 11, exit 111). 22 2. The math check: printable ASCII only, balanced braces, no `% $ #`, and a deny list of control 23 sequences (`\input \include \write \def \edef \gdef \xdef \let \catcode \immediate \openout 24 \openin \csname \special \read`). It is a deny list; check whether other primitives or macros 25 (for example `\newcommand`, `\renewcommand`, `\expandafter`) can reach the same effects. 26 `rawtex` and `preamble` lines use the same check with `&` and `\\` allowed. 27 3. Listings: bodies containing `\end{lstlisting}`, non-ASCII or control bytes other than LF and 28 tab are refused. 29 4. The `check` path (`txcheck`, `txrun`, `txchild`, `txpath`): it writes `DIR/