Commit Graph
12 Commits
Author SHA1 Message Date
aiongg 776d59c758 Run every process on AUTOCRAFT_DB_URL: the dashboard, runner, worker threads and job processes open dbTarget() (job processes get dbEnv(), only the variable that names the database); the GitHub identity read uses the process handle in read transactions on Postgres; AUTOCRAFT_DATA_DIR (default: the SQLite file's directory; the image sets /data) holds reference documents, artifacts and the item snapshot; lock files are named by dbLockName(); the item snapshot, backup.sh, the predeploy snapshot and the periodic loops say that Postgres has no SQLite snapshot instead of succeeding; db.attempt(fn) runs fn under a savepoint on Postgres so a caught statement error leaves the write usable 2026-11-21 18:08:33 +00:00
aiongg 80f9ba8f4c Each deploy installs the post-receive hook its commit carries 2026-11-15 02:26:30 +00:00
aiongg f5bdb64c5e Runner hardening: per-repository installation tokens, a github.com-only credential helper, an allow-listed jev environment, pinned git attribute source and explicit repositories, absolute deny rules, a wider output scrub, and a deploy of the pushed commit
- Installation tokens for a write are minted for the write's repository (a transfer's also for its target); reads across repos and pushes to a contributor's fork keep the installation-wide token. Reading the app's keys checks the secrets file's mode like every other reader.
- The app's git credential helper is set for https://github.com only, after every configured helper is dropped.
- jev children get only the search path, home, locale, temp, cache, TLS and proxy variables and Jev's own.
- Git on the cached clones names the repository with GIT_DIR, runs with safe.bareRepository=explicit and reads attributes from the empty tree.
- The sandbox denies /proc and the credential directory in the absolute (//path) form as well.
- The scrub hides hex keys that are not digests, URL user:password, three-part dotted tokens and credentials inside hex or base64.
- The dashboard unit sees the settings file, releases, the bare repo and .local read-only.
- post-receive resolves the pushed commit once and the hook deploys that commit; the image build runs pnpm installs without install scripts.
2026-11-14 23:23:21 +00:00
aiongg f9ca82f460 Bind author logins to account ids for existing history, route the remaining views through the visible-repo allow-list, and tighten link, path and reply parsing 2026-11-11 13:18:40 +00:00
aiongg 3ceb8f0504 Worker hardening: artifact uploads re-check the task after the body, plain-http coordinators must not be single-label, warm keys are one-to-one, pinned worker SSH host keys, formatter refuses symlinked paths, deploy skips install scripts 2026-11-11 12:52:31 +00:00
aiongg 36ba1a87bc Deploy restarts the runner only when its code changed; the runner's release is kept while it runs 2026-11-04 18:39:55 +00:00
aiongg 4dd4d93800 Rename remaining craft-auto names to autocraft (command, env vars, paths, key label) 2026-11-03 16:48:10 +00:00
aiongg 096b295d15 Defer sandbox worker updates until its tasks finish 2026-11-03 05:12:37 +00:00
aiongg 58f20bddaa Deploy hook: a redeploy of the live commit reuses its release; pruning with no old releases succeeds; warn when a sync run outlasts the wait 2026-11-03 03:11:41 +00:00
aiongg 16e1356e8a Deploy into releases with an atomic symlink switch; snapshot and pause sync first; units load the settings as the app user; checks after restart; commit from .source-commit; pin pnpm 2026-11-03 03:01:39 +00:00
aiongg 356c11d1f6 Install settings: caches under one directory, no claude autoupdate; hook builds without restarting before the first database exists 2026-11-03 02:48:29 +00:00
aiongg 3f0fad8b0c Production install: post-receive bootstrap, deploy hook, push helper, backup script, system units and settings template 2026-11-03 02:46:20 +00:00