# devvm's co-signer, one devvm-cosign command per instance: devvm-cosign@run.service, which # devvm-cosign.timer starts hourly, and devvm-cosign@check.service and devvm-cosign@init.service, which # the maintainer starts once. docs/content/docs/contributing/cosigner.md sets it up. [Unit] Description=devvm's co-signer: %i Documentation=https://devvm.dev/docs/contributing/cosigner/ Wants=network-online.target After=network-online.target devvm-cosign-podman.service Requires=devvm-cosign-podman.service # Any failure, a killed or timed-out run's too, tells the maintainer, through the config's notify. OnFailure=devvm-cosign-failed.service [Service] Type=oneshot User=devvm-cosign Group=devvm-cosign ExecStart=/usr/local/bin/devvm-cosign -config /etc/devvm-cosign/config.toml %i # The keys are root's, mode 0600, so the co-signer's user can't read them: systemd copies each into # this service's own credentials folder for as long as it runs, by its file's name, which # devvm-cosign reads them from ($CREDENTIALS_DIRECTORY). The base's key, once there is one, comes # from devvm-cosign-base.conf, a drop-in, as a credential that isn't there fails the service. LoadCredential=release.key:/etc/devvm-cosign/release.key LoadCredential=app.pem:/etc/devvm-cosign/app.pem # release.sh's containers run in the rootless podman service of devvm-cosign-podman.service, as # this service's NoNewPrivileges stops podman mapping a user namespace itself (newuidmap). Environment=CONTAINER_HOST=unix:///run/devvm-cosign/podman.sock # A release builds in well under an hour; release.sh stops its own containers after two. TimeoutStartSec=3h KillMode=mixed UMask=0077 NoNewPrivileges=yes ProtectSystem=strict # The state folder, which no build can reach, and the build folder, which the builds write. ReadWritePaths=/var/lib/devvm-cosign /var/lib/devvm-cosign-build ProtectHome=yes PrivateTmp=yes # Its processes, release.sh and git among them, which are dumpable, can't be seen from outside it. PrivatePIDs=yes PrivateDevices=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectKernelLogs=yes ProtectControlGroups=yes ProtectClock=yes ProtectHostname=yes RestrictSUIDSGID=yes RestrictRealtime=yes LockPersonality=yes CapabilityBoundingSet= AmbientCapabilities= SystemCallArchitectures=native