fix: restrict runner log ACL across rotation
This commit is contained in:
1 parent
73aa147881
commit
7701e77b3d
7 files changed
+102
-9
No files matched your search
@@ -22,9 +22,12 @@ checks. Never print a private key, token, or complete environment file.
|
||||
- SSH alias: `akyldash_vps`, user `codex`, host `206.223.249.118`, port `22`.
|
||||
- SSH configuration: `~/.ssh/config`.
|
||||
- Identity file: `~/.ssh/akyldash_codex` (path only; never copy its contents).
|
||||
- `codex` can run unprivileged read-only diagnostics. It has no sudo or Docker
|
||||
group membership; Docker CLI access to the daemon is denied. Do not add it to
|
||||
either group.
|
||||
- `codex` can run unprivileged read-only diagnostics and read
|
||||
`/var/log/akyldash-runner/act_runner.log` through a file ACL. It has no sudo
|
||||
or Docker group membership; Docker CLI access to the daemon is denied. Do not
|
||||
add it to either group. The runner installer in PR #46 narrows this to search
|
||||
permission on the dedicated log directory and read permission on that one
|
||||
file, preserved by systemd startup and logrotate hooks.
|
||||
- Bootstrap is complete. Docker and Compose are active, but no root-owned
|
||||
repository checkout or restricted helper is installed yet. The owner can run
|
||||
`infra/bootstrap/audit-host.sh` from the reviewed root-owned checkout to
|
||||
|
||||
@@ -47,6 +47,16 @@ systemd timer checks the runner service and the rootless Docker API each minute;
|
||||
on failure it restarts the fixed runner service. No UFW changes or public
|
||||
metrics ports are needed. Runner cache is disabled.
|
||||
|
||||
The runner daemon log is `/var/log/akyldash-runner/act_runner.log`. The
|
||||
installer keeps its directory root-owned, grants `codex` only search permission
|
||||
on that directory, and limits file access to the runner owner plus a named
|
||||
read-only ACL for `codex`; group and other users have no file access. Systemd
|
||||
starts with `UMask=0077`, and its fixed `ExecStartPost` command reapplies the
|
||||
file ACL. Logrotate uses `copytruncate` and reapplies the same ACL after each
|
||||
rotation. This access is limited to the runner daemon log; it does not grant
|
||||
access to runner registration state, job workspaces, Docker state, or Gitea
|
||||
workflow logs. The daemon log records task dispatch metadata, not step output.
|
||||
|
||||
The registered project label is `akyldash-ci`, mapped to the pinned
|
||||
`docker.gitea.com/runner-images:ubuntu-24.04` image. Both `ci.yaml` and
|
||||
`runner-smoke.yaml` target this exact project label; neither uses the generic
|
||||
@@ -231,5 +241,10 @@ that `runner-smoke.yaml` succeeds. Read-only checks on 2026-10-14 confirmed the
|
||||
runner service and health timer are active, the runner account has no
|
||||
supplementary groups, and the active service uses the rootless Docker socket.
|
||||
The live service has `ProtectHome=read-only`; the installer still needs the PR
|
||||
update applied by an owner-run command after merge. The repository runner
|
||||
inventory API returns 403 to the current non-owner API account.
|
||||
update applied by an owner-run command after merge. Read-only SSH now confirms
|
||||
that act_runner 0.2.13 declares `[akyldash-ci]` and accepts task 301; its log
|
||||
does not include workflow step output. The Actions jobs API returns an empty
|
||||
list for completed run 49, so step details are not available through the
|
||||
current API account. The repository runner inventory API returns 403 to the
|
||||
current non-owner API account. PR #46 pins the narrow log ACL and its rotation
|
||||
hooks; this installer change has not been applied to the VPS.
|
||||
@@ -48,6 +48,14 @@ unverified.
|
||||
filters are unset; the live process itself runs as UID/GID `999:988`, has
|
||||
effective and permitted capabilities `0`, and `NoNewPrivs=1`. No
|
||||
supplementary groups are present.
|
||||
- The owner granted `codex` ACL access to `/var/log/akyldash-runner/act_runner.log`.
|
||||
Read-only SSH confirmed the directory is `akyldash-runner:akyldash-runner`
|
||||
mode `0750` with `codex:r-x`, while the log is `root:root` mode `0644` with
|
||||
`codex:r--` and `other::r--`. The inspected log contains runner task metadata
|
||||
only, no workflow step output. The active log is therefore currently
|
||||
world-readable; PR #46 changes IaC to a root-owned directory, runner-owned
|
||||
private log, `codex` search/read ACLs only, and ACL reapplication after
|
||||
service startup and log rotation. No VPS changes were made.
|
||||
- The unprivileged check did not find `/var/run/docker.sock`; the runner user
|
||||
is not in `sudo` or `docker` groups. Production secret file metadata remains
|
||||
root-only and was not independently checked. The Gitea runner inventory API
|
||||
@@ -127,6 +135,13 @@ unverified.
|
||||
isolated BuildKit VM reached through a short-lived, TLS-authenticated
|
||||
`buildctl` connection. No VPS changes were made; image builds remain
|
||||
unverified until the owner provisions that builder.
|
||||
- Runner log lines for run 49 show act_runner 0.2.13 with registered label
|
||||
`[akyldash-ci]` accepted task 301 at 2026-10-15 01:16:11 +05. The main CI
|
||||
task failed at 01:16:24 +05, and smoke task 302 started immediately after.
|
||||
These daemon logs do not record the failed step. Gitea 1.25.5's Actions jobs
|
||||
endpoint returns an empty list for completed run 49; the current API account
|
||||
cannot use the owner-only jobs endpoint to obtain the log download ID. The
|
||||
exact failing step is undetermined.
|
||||
- An isolated local Compose smoke test built backend/OpenSearch images,
|
||||
reached healthy status for OpenSearch, backend, and Caddy, and returned HTTP
|
||||
200 for `/review` through Caddy. Its containers, networks, and volumes were
|
||||
|
||||
Reference in new issue
Block a user