From d76cbc3ff2211cf74e65da18af1d559990207854 Mon Sep 17 00:00:00 2001 From: oqyude Date: Fri, 23 Oct 2026 12:55:07 +0300 Subject: [PATCH] fix(agent): remove committed herdr_web_token literal (T38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The live 256-bit herdr_web_token was committed in cleartext. This repo only has a gitea remote and the token is the sole gate for herdr.zeroq.su (vhost without authelia — R1.15 / ADR-0005), so a leaked literal is a real exposure. The identical 64-hex literal lived in two files. Only .agent/handoff-summary.md is in scope for this session (.agent/tasks/manifest.json:412 is off-limits by the session constraints), so this commit removes it from the reachable file and documents the remainder explicitly. The value is still in git history, so removing it from the tree is not enough: the token must be rotated on the host. Left as an open item — see .agent/tasks/manifest.md T38 and the note added next to the redacted token. Not pushed. --- .agent/handoff-summary.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.agent/handoff-summary.md b/.agent/handoff-summary.md index fc0d536..f7f0bce 100644 --- a/.agent/handoff-summary.md +++ b/.agent/handoff-summary.md @@ -109,7 +109,15 @@ ### herdr-web-ui plugin - `herdr plugin install -y devswha/herdr-web-ui` → v0.4.8 на sapphira. -- **API token** в `~/.config/herdr/plugins/config/devswha.herdr-web-ui/env` mode 0600: `HERDR_WEB_TOKEN=134aec5cf22390e4b9826df51ba9b27d5208fcdbcd8b4e237ac2e642692241a1` (256 бит). +- **API token** в `~/.config/herdr/plugins/config/devswha.herdr-web-ui/env` mode 0600: `HERDR_WEB_TOKEN=` (256 бит). + + > **Значение было закоммичено в этот репозиторий открытым текстом** и осталось + > в истории git. Отсюда: (1) литерал удалён из этого файла 2026-10-23, + > (2) **тот же литерал всё ещё лежит в `.agent/tasks/manifest.json:412`** — + > правка того файла в сессии 2026-10-23 была запрещена ограничением, + > (3) **токен нужно ротировать на хосте** — старый считается скомпрометированным, + > (4) при желании — чистка истории (`git filter-repo`). + > Токен — единственный гейт для `herdr.zeroq.su` (vhost без authelia, R1.15). - **In-place PATCH** в `server/machine-security.ts` (`.orig` сохранён рядом) — добавляет поддержку `X-Forwarded-Host` в `sameOrigin()`. Без патча каждый cross-origin POST за reverse proxy возвращает 403 `invalid_origin`: функция сравнивает `new URL(request.url).origin` (видит `http://127.0.0.1:7317`, потому что это TCP-назначение proxy_pass) с браузерным `Origin: https://herdr.zeroq.su` — никогда не совпадает. **Maintenance caveat:** `herdr plugin update devswha.herdr-web-ui` затрёт патч; долгосрочно — форк + `herdr plugin link`. ### Multi-host setup