Classic confinement request for gitea-cli

  • name: gitea-cli
  • description: gt is the official command-line tool for Gitea. It manages repositories, issues, pull requests, releases, Actions and packages from the terminal, and works with the user’s local Git repositories.
  • snapcraft: scripts/snap.sh (pending merge: PR 27; the script generates meta/snap.yaml and runs `snapcraft pack`)
  • upstream: https://gitea.com/gitea/cli
  • upstream-relation: I am a maintainer of the Gitea project and publish the snap on behalf of the project.
  • supported-category: None of the listed categories fits exactly. The closest is “tools for local, non-root user driven configuration of/switching to development workspaces/environments”, since gt drives the user’s local Git and SSH set-up. Requesting review of this case.
  • reasoning: gt is a developer tool that works with the user’s existing Git setup. It cannot do its job under strict confinement:
    • It runs the host `git` and `ssh` as subprocesses (clone, fetch, push, `auth setup-git` credential helper). Their versions and configuration are chosen by the user, so they cannot be bundled.
    • It reads the user’s Git configuration (~/.gitconfig, includes, repo-local config) and SSH keys and agent sockets in arbitrary locations, which the `home` and `ssh-keys` interfaces do not cover (`ssh-keys` only grants ~/.ssh and does not cover keys or includes elsewhere).
    • It stores credentials in the system keyring and opens the default browser for OAuth login. Neither is available to a strict snap without extra host-side set-up.
    • It works on repositories anywhere on disk, including outside $HOME and on removable media.
    • `gt auth setup-git` writes the path of the gt binary into the user’s Git config, so Git can call it as a credential helper. Under strict confinement the host git cannot run it.

The snap is a single statically linked Go binary (base core24) and bundles no libraries.

I understand that strict confinement is generally preferred over classic.

I’ve tried the existing interfaces to make the snap to work under strict confinement.

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

Hi @lunny

The functionality of the gitea-cli snap is similar to gh snap which is already classic and it makes sense to me to grant classic to gitea-cli snap.

We need to establish trust on the publisher before we can grant classic and I will begin the publisher vetting process as per Process for performing Snap Publisher Vetting .

Hi @lunny

+1 votes for, 0 votes against, publisher is successfully vetted, granting classic confinement to gitea-cli snap.

1 Like

Thank you very much. @shishirsub10

We also submitted an alias request Alias request for gitea-cli: gt - #4 by lunny . Is that a separate process we need to wait for?

Hi @lunny

Yes the alias request is being handled on the separate forum post.