diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..54dc308 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Dependabot: monthly version updates for the pinned GitHub Actions. +# Pull requests only; nothing merges itself. Security advisories are handled by GitHub +# Dependabot security updates on the repository settings. +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a0c354a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +# CI for omtex: fetches the pinned omega-mv commit (tools/pin.sh), checks the committed omc +# against the pinned sha256, and runs tests/run.sh on a GitHub-hosted arm64 runner (omc is an +# AArch64 ELF). A second job writes an SPDX SBOM of the tree for auditors. +name: CI +on: + pull_request: + push: + branches: [main] +permissions: + contents: read +jobs: + test: + runs-on: ubuntu-24.04-arm + timeout-minutes: 20 + env: + OMTEX_NICE: '' + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - name: Pin record + run: sed -n '1,4p' tools/pin.sh + - name: Run the suite with the pinned omc + run: sh tests/run.sh + sbom: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - uses: anchore/sbom-action@66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c # v0.24.3 + with: + path: . + format: spdx-json + artifact-name: sbom-${{ github.sha }}.spdx.json diff --git a/AUDIT_SCOPE.md b/AUDIT_SCOPE.md new file mode 100644 index 0000000..04d1136 --- /dev/null +++ b/AUDIT_SCOPE.md @@ -0,0 +1,111 @@ +# Audit scope + +Written for an outside, independent security audit. Revision described: +`4c86614a1ee09a5b8ca4da6c2f4a7bc958d1fd64` on `main`, 2026-10-26. Everything below is taken from the repository's own files at +that revision; items marked NOT_RUN were not executed while writing this document. + +## What this repository is + +An Omega library, `lib/omtex.om` (1,176 lines, an `om2` unit), that writes LaTeX. A paper +(`examples/*/paper.om`) is concatenated after the library and compiled with the pinned `omc`; the +resulting generator prints the `.tex` file, and `paper.gen check OMC DIR` compiles every Omega +listing to confirm it is accepted or refused as stated. `docs/DESIGN.md` (110 lines) is the +contract for escaping, the math check, listings and refusal codes. `tools/` holds `build.sh`, +`pin.sh`, `compare.sh` and `zenodo-draft.sh`; `tests/run.sh` is the suite. Licence: Apache 2.0 +(`LICENSE`, `NOTICE`). + +## What to review, in priority order + +1. Prose escaping in `lib/omtex.om` against the table in `docs/DESIGN.md` ("Prose markup"): + always-escaped characters, paired quotes and emphasis, cite and ref keys, the allowed + backslash escapes, and refusal of control bytes and malformed UTF-8 (trap 11, exit 111). +2. The math check: printable ASCII only, balanced braces, no `% $ #`, and a deny list of control + sequences (`\input \include \write \def \edef \gdef \xdef \let \catcode \immediate \openout + \openin \csname \special \read`). It is a deny list; check whether other primitives or macros + (for example `\newcommand`, `\renewcommand`, `\expandafter`) can reach the same effects. + `rawtex` and `preamble` lines use the same check with `&` and `\\` allowed. +3. Listings: bodies containing `\end{lstlisting}`, non-ASCII or control bytes other than LF and + tab are refused. +4. The `check` path (`txcheck`, `txrun`, `txchild`, `txpath`): it writes `DIR/