security: hash-lock the docs build toolchain
This commit is contained in:
1 parent
279886fd83
commit
20477174e5
5 files changed
+642
-32
No files matched your search
+15
-6
@@ -22,7 +22,8 @@ repository root.
|
||||
| `docs-deploy-poll.service` | systemd unit for the poller (runs the host-owned script) |
|
||||
| `webhook-receiver.py` | Webhook receiver; not installed (see below) |
|
||||
| `webhook-receiver.service` | systemd unit for the receiver; not installed |
|
||||
| `requirements.txt` | Pinned Python build toolchain |
|
||||
| `requirements.in` | Human-edited pins for the build toolchain |
|
||||
| `requirements.txt` | Hash-locked toolchain generated from `requirements.in` |
|
||||
|
||||
Nothing external is loaded by the site: no CDN, no third-party font service.
|
||||
Fonts are served from this repository's own output.
|
||||
@@ -110,11 +111,19 @@ and sends one Matrix alert after 3 consecutive failures.
|
||||
|
||||
## Build environment
|
||||
|
||||
`publishing/requirements.txt` pins every package the build needs (`mkdocs`,
|
||||
`mkdocs-material`, `mkdocs-redirects`). `build.sh` verifies the build venv
|
||||
against it before every build and installs anything missing or off-version
|
||||
(fast local no-op when current); it also fails loudly if `mkdocs.yml`
|
||||
configures a plugin that `requirements.txt` does not pin.
|
||||
`publishing/requirements.in` pins every package the build needs (`mkdocs`,
|
||||
`mkdocs-material`, `mkdocs-redirects`); `publishing/requirements.txt` is the
|
||||
generated hash-locked lockfile. `build.sh` verifies the build venv against
|
||||
`requirements.in` before every build, installs from the lockfile with
|
||||
`--require-hashes`, and fails loudly if `mkdocs.yml` configures a plugin that
|
||||
`requirements.in` does not pin.
|
||||
|
||||
Regenerate the lockfile after editing pins:
|
||||
|
||||
```
|
||||
pip-compile --generate-hashes --strip-extras \
|
||||
--output-file publishing/requirements.txt publishing/requirements.in
|
||||
```
|
||||
|
||||
The deployed poller keeps one build venv at
|
||||
`/var/lib/docs-publisher/repo/.venv-docs`, owned by `docsbuild`. A manual
|
||||
|
||||
Reference in new issue
Block a user