Classic confinement request for codemany

Hi store team,

I’d like to request classic confinement for the codemany snap. Revision 1 (0.43.0, amd64) is uploaded and waiting for manual review because of classic confinement.

What it is Codemany (https://codemany.com) runs self-hosted GitHub Actions runners on a user’s own machines. The snap has two apps:

  • codemany: a CLI and per-machine daemon. It registers runners with GitHub and runs CI jobs on the host. It also manages local KVM/QEMU VMs that serve as isolated runners.
  • codemany-desktop: a GTK/WebKitGTK tray and dashboard app for that daemon. It talks only to 127.0.0.1.

Supported category This fits the “build tools / CI agents” and “orchestration agents for local and remote VMs” categories. Codemany is a CI build agent. It executes arbitrary user workflows, the same way the GitHub Actions runner, GitLab Runner and Buildkite agent do.

Why strict confinement doesn’t work

  1. Arbitrary toolchains. GitHub Actions jobs run whatever the repository’s workflow says: the host’s compilers, SDKs, package managers, sudo apt-get install ..., docker build/run, language version managers, and so on. They need the host’s real filesystem and PATH. No set of interfaces can describe an arbitrary workflow.
  2. Docker and VMs. Jobs use the host’s Docker daemon and container toolchains. The daemon starts KVM/QEMU VMs (/dev/kvm, bridged networking, qemu binaries from the host) for VM-isolated runners.
  3. System setup. sudo codemany system-setup does the following once, with root’s approval:
    • writes polkit rules and systemd units under /etc
    • creates a codemany group
    • with --user-isolation, creates one system user per runner slot plus a root helper service that runs each slot as its own user
  4. User service. codemany install-service writes a systemd user unit (ExecStart=/snap/bin/codemany serve ...). That unit runs jobs as the user, with the user’s home directory and credentials (git, SSH, cloud CLIs), as CI jobs expect.

Snap-specific behavior already built in

  • Under $SNAP the daemon:
    • writes /snap/bin/codemany into the units, never a revision path
    • watches /snap/codemany/current/... and restarts into a refreshed revision once the running jobs finish
    • disables its own apt-based updater, so snapd handles refreshes
  • The desktop app’s autostart entry uses /snap/bin/codemany.codemany-desktop. The desktop app also does not offer its own updates under the snap.
  • A remove hook undoes system-setup (polkit rules, helper, slot users) and stops users’ snap-started services.

Links

  • Website: https://codemany.com
  • AppStream id: com.codemany.desktop (metainfo shipped in the snap)
  • Packaging: prebuilt release binaries, the same ones shipped in our signed apt repository

Thanks!

This request has been added to the queue for review by the @reviewers team.

Please use the template from:

And note that your snap must fit into one of the supported categories listed on:

… to be considered for classic at all …

Hi @ogra, thanks! Here it is in the template.

  • name: codemany

  • description: Codemany turns a Linux machine into a runner for GitHub Actions. It picks up CI jobs from GitHub and runs them on that machine. The snap has a background service with a command-line tool (codemany) and a small desktop app (codemany-desktop) that shows what the service is doing.

  • snapcraft: Not public, because the repo is private. I’m happy to share the file with reviewers.

  • upstream: PRIVATE

  • upstream-relation: I’m the developer. The snap uses the same files as our apt repo.

  • supported-category: HPC or orchestration agents/software for running workloads on systems without traditional users

  • reasoning: Most people put Codemany on a spare machine that only runs CI jobs. Nobody logs in to it after setup. Each job runs whatever commands the repo’s workflow file asks for, so we can’t know them ahead of time. Strict confinement breaks this in four ways:

    1. Jobs use the tools already on the machine, like compilers and SDKs. A strict snap can’t see the host’s /usr, so the jobs can’t find them.
    2. Jobs can’t use sudo, so Codemany installs the packages a job’s workflow needs (like compilers, Docker or QEMU) from the distro’s own archive. We can’t know that list ahead of time because every repo’s workflow is different. A one-time sudo codemany system-setup can also create one user per runner so jobs can’t see each other. That user accounting is something snapd can’t do for us.
    3. Jobs use the host’s Docker, and the service starts KVM/QEMU VMs. The docker and kvm interfaces give access to the devices, but the jobs still need the host’s files.
    4. By default, jobs run as the user, with their own home folder, git and SSH keys, the way CI jobs expect.

    What we already do for snaps:

    • The service and the desktop app start from /snap/bin, so refreshes work.
    • snapd handles all updates. Our own updater is off inside the snap.
    • A remove hook undoes system-setup.
    • The snap never runs sudo or pkexec on its own.
  • I understand that strict confinement is generally preferred over classic.

  • I looked at the existing interfaces (docker, kvm, home, personal-files, system-files). They don’t cover the points above.

Let me know what you think!

Thank you!