Settings Reference
liquibyte edited this page 2026-11-27 19:30:23 -06:00

Page revisions

11 Commits

Author SHA1 Message Date
6bcd9fedcd feat: setup.sh finds the computer's release (Debian sid, Devuan testing and unstable); pages name a release's distribution; tried for real with Debian trixie
- setup.sh (server/apt-setup.sh.in): the release is the suite the
  computer's own apt uses (sources.list, sources.list.d .list and
  .sources; unstable is sid on Debian and ceres on Devuan, testing the
  testing release's name), else a word of VERSION_CODENAME, the first
  the site builds for. Before, it took VERSION_CODENAME alone: Debian
  unstable says forky there, and Devuan's testing and unstable both say
  "freia ceres", which wrote a broken deb line. New --release NAME.
  Stops before changing anything, saying what it found, when the site
  builds for none. folio-publish writes the site's releases into it
  (@RELEASES@). Only the shell is used to read apt's files.
- folio-generate: a release of another distribution is shown with it,
  "trixie (Debian)", on a package's page (Built for, now also when it
  is built for all the site's releases), the builds list and each
  build's page; the home page says "Community packages for Devuan and
  Debian", the guides "Devuan or Debian"; the install guide lists the
  releases (@RELEASES@).
- Docs: Public Guide, Troubleshooting (the new setup.sh messages),
  Settings Reference, How It Works, design.md/.html, the install guide;
  audit addendum with the real builds.
- Tried for real on the test site: build systems made by mmdebstrap
  --keyring for Devuan freia and Debian trixie; hanshi built for trixie
  and was published in trixie/main (1.8+r19.g69f6a07+deb13).
- Tests: setup.sh on stand-in Debian sid and testing and Devuan
  testing/unstable computers, --release, the refusal; the pages for a
  Debian release. make test: passed 2324, failed 0; make test-all:
  passed 2239, failed 0.
2026-11-27 19:30:23 -06:00
6188725055 feat: releases follow their distributions; a release added is built at once, a daily check mails new and ended releases; releases of other distributions such as Debian
- admin set releases (and architectures): a release or processor type
  added queues every package's newest upload for it at once, as rebuild
  PACKAGE does (still the uploader's upload, rebuilt-by the admin, with
  the signed request kept in each build; nothing is approved by it); one
  left out also cancels its builds that had not started (superseded,
  "this site no longer builds for RELEASE").
- admin set now checks release names, processor type names and that
  each release has a distribution with a mirror and keys
  (releases_problem in folio-lib.sh); releases took any value before.
- New settings distribution-RELEASE, mirror-DIST, keyring-DIST: a
  release of another distribution made the same way (Debian beside
  Devuan). Devuan's and Debian's mirrors and keyring packages are known;
  any other needs both set.
- folio-node-door: a claim names the release's distribution, its mirror
  and keyring package. folio-node: the build system is made with that
  distribution's archive keys alone (mmdebstrap --keyring, from
  /usr/share/keyrings/DIST-archive-keyring.gpg or keyring-DIST in the
  node's settings), never every key apt trusts; a node without them
  hands the build back saying what to install. folio-node recommends
  debian-archive-keyring.
- New server/folio-releases, run once a day by folio-fetch --all: asks
  each distribution's mirror which release is oldoldstable ... unstable
  and whether the site's releases are still there; mails the owner and
  administrators once of a new release, a change (testing became
  stable), and a release gone from the mirror, with the commands to
  type. It changes nothing itself. admin releases (read-only) shows the
  last check; a Releases button in the desktop program.
- Docs: Settings Reference (adding releases, the daily check, other
  distributions), Command Reference, Owner and Administrator Guide,
  Build Node Guide, How It Works, Troubleshooting, Desktop Program, the
  site's administration guide, README; addendum in the security audit.
- Tests: the new settings and refusals, queueing for an added release
  and cancelling when dropped, the claim's new lines, the node's keys
  per distribution, and folio-releases against a stand-in mirror.
  make test: passed 2305, failed 0 (234 desktop checks, hardening 24);
  make test-all: passed 2220, failed 0.
2026-11-27 18:07:51 -06:00
2acf9ffa78 security: re-audit of a fresh install: an import's signature is checked before its tree is read, no unsandboxed reading, a budget for watched accounts
- A fresh install, made the real way (the site key on the owner's side,
  the signer from the start), was attacked again from outside and from
  inside by auditors who had not read the earlier rounds first. Inside:
  nothing found. Outside: A49 and A50, both needing control of a forge
  account the site watches.
- An import checks the commit's signature right after reading the
  commit, before its tree is listed, unpacked or parsed (A49): with
  signatures = required, an unsigned commit or one signed by none of the
  importer's, maintainer's or co-maintainers' keys is refused unread.
  The later check must give the same verdict.
- A site that cannot make the sandbox the import is read in refuses the
  import and says how to allow user namespaces; only the owner can set
  import-sandbox = off, which admin set and admin verify warn about and
  the activity log notes at every use.
- Imports from watched forge accounts have a budget per pass (A50): at
  most import-per-pass new repositories (default 5) and ten minutes,
  taking turns between accounts, oldest first; followed packages' new
  commits come first; only one timed pass runs at a time, and the site's
  lock is free between repositories.
- doc/security-audit.md and .html: the two re-audit addenda, A49, A50
  and their fixes; Settings Reference, Troubleshooting, Forge Setup, the
  Owner and Administrator Guide, How It Works, design, packaging and the
  on-site administration guide updated.
- Tests: make test passes 2246 and 234 desktop checks; make test-all
  passes 2161.
2026-11-27 16:20:10 -06:00
3c194c7c8b security: audit rounds 6 and 7, recovery and the web side: safe backups and restores, revocations that reach apt, pinned keys on nodes, a hardened web server
Round 6, backups and restores:
- git never obeys settings, hooks or attributes of a record that came
  from elsewhere (A33): git_clean and record_own_copy (folio-lib.sh),
  fv_git and fv_own_copy (folio-verify.sh) for admin verify and
  folio-audit. Backups leave out the record's .git config, hooks and
  info, and GnuPG's *.conf; a restore writes a fresh config made by Folio
  and says what it left out.
- Root splits a backup in a folder of its own (A34): the signer's part
  goes straight to folio-sign through a whitelist (no *.conf, no links,
  no extra files), and folio gets only the rest. A backup with a link,
  a hard link out, a ".." member or anything a backup does not hold is
  refused with nothing unpacked.
- An older backup no longer undoes a change of keys (A35): a restore and
  every folio-key import merge the newest public key known (the owner's
  copy, the forge's record; folio-key merge FILE), so a revocation is
  never lost; the signer drops revoked keys' secrets. The record is
  pushed to the forge only as a fast-forward, except right after a
  signed erasure. Requests signed before a restore are refused.
- A restore from the forge alone checks the forge's record against the
  old key first (folio-key record OLD-KEY.asc) and refuses one that does
  not hold (A36); the setup can keep the existing master (an emergency
  bundle).
- The site builds its copy for the forge on the forge's history only if
  the site signed its newest commit (A42).

Round 6, keys, apt and nodes:
- After an emergency or a revocation, the archive is signed by the new
  and the outgoing key together for a while (A37), so computers with
  the old keyring take the keyring package with the revocation at their
  next upgrade; folio-key show lists the outgoing keys.
- setup.sh installs exactly the keyring package version the site serves
  and compares its key file byte for byte (A43).
- verify and folio-audit follow the first-parent line, judge a
  back-dated commit at its parent's time, and let a replaced key hold
  only until its successor signs (A38).
- folio-site-key revoke-old revokes exactly the keys the change made old
  (recorded by new-signing-key, or named with --new), never by date, and
  new-signing-key refuses while the clock is behind (A39).
- A changed SSH host key is fetched again over https and shown, old and
  new, for the person to confirm: the folio command (folio --site NAME
  --host-keys), the desktop program, and nodes (folio-node
  trust-host-keys) (A40). The break-in steps cover the host keys and the
  https key.
- Nodes take the archive-only keyring and require site-key-fpr, the
  site master's fingerprint, giving a build the site's archive only with
  a key under it (A41).
- Tests: the sections that shared the stand-in forge get their own
  repositories and the forge's current key.

Round 7, the web side:
- The theme links take only a local path from the Referer (A44); the
  port-80 redirect names the site's own host.
- Imports refuse control characters and text that is not UTF-8 in every
  field they keep (A45); the generator's HTML, XML, JSON and index
  writers drop control characters and write U+FFFD for invalid bytes, so
  feed.xml and packages.json stay valid.
- The door's listings write control characters out as text (A46).
- Strict-Transport-Security in every https mode (A47); front mode says
  the front server should send it too.
- The search is limited per address, 10 a second with bursts of 20 and 4
  at a time, answering 429 (A48); real_ip for front mode is documented.
- The home page shows setup.sh's SHA-256 beside the master's
  fingerprint; the theme cookie is Secure and HttpOnly; a
  Permissions-Policy turns off browser features no page uses; apt's
  index and setup.sh are served with Cache-Control: no-cache.
- nginx_file moved into folio-lib.sh, tested in every https mode.

- folio-node: the site-key-fpr message says 40 or 64 hexadecimal digits,
  as the check takes.
- Docs checked against the code after both rounds: site-key-fpr in every
  node recipe (Quick Start, INSTALL, the Build Node Guide, the on-site
  node guide); the host-key confirm flow (folio --host-keys, folio-node
  trust-host-keys, the desktop's window); the 90-day double signing after
  an emergency; the import caps and refusals in packaging; the restore
  steps; FOLIO_SITE_KEY_PUBLIC and the fixed limits in the Settings
  Reference.
- doc/security-audit.md and .html: rounds 6 and 7 (A33-A48, what held)
  and their fixes, the integration note.
- Tests: make test passes 2216 and 234 desktop checks; make test-all
  passes 2131; make cppcheck and make analyze pass.
2026-11-27 14:59:02 -06:00
be3c301b8e security: audit round on malicious Git trees and oversized files: imports bounded in files, size and time, read in a sandbox
- An import is judged without ever materialising an unbounded tree
  (A31): folio-upload-check reads git ls-tree -r -t -l through head up
  to the caps and stops git, refusing past source-limit-files (new,
  50000 files and folders), past source-limit-mb of true sizes unpacked
  (2000, as before for the repository), a path or link over 4096, and a
  file over 20 MB. A 200 KB git bomb that unpacked to 402 MB on the
  test site before is now refused before anything is unpacked.
- One clock, source-limit-seconds (new, 300), covers every read of the
  commit, so the site's lock is held for a bounded time.
- The tree is unpacked and read (tar -x, folio-debianize,
  dpkg-parsechangelog) in an unshare sandbox: no network, the system
  read-only, only the tree writable, with file, memory and process
  limits; where the sandbox cannot be made, the same limits and the
  clock apply and the activity log says so. The download is built in
  the upload folder and moved into place only on acceptance; nothing is
  left behind on any exit.
- The fetch is bounded (folio-fetch): git runs under a file-size limit
  at source-limit-mb, one pack, no gc; a repository over the limit is
  stopped while it arrives and its copy removed. ls-remote is read as a
  hash only.
- Commit metadata and packaging fields are read bounded (A32): the
  commit's own text at most 1 MB, the author cut at 200 bytes, the
  changelog's Source and Version at 200, debian/control fields at
  16384, at most 1000 packages; folio-debianize reads .folio, VERSION,
  the README and licence heads with cut lines.
- admin set takes source-limit-files and source-limit-seconds.
- doc/security-audit.md and .html: the round (A31, A32, what held) and
  its fixes; the wiki (Settings Reference, Troubleshooting, Forge Setup,
  How It Works, "How much an import may be") and doc/design updated.
- Tests: make test passes 2003 and 234 desktop checks; make test-all
  passes 1922.
2026-11-26 17:52:31 -06:00
b6462a7dd3 security: audit round 3, the SSH door: a kernel lock, safe logs, limits under a lock, undo by the owner's rules
- The site's lock is a kernel lock (flock on private/lock.flock, held
  on a descriptor): only the program that took it holds it, and the
  kernel lets go of it however that program ends. A refused request
  could remove another change's lock before (A16), and a client that
  went away mid-change left it behind for good (A17). Every program
  that takes the lock uses site_lock in folio-lib.sh; an old lock folder
  is removed once the new lock is held. git's gc --auto runs in the
  foreground while the lock is held, so it cannot keep it.
- A change whose client goes away is finished and recorded (PIPE and
  HUP ignored); a door that fails under the lock puts the record back.
- The hourly limits are counted under a lock and written through a
  new file (A18): parallel requests no longer get past them.
- The activity log writes control characters out as text and cuts each
  entry to 500 bytes (A19); a plain command over 4096 bytes is refused
  before it is logged; the log rotates past 5 MB (activity.log.1).
- admin undo follows the owner's rules (A20): only the owner undoes a
  change the owner made, or one of the owner's account, comments or
  packages; folio-audit flags such an undo made by anyone else.
- Comments may not hold control characters other than line ends and
  tabs (A21); the folio command and the desktop program show control
  characters the site sends as visible text.
- A request's time is 1 to 12 decimal digits with no leading 0 (A22).
- Input that comes with a signed request must end within input-time
  (60 s), and a node's result within result-time (3600 s); before, a
  request whose input never ended waited for ever.
- Names (accounts, packages, nodes, keywords, mirrors) may not start
  with -.
- The Chocolate theme is called Coffee (static/theme-coffee.css); a
  visitor who chose Chocolate keeps the same colours.
- doc/security-audit.md and .html: round 3 (A16-A22, what held, the
  input hang) and its fixes; the wiki and doc/design updated.
- Tests: make test passes 1895 and 212 desktop checks; make test-all
  passes 1814.
2026-11-26 12:55:01 -06:00
af2a175d62 fix: build nodes trust a site's own certificate authority, signing-key lifetime checked on import, registry-off with a signer, docs checked against the code
- Build nodes and a site's own certificate authority (A15): the node's
  settings take site-ca = FILE and site-ca-sha256 = FINGERPRINT, both or
  neither. The file is checked (one PEM certificate, no private key, the
  fingerprint given) when the node starts, before each fetch and at the
  start of each build, and is trusted for the site's host alone: the
  node's fetches (curl -q --cacert FILE --capath /dev/null), git for a
  source on that host, and apt in sbuild's build system for the site's
  archive (Acquire::https::HOST::CAInfo). Mirrors and other hosts keep
  the system's authorities; no plain http, no Verify-Peer false.
  folio-node check shows it.
- A site's archive is no longer left out of a build without a word: one
  the node cannot reach, or whose key it cannot fetch, is the node's
  error before sbuild; and when apt in the build system cannot fetch it,
  the build is the node's error and goes back to the queue.
- The build system's setup commands hold no %: sbuild reads %s as its
  interactive shell, which had replaced the certificate and apt's
  setting (found on the test site before release).
- admin registry-off on a site with a signer also has the signer delete
  its copy of the package token, and says so only once it is gone.
- folio-key import refuses a bundle whose new or renewed signing keys
  do not run out after the site's signing-key-lifetime (a day either
  way), or never run out, and says how to make it again
  (folio-site-key --lifetime DAYS STEP); folio-site-key cannot read the
  site's setting.
- folio-key show and the due notes name folio-install --migrate FILE
  (folio-key migrate does not exist).
- Docs checked against the code after the key rework: the site key made
  on the owner's computer everywhere; the signer's folder in backups,
  restores, moves and removal; folio-install's step numbers and question
  order; folio-site-key and folio-key import for renewals and rotations;
  the programs table; guides/nodes.html has site-ca; the on-site guides
  use site profiles (folio --add-site).
- doc/security-audit.md and .html: A15, with the sbuild % problem found
  before release; addendum on the test site's move to the new layout.
- Tests: make test passes 1823 and 210 desktop checks; make test-all
  passes 1742.
2026-11-26 11:00:51 -06:00
7869703eb2 security: master key off the server, signer user, sandboxed node steps, build limits, forge setup at install, audit fixes
- Security audit: doc/security-audit.md and .html, the living audit
  document for outside auditors (baseline fa4760d, scope, method,
  findings A1-A14, open items O1-O7, dated addenda), linked from the
  other docs and the README.
- The site's master key never comes to the server: the owner makes it
  on their own computer with the new folio-site-key (in folio-client):
  init, new-signing-key, renew, revoke-old, emergency, adopt. Each makes
  a bundle (public key, new subkeys' secrets, never the master) that the
  server imports with folio-key import. The staged rotation, keyring
  package, automatic switch and verify's rules work as before. The
  revocation certificate stays with the owner; backups never hold the
  master. A site whose master is still on the server keeps working, and
  folio-key show, admin verify, folio-audit and one mail say so and how
  to move it off (folio-key master-out, folio-site-key adopt, folio-key
  master-gone CODE).
- A separate signer user, folio-sign, holds the signing subkeys, the
  forge deploy key and the package token in /var/lib/folio-sign. The
  folio user reaches it only through one sudo rule naming
  /usr/lib/folio/folio-signer, which signs only an apt Release file with
  the archive key and only a commit object of the record or site copy
  with the record key, and pushes only to the confirmed forge address.
  Every signature and send is logged in sign.log. reprepro runs with an
  empty keyring, so node files never meet the site's keys.
  folio-install --migrate moves an existing site to this layout.
- Two signing subkeys, one for the archive and one for the record,
  labelled in their binding signatures; the signer refuses the wrong one,
  verify and folio-audit count a record commit signed by the archive key
  as not holding, and apt's keyring carries only archive keys.
- Upgrades now update the nginx, sshd, cron and sudoers files
  folio-install wrote, when nobody changed them; a changed one is kept
  and the diff is shown with how to merge it.
- folio-backup never writes over a file, refuses a folder anyone may
  write to that is not sticky, and gains --encrypt-to KEYID.
- Build nodes: every step before the build (clone, checkout, packaging,
  watch, uscan, dpkg-source) runs in its own sandbox: a new root with a
  read-only system, no node keys, keyring, settings or cache, no
  capabilities, no_new_privs, and no network except for the clone and
  uscan. A node that cannot make the sandbox refuses to build and never
  runs the steps without it. uscan is https only and has a time limit.
  folio-node check shows the limits and what each sandbox can see.
- Build limits per node: limit-time (4h), limit-memory (4G),
  limit-processes (1024), limit-disk (20G). A build that reaches one is
  handed in as failed with the reason, never as the node's error.
- The forge at install: folio-setup asks for the forge's SSH address,
  confirms its host key by fingerprint, shows the site's key to add as a
  deploy key and checks that the site may write (folio-mirror try), takes
  the package token without showing it, and sends once. FOLIO_FORGE_SSH,
  _HOST_KEY, _WEB and _TOKEN_FILE for --yes. The forge's key is fetched
  from every address its name has (A12).
- The node door checks every member name of a build result and unpacks
  only those, as plain files (A7). A build's .changes can no longer
  publish under another package's name (A1).
- folio-search refuses to run as root, as folio or as the signer user;
  fcgiwrap runs as www-data (A9).
- Under sshd the doors ignore FOLIO_CONF and the other settings passed
  in the environment and run with LC_ALL=C (A11).
- A removed package's queued and running builds are cancelled, a node
  building one is told to stop, and a late result is refused (A14). A
  removed project is listed as waiting on Found on the forge, not
  imported again by itself (A13); found and the page explain an empty
  list.
- Tests: make test-all runs its container with seccomp=unconfined so
  the node sandbox is tested there too; the tests use the node's own
  sandbox check. The test image's uid 1000 is called tester.
- Docs: the wiki, doc/design, INSTALL, packaging, erasing and the
  on-site guides updated for all of the above.
- Tests: make test passes 1786 and 210 desktop checks; make test-all
  passes 1705.
2026-11-26 08:31:52 -06:00
d3b43cdaf0 security: every change signed by whoever made it, https only, key rotation, pinned host keys, hardened builds, folio-audit
- Signed changes: every door command that changes anything must come as
  a request signed with the person's own GPG key (folio-request 1: the
  site, the account, the exact command, the input's sha256, the time, a
  one-time nonce). The door checks the signature against the account's
  key in the record, that the SSH account and the signer are the same,
  the site, a five-minute window and that the nonce is new, before it
  runs anything. A stolen SSH key alone changes nothing. Read-only
  commands still work with plain ssh. Each change keeps its signed
  request in the record commit (Acted-by:, Request:).
- New package folio-client: the folio command (signs through gpg-agent,
  pins the site's SSH keys) and folio-mykeys; folio-desktop depends on
  it and signs every change itself.
- Keys: the owner's GPG key is required at install (folio-setup
  --owner-pgp for an older site or a lost key); vouch and admin node add
  take an SSH key and a GPG key; admin pgp sets someone's key; an account
  without one can only look.
- Build nodes have their own GPG key and sign every claim and result;
  the node door checks the result's sha256 before unpacking it, and
  folio-publish refuses a result that was not signed.
- The site's own changes name what authorised them (Authorised-by:,
  Source-commit: HASH signed-by FPR); record/verify/site-key.asc.
- folio-audit (in folio-client): checks a copy of the record with only
  public keys: every site signature, every person's request, that what
  each change touched fits the command signed, the trailers of the
  site's own changes, and with --builds the nodes' signed results.
  New wiki page Auditing a Site.
- https only: every address the site or a node fetches from must be
  https (follow, watch, watch-forge, mirrors, registry-to, the site's
  address, the distribution mirror, the node's clone); http and git
  addresses are refused, with no loopback exception; every curl is held
  to https; folio-install has no plain-http choice. The default mirror
  is https://pkgmaster.devuan.org/merged (deb.devuan.org's certificate
  does not cover its name).
- Host keys: the site publishes its SSH host keys at /ssh-host-keys
  with their fingerprints on its pages; the desktop program, the folio
  command and build nodes pin them (no trust on first use). The forge's
  SSH key is confirmed by an administrator's fingerprint before the site
  sends anything (admin publish-to ADDRESS FINGERPRINT).
- Key rotation: the site publishes its keyring package (WORD-archive-
  keyring), which apt keeps up to date; folio-key new-signing-key,
  switch (also after signing-key-overlap), revoke-old, renew, emergency;
  signing keys run out (signing-key-lifetime) and are renewed ahead.
  setup.sh needs gpg (or --no-check), installs the keyring package and
  writes no deb-src line.
- admin verify: strict across rotations; changes signed with a stolen
  key before its revocation fail until the owner has reviewed them
  (admin verify accept); a signed log of key changes. While the signing
  key has run out or is revoked, the site takes no changes.
- Review: signatures = required on a new site; only the owner approves
  the owner's work; administrators approve their own and others' but
  not the owner's; maintainers and members always need an
  administrator or the owner; rebuild keeps the uploader and records
  rebuilt-by, so it approves nothing.
- Builds: a build that can never succeed on a release fails with the
  reason (needs X, which RELEASE does not have); one waiting for a
  package of this site is built again when that is published; .folio
  releases =; three node errors in a row make a build failed; a clone
  failure is the node's error; caches unused for over a week are
  deleted; links that leave the project are refused.
- Hardened builds: CPPFLAGS and LDFLAGS reach the compiler,
  _FORTIFY_SOURCE=3, stack protector, stack clash, CET, PIE, relro and
  now; -Wconversion and the stricter warnings, fixed without casts;
  make analyze, cppcheck, test-asan, fuzz-search, fuzz-record. Fuzzing
  and the sanitizers found a heap over-read in folio-generate and two
  cases of undefined behaviour in folio-search; all fixed.
- Desktop program: refuses to send a private key; runs ssh, gpg and curl
  by full path; the Site dialog has the web address and the site's
  fingerprints; owner-only Accept doubted changes; tooltips that say
  what each button does.
- Erasing also removes refused imports, needed-package notes, pages and
  signed requests that name what was erased; rate limit for imports
  (limit-import); admin move moves what is published; admin set of the
  address rewrites setup.sh; a failed setup takes away what it made.
- Docs: the wiki checked against the code and rewritten to explain what
  each thing is and how the steps go; new Quick Start and Auditing a
  Site; doc/design, INSTALL, packaging and erasing as .md and .html
  (doc/doc.css); the on-site guides.
- Site profiles in the desktop program and the folio command: several
  sites, each with its own SSH key, GPG key, GnuPG folder, pinned host
  keys and, for a site with its own certificate authority, that
  authority, trusted for that site only after its SHA-256 fingerprint is
  confirmed and checked again before each use (curl -q --cacert FILE
  --capath /dev/null). folio --site, --sites, --use, --add-site,
  --remove-site. The old single settings file becomes the site default.
- Fixed, found by the security-test site: the folio command lost the
  first command sent to a site whose SSH keys it had just fetched; the
  packaging scan took every variable on a pkg-config line as a module
  (hosho), stopped no call at its closing bracket (unryu), and missed
  $(PKG_CONFIG)-style calls; meson.build and CMakeLists.txt count only
  when they build the project.
- SSH key in both clients: the field is "SSH private key", with the
  reason shown beside it; choosing the .pub file uses the private key
  next to it and says so; a private key others can read is refused with
  the chmod to fix it; ssh's errors get the matching advice; empty means
  your usual key.
- Vouching shown where it applies: whoami and accounts say whether an
  account may vouch and why (owner, administrator, vouching group); the
  desktop's People tab says it above the Vouch box and greys out the flag
  buttons for administrators and the owner.
- Desktop: selectable labels no longer highlight by themselves when a
  tab is opened (gtk-label-select-on-focus off).
- Tests: make test passes 1458 and 210 desktop checks; make test-all
  passes 1408. tools/folio-local is replaced by the security-test setup.
2026-11-25 23:04:47 -06:00
a39dc8d0da security: every change signed by whoever made it, https only, key rotation, pinned host keys, hardened builds, folio-audit
- Signed changes: every door command that changes anything must come as
  a request signed with the person's own GPG key (folio-request 1: the
  site, the account, the exact command, the input's sha256, the time, a
  one-time nonce). The door checks the signature against the account's
  key in the record, that the SSH account and the signer are the same,
  the site, a five-minute window and that the nonce is new, before it
  runs anything. A stolen SSH key alone changes nothing. Read-only
  commands still work with plain ssh. Each change keeps its signed
  request in the record commit (Acted-by:, Request:).
- New package folio-client: the folio command (signs through gpg-agent,
  pins the site's SSH keys) and folio-mykeys; folio-desktop depends on
  it and signs every change itself.
- Keys: the owner's GPG key is required at install (folio-setup
  --owner-pgp for an older site or a lost key); vouch and admin node add
  take an SSH key and a GPG key; admin pgp sets someone's key; an account
  without one can only look.
- Build nodes have their own GPG key and sign every claim and result;
  the node door checks the result's sha256 before unpacking it, and
  folio-publish refuses a result that was not signed.
- The site's own changes name what authorised them (Authorised-by:,
  Source-commit: HASH signed-by FPR); record/verify/site-key.asc.
- folio-audit (in folio-client): checks a copy of the record with only
  public keys: every site signature, every person's request, that what
  each change touched fits the command signed, the trailers of the
  site's own changes, and with --builds the nodes' signed results.
  New wiki page Auditing a Site.
- https only: every address the site or a node fetches from must be
  https (follow, watch, watch-forge, mirrors, registry-to, the site's
  address, the distribution mirror, the node's clone); http and git
  addresses are refused, with no loopback exception; every curl is held
  to https; folio-install has no plain-http choice. The default mirror
  is https://pkgmaster.devuan.org/merged (deb.devuan.org's certificate
  does not cover its name).
- Host keys: the site publishes its SSH host keys at /ssh-host-keys
  with their fingerprints on its pages; the desktop program, the folio
  command and build nodes pin them (no trust on first use). The forge's
  SSH key is confirmed by an administrator's fingerprint before the site
  sends anything (admin publish-to ADDRESS FINGERPRINT).
- Key rotation: the site publishes its keyring package (WORD-archive-
  keyring), which apt keeps up to date; folio-key new-signing-key,
  switch (also after signing-key-overlap), revoke-old, renew, emergency;
  signing keys run out (signing-key-lifetime) and are renewed ahead.
  setup.sh needs gpg (or --no-check), installs the keyring package and
  writes no deb-src line.
- admin verify: strict across rotations; changes signed with a stolen
  key before its revocation fail until the owner has reviewed them
  (admin verify accept); a signed log of key changes. While the signing
  key has run out or is revoked, the site takes no changes.
- Review: signatures = required on a new site; only the owner approves
  the owner's work; administrators approve their own and others' but
  not the owner's; maintainers and members always need an
  administrator or the owner; rebuild keeps the uploader and records
  rebuilt-by, so it approves nothing.
- Builds: a build that can never succeed on a release fails with the
  reason (needs X, which RELEASE does not have); one waiting for a
  package of this site is built again when that is published; .folio
  releases =; three node errors in a row make a build failed; a clone
  failure is the node's error; caches unused for over a week are
  deleted; links that leave the project are refused.
- Hardened builds: CPPFLAGS and LDFLAGS reach the compiler,
  _FORTIFY_SOURCE=3, stack protector, stack clash, CET, PIE, relro and
  now; -Wconversion and the stricter warnings, fixed without casts;
  make analyze, cppcheck, test-asan, fuzz-search, fuzz-record. Fuzzing
  and the sanitizers found a heap over-read in folio-generate and two
  cases of undefined behaviour in folio-search; all fixed.
- Desktop program: refuses to send a private key; runs ssh, gpg and curl
  by full path; the Site dialog has the web address and the site's
  fingerprints; owner-only Accept doubted changes; tooltips that say
  what each button does.
- Erasing also removes refused imports, needed-package notes, pages and
  signed requests that name what was erased; rate limit for imports
  (limit-import); admin move moves what is published; admin set of the
  address rewrites setup.sh; a failed setup takes away what it made.
- Docs: the wiki checked against the code and rewritten to explain what
  each thing is and how the steps go; new Quick Start and Auditing a
  Site; doc/design, INSTALL, packaging and erasing as .md and .html
  (doc/doc.css); the on-site guides.
- Tests: make test passes 1362 and 102 desktop checks; make test-all
  passes 1313. tools/folio-local is replaced by the security-test setup.
2026-11-25 20:36:43 -06:00
fe6369aa69 docs: wiki checked against the code; backup, key and erase fixes; removing builds 2026-11-25 00:33:34 -06:00