10 Commits
Author SHA1 Message Date
jwinterm 4767b7965a fix: emit real micron, and validate values interpolated into daemon configs
render_micron was a one-line alias to the Gemtext renderer, so every .mu file
AMPG produced was Gemtext. A Nomad Network browser renders those markers as
raw punctuation. Micron is a different markup: headings are > by depth, links
are inline as `[label`url] rather than standalone lines, emphasis is a toggle
pair, and literal blocks are fenced with `=.

Content is now escaped as well. Micron's control character is the backtick, and
>, <, #, and - are structural at column zero, so a vendor named ">Free Beer"
would have become a section heading on the published page. The line-start check
applies to the emitted line rather than each text chunk, since whether a
character is structural depends on it landing at column zero.

Separately, torrc and tunnels.conf are line-oriented with no quoting or escape
mechanism, so a newline in an interpolated value injects an arbitrary directive:
a tunnel_name of "web\nhost = attacker.example" silently repoints the tunnel.
tunnel_name and keys_file are now validated at the point of interpolation.
_validate_site_id covers the init path only, so a config loaded from disk never
passed through it. There is nothing to escape with here, so these reject rather
than sanitize.

Generated systemd units had no User= and no hardening, so an operator following
the install steps as root got a root-run daemon. Units now carry User=/Group=
when a service account is configured, a visible warning when not, and a baseline
of hardening directives chosen to not break a daemon whose state directory may
live anywhere.

Two tests asserted Gemtext markers inside a .mu file and so had encoded the bug.
2026-07-28 16:03:40 -04:00
jwinterm c38eab9c28 Fix I2P web tunnel deployment shape 2026-07-08 09:11:32 -04:00
jwinterm a143cd9342 Add package deploy apply stage 2026-07-07 09:37:36 -04:00
jwinterm 0426ca673c Require approved artifact digests for apply 2026-07-06 16:30:40 -04:00
jwinterm a921f158c3 Plan managed supervisor actions 2026-07-06 12:17:05 -04:00
jwinterm 3063e61676 Plan managed state artifact copies 2026-07-06 11:49:36 -04:00
jwinterm b268e93634 Add managed state contract 2026-07-06 11:06:11 -04:00
jwinterm 12983ca134 Add address capture to activation plan 2026-07-06 10:30:42 -04:00
jwinterm 1641f2009d Write managed install artifacts 2026-07-06 05:50:12 -04:00
jwinterm 035ab4ac81 Add managed daemon install plans 2026-07-06 05:42:41 -04:00