Skip to content

Github should be in control of the gh snap #12223

Open

Description

@Kedstar99

Describe the feature or problem you’d like to solve

A clear and concise description of what the feature or problem is.

Ubuntu is one of the most popular distros in the world, it is the defacto way your github action runners run. Currently the gh snap being provided is unofficial and provided by a third party https://github.com/casperdcl/cli/.

This is insanity and I suspect there are a large several hundred k users using this third party unofficial client. Looking at the snapcrafters heatmap for it. https://snapcraft.io/gh

gh is a tool that has access to confidential secrets, workflows, credentials, PAT tokens. This snap can currently easily be repackaged to exfiltrate secrets. Do you really want the packaging and publishing of your tool on a major platform like ubuntu to be defacto in-control by someone external? That seems like an accident waiting to happen.

Microsoft/github already closely work with Canonical on various bits including I assume actions and other snaps. It isn't much for a github action to build and publish this as a official snap.

Proposed solution

Take the snapcraft.yaml, find someone from snapcrafters to take ownership of the gh snap.

How will it benefit CLI and its users?

It will prevent a future security attack given it may not be immediately obvious from the snap store that this is an unofficial client.

Additional context

Add any other context like screenshots or mockups are helpful, if applicable.

Activity

  1. added
    enhancement
    on Nov 28, 2025
  2. github-actions commented on Nov 28, 2025

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.

    Unless you see the help wanted Contributions welcome label, we are not currently looking for external contributions for this feature.

    If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.

  3. added
    needs-triage
    on Nov 28, 2025
  4. williammartin commented on Nov 28, 2025

    @williammartin
    Member

    As a starting point, the snap has historically been broken because it doesn't use classic confinement, and we advise people not to use it. I do see that they just made a change to use classic confinement after several years.

    We also don't own the packages in the debian or red hat community repositories, nor any other repository in the unofficial sources. We rely on communities to manage their own vetting mechanisms and for users to understand their own package management sources. We have considered removing all unofficial sources from that doc as well, for fear of suggesting something that is compromised.

    All that said, there's definitely something worth digging into a bit more here, I don't want to dismiss anything when it comes to security. The decision to host our own package repositories was also several years before anyone currently on the team, so it's a worthwhile time to review on the team and with the Security folks; I'm going to bring this issue to their attention and see what they think.

    Thanks.

  5. added
    discuss
    on Nov 28, 2025
  6. Kedstar99 commented on Nov 28, 2025

    @Kedstar99
    Author

    I have pitched this in the snapcrafters forum. https://forum.snapcraft.io/t/gh-snap-ownership/49505

    Given the importance of this tool, it should be under at least Canonical, snapcrafters or github. Otherwise this could easily be another xz style supply attack.

  7. Kedstar99 commented on Nov 28, 2025

    @Kedstar99
    Author

    Also given your intention to have people not use the snap, i think it would be better for GitHub or Microsoft to publish a simple gh snap that would tell users to install it via your recommended instructions. That is safer than at present imho.

  8. added
    core
    and removed
    needs-triage
    on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    corediscussenhancementpackaging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions