Runs the role against a real OpenBao 2.7.3 on the noble and resolute
containers, with check before and after converge and idempotence.
Prepare builds a throwaway CA and a server certificate covering
127.0.0.1 with the openssl CLI, so no crypto collection is needed, and
adds a drop-in that resets the namespace sandboxing and the service user,
which the unprivileged container cannot provide.
Verify asserts the effect on the host: the service is active with the
unit's type, stop signal, MemorySwapMax and reload; the service user and
the private data directory; the installed version; seal status over TLS
on loopback reporting uninitialised and sealed; a reload that keeps the
same process. Every input check has a negative case matched on its
message, and the run ends with the switch to plain HTTP and back.
Refs: #536
Assisted-by: Claude Code
A consumer gets a running single-node OpenBao server on integrated raft
storage, listening on TLS they supply, left uninitialised and sealed.
The role installs the pinned 2.7.3 release tarball, checked by get_url
against the sha256 of each architecture from the release's checksums.txt
(its GPG signature checks out against OpenBao's release key). It creates
its own system user, data directory, configuration and sandboxed unit:
Type=notify, SIGINT stop, MemorySwapMax=0 instead of mlock, an empty
capability set, ProtectSystem=strict with the data directory writable,
and ExecReload sending SIGHUP. The directive set was tried against the
real binary under systemd before it was kept.
TLS certificate, key and CA paths are required unless openbao_tls_disable
is true, which warns; validation fails before any change when a file is
missing, and the role checks the service user can read the key and
certificate before writing the config. It reads its seal status over
https://127.0.0.1 validated against the CA file, so an address other
than a wildcard or loopback gets a second loopback listener.
The tasks are split by job (validate, prereqs, install, configure,
seal_status) so the init, unseal, audit and update work can reuse them.
Refs: #536
Assisted-by: Claude Code
test_roles_call_each_other_by_full_name_only in
tests/scripts/test_select_molecule_scenarios.py already fails when a role's
meta/main.yml declares dependencies, and Lint runs it through the
script-tests hook. That test is the Lint check the rule waited for, so the
rule now names it as its control, and the workflow rules and the selector's
docstring no longer describe a meta dependency as allowed.
Refs: #246
Assisted-by: Claude Code
A contributor learns about a broken renovate.json, a failing script test or
a bad image pin from Lint today; as hooks they fail before the push.
- check-json from pre-commit-hooks covers renovate.json.
- script-tests runs the suite at pre-push, since it takes minutes. Its
GIT_DIR points at an uncreatable path, so a fixture that keeps the
caller's git environment fails instead of writing to this repository.
Lint runs it by id; the suite now runs under the network guard.
- check-image-pins runs check_image_versions.py pins on every commit: its
inputs span workflows, Dockerfiles and docs/images, and it fails when one
is missing. Lint's pre-commit run replaces its separate step.
Adding hooks changes .pre-commit-config.yaml, an input of the ci image, so
this pull request takes Lint's slow path and the next Images run publishes
a new ci version.
Refs: #187
Assisted-by: Claude Code
Lint's fast path exports a dead proxy with an empty no_proxy, and
next_image_version.py uses urllib's default opener, which honours them, so
the RegistryClient tests could not reach their fake registry on 127.0.0.1.
Setting no_proxy for loopback in the tests lets the suite run under the
guard instead of the workflow unsetting it.
Refs: #187
Assisted-by: Claude Code
A git hook exports GIT_DIR (and often GIT_INDEX_FILE). A fixture that passes
the caller's environment to git would run its init, add and commit against
this repository instead of its temporary one once the suite runs as a hook.
tests/scripts/git_env.py gives each fixture a copy of the environment
without any GIT_* key and with no user or system config. The bot pull
request gate's repository tests also isolate os.environ, because the gate
runs git in-process.
Refs: #187
Assisted-by: Claude Code
Raise the renovate-config timeout to 15 minutes: after a self-bump the
runner pulls the large -full image first. The comment on the validator
step now says the clone credential is kept out of it, not the job token,
which the runner may still pass to every step. The workflow rules note
that renovate-config is the Lint job outside the ci image.
Refs: #188
Assisted-by: Claude Code
The dockerfile rule no longer claims the bump's own CI builds the new
image: Images builds it only after the merge, and the pin-follow pull
request's CI runs on it. The top-level description says code-owned files
automerge only once a code owner approves.
making-a-change.md quotes the full validator command and marks it a
control only once Lint / renovate-config is a required check. The
renovate.yml concurrency comment drops an unverified queueing claim.
Refs: #172
Refs: #188
Assisted-by: Claude Code
The renovate-config job clones in its own step and validates in a second
step, so the job token is not in the environment that reads the pull
request's renovate.json.
check_bot_pr_diff.py now refuses a moved image line in every workflow
whose pins a bot may move, lint.yml included, not only in image.yml and
renovate.yml. Tests cover a moved lint.yml line, an added second
Renovate line and a changed indentation.
Refs: #188
Assisted-by: Claude Code
Syntax is now checked by Lint's renovate-config job; a local
renovate --platform=local run stays for behaviour changes.
making-a-change.md also gains the two review-held rules for
renovate.json: descriptions of at most two short sentences, and a test or
check before an automerge exception.
Refs: #172
Refs: #188
Assisted-by: Claude Code
Renovate runs on every push to main, so after each merge the next bot
pull request is rebased without waiting for the daily schedule; the
renovate concurrency group still queues at most one run. The job timeout
drops from 30 to 10 minutes.
The rule that disabled updates to renovate.yml is replaced by a weekly
rule for renovate/renovate: a 3-day release age, never automerged, since
the job runs with the write-capable bot token. One pull request moves
the pin in renovate.yml and its copy in lint.yml. RENOVATE_DOCKER_MAX_PAGES
stays within Docker Hub's anonymous paging limit, so the image's release
timestamps are found and the wait applies.
Our own Docker images get an explicit zero release age. Every rule
description is cut to at most two sentences, and the top-level one now
says that an update with no release timestamp gets no wait.
Closes: #172Closes: #188
Assisted-by: Claude Code
Add a renovate-config job to Lint that runs renovate-config-validator
--strict --no-global in a copy of renovate.yml's Renovate image, so the
config is checked by the Renovate that runs it and the check can be
required. The ci image stays without Node.
check_bot_pr_diff.py now lets a bot pull request move the tag and digest
of the renovate/renovate image line in renovate.yml and lint.yml, in
place, keeping the name and the -full flavour. A test holds the two pins
equal.
Refs: #188
Assisted-by: Claude Code
Minor release: the ufw role masks nftables.service, so an upgrade of the
nftables package can no longer flush the rules ufw and Docker loaded.
Assisted-by: Claude Code:claude-opus-5-5
Enable the pep621 manager for the root pyproject.toml, which updates
uv.lock with it. apm-cli gets its own pull request without automerge: CI
never runs apm, so a green run says nothing about a new version. The
manager also reads requires-python, a floor for ruff rather than a pin,
so it is disabled, and lock file maintenance is off for uv.lock, whose
check refuses a change to any package but apm-cli.
Closes: #518
Assisted-by: Claude Code
uv 0.13.1, the version in the pinned Renovate image, writes lock revision
5 and drops two markers on httpcore2's dependencies that uv 0.11 kept.
The bot-diff check refuses a change to any package but apm-cli, so the
lock is rewritten once here, with `uv lock --upgrade-package apm-cli` at
the unchanged pin. No package, version, source, file or hash changes, and
uv 0.11.24 reads the lock and leaves it as it is.
Refs: #518
Assisted-by: Claude Code
A Renovate pull request may now change pyproject.toml and uv.lock, but
only together, so the pep621 manager can move the apm pin. In
pyproject.toml only the version of a quoted name==version pin may change.
uv.lock is parsed with tomllib in a module of its own, check_uv_lock.py,
because uv installs whatever the lock names and a line-shape rule cannot
tie a file to its package: a file of another package under apm-cli, an
added package, a marker that drops a dependency and a downgrade all passed
one. The parsed rule allows only apm-cli moving up to the pin in
pyproject.toml, as plain releases compared as numbers, with the same kinds
of file as before (an sdist if it had one, the same wheel tags), each on
files.pythonhosted.org under /packages/ without dot segments or escapes,
named for apm-cli at the pin, by sha256. Every other package, the root
project beyond its apm-cli specifier and the top level beyond `revision`
must stay as they are. Without the same file kinds, a lock could drop the
wheels and make uv build apm-cli from its sdist with a build backend
fetched at sync time. A bump that moves anything else is made by hand.
Refs: #518
Assisted-by: Claude Code
When nftables.service is enabled, the nftables package's postinst
restarts it on upgrade. The stock /etc/nftables.conf begins with
`flush ruleset` and the unit's ExecStop flushes too, so every rule ufw
and Docker loaded was deleted until they reloaded.
The role now masks the unit without stopping it, gated on ufw_enabled
and the new opt-out input ufw_mask_nftables. systemd refuses every job
but a stop on a masked unit, so the postinst's try-restart fails
before anything runs (the postinst ignores the failure) and the unit
does not start at boot. Masking works when the unit is absent too.
Assisted-by: Claude Code:claude-opus-5-5
A bare `apm` is whatever version a machine has. apm 0.37.0 to 0.39.1
refuse an apm.lock.yaml rewritten by 0.39.2 or later, and versions before
0.39.0 drop `disable-model-invocation` from the deployed Claude commands.
uv now runs one pinned version, from a .venv of its own.
apm-cli leaves requirements-dev.txt, so there is one pin. Its lock loses 40
packages and no other version moves. apm.lock.yaml is regenerated with the
pinned apm.
Refs: #517
Assisted-by: Claude Code
uv uses .venv as its project environment, and `uv sync --frozen` removes
every package that is not in uv.lock. The tools the git hooks need would
go with it, so they get a directory of their own.
Re-running scripts/dev-setup.sh switches the hooks of an older clone and
leaves its .venv alone. Ignore rules and prunes cover both directories.
Refs: #516
Assisted-by: Claude Code
Minor release: system_baseline persists its sysctl hardening in its own
sysctl.d drop-in, so it survives a reboot on Debian 13, and refuses ICMP
redirects on every interface.
Refs #512
Assisted-by: Claude Code:claude-opus-5-5
With forwarding off the kernel accepts redirects when either `all` or the
interface's own value is 1, and over IPv6 only the interface's value counts.
The profiles now also set `default` and, with a wildcard, every existing
interface, over IPv4 and IPv6.
Refs #511
Assisted-by: Claude Code:claude-opus-5-5
systemd-sysctl on Debian 13 does not read /etc/sysctl.conf, so the
hardened values were lost on reboot. The role now applies the live values
on their own, writes them to a drop-in under /etc/sysctl.d and removes its
keys from /etc/sysctl.conf.
Refs #510
Assisted-by: Claude Code:claude-opus-5-5
Installing the job container's tools upgrades base packages once Ubuntu
has newer ones, and the purge does not downgrade them, so the version
check failed every image. Kaniko now empties the root filesystem and
unpacks the base image before its first snapshot (--pre-cleanup), so the
versions no longer matter. Extra packages and files no package owns
still fail the job.
With the filesystem emptied, a failed build can leave no rm for the last
step, so the build step empties the credential file itself.
The images also kept the base image's package versions. Each Dockerfile
now upgrades them, and the base digests move to the newest published.
Refs #508
Assisted-by: Claude Code