Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Growing convinced we could and should ship new version cooldown in the Go modules ecosystem.

Growing convinced we could and should ship new version cooldown in the Go modules ecosystem.

Scheduled Pinned Locked Moved Uncategorized
13 Posts 5 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • filippo@abyssdomain.expertF filippo@abyssdomain.expert

    Growing convinced we could and should ship new version cooldown in the Go modules ecosystem.

    The subdb and MVP get us far, and supply chain attacks are not much of a thing in Go beyond typosquatting, but we want to stay ahead of them.

    Link Preview Image
    proposal: cmd/go: support dependency cooldown in Go tooling · Issue #76485 · golang/go

    Proposal Details Background Supply chain attacks on open-source software dependencies have become a regular occurrence. Go already takes measures against supply chain attacks. While Go libraries aren't a common target, this year GitLab d...

    favicon

    GitHub (github.com)

    drwho@masto.hackers.townD This user is from outside of this forum
    drwho@masto.hackers.townD This user is from outside of this forum
    drwho@masto.hackers.town
    wrote last edited by
    #4

    @filippo But then coders will go back to node.js!

    1 Reply Last reply
    0
    • filippo@abyssdomain.expertF filippo@abyssdomain.expert

      Growing convinced we could and should ship new version cooldown in the Go modules ecosystem.

      The subdb and MVP get us far, and supply chain attacks are not much of a thing in Go beyond typosquatting, but we want to stay ahead of them.

      Link Preview Image
      proposal: cmd/go: support dependency cooldown in Go tooling · Issue #76485 · golang/go

      Proposal Details Background Supply chain attacks on open-source software dependencies have become a regular occurrence. Go already takes measures against supply chain attacks. While Go libraries aren't a common target, this year GitLab d...

      favicon

      GitHub (github.com)

      raggi@don.rag.pubR This user is from outside of this forum
      raggi@don.rag.pubR This user is from outside of this forum
      raggi@don.rag.pub
      wrote last edited by
      #5

      @filippo we should work on review attestation, given mvs I don’t think this will have a ton of impact

      filippo@abyssdomain.expertF 1 Reply Last reply
      0
      • cks@mastodon.socialC cks@mastodon.social

        @filippo My experience is that I've seen multiple cases where dependabot updates raced with the dependency re-publishing a different thing under the same tag. The result was something that would only build if you used the proxy (which had cached the original published version). This is obviously bad practice (possibly in multiple places), but I think it suggests a cooldown would be useful even with MVP.

        (Also maybe dependabot needs a cooldown itself, but ... good luck persuading them.)

        filippo@abyssdomain.expertF This user is from outside of this forum
        filippo@abyssdomain.expertF This user is from outside of this forum
        filippo@abyssdomain.expert
        wrote last edited by
        #6

        @cks Editing a tag is indistinguishable from an attack, so it will never work, cooldown or not. The cooldown clock starts when the sumdb captures the first contents, which then are it forever.

        cks@mastodon.socialC 1 Reply Last reply
        0
        • markd@hachyderm.ioM markd@hachyderm.io

          @filippo If cooldown becomes common would that mean that supply chain attacks would mostly affect early adopters who presumably are more sensitive to the risks?

          filippo@abyssdomain.expertF This user is from outside of this forum
          filippo@abyssdomain.expertF This user is from outside of this forum
          filippo@abyssdomain.expert
          wrote last edited by
          #7

          @markd Why wouldn't clients that are most sensitive to risk adopt a longer, instead of shorter, cooldown?

          1 Reply Last reply
          0
          • raggi@don.rag.pubR raggi@don.rag.pub

            @filippo we should work on review attestation, given mvs I don’t think this will have a ton of impact

            filippo@abyssdomain.expertF This user is from outside of this forum
            filippo@abyssdomain.expertF This user is from outside of this forum
            filippo@abyssdomain.expert
            wrote last edited by
            #8

            @raggi Review attestation is one of those things I heard talked about for all of my career and never once saw implemented successfully at scale. Even at large companies with employees!

            There's a fundamental incentives problem which I mostly saw ignored or anyway unsolved.

            raggi@don.rag.pubR 1 Reply Last reply
            0
            • filippo@abyssdomain.expertF filippo@abyssdomain.expert

              @cks Editing a tag is indistinguishable from an attack, so it will never work, cooldown or not. The cooldown clock starts when the sumdb captures the first contents, which then are it forever.

              cks@mastodon.socialC This user is from outside of this forum
              cks@mastodon.socialC This user is from outside of this forum
              cks@mastodon.social
              wrote last edited by
              #9

              @filippo Sorry, I didn't manage to say my actual thought. I think the dependabot race shows that today, people are updating rapidly as soon as new versions become visible to them, even with MVP. So slowing down visibility through a cooldown would buy time.

              cks@mastodon.socialC 1 Reply Last reply
              0
              • filippo@abyssdomain.expertF filippo@abyssdomain.expert

                @raggi Review attestation is one of those things I heard talked about for all of my career and never once saw implemented successfully at scale. Even at large companies with employees!

                There's a fundamental incentives problem which I mostly saw ignored or anyway unsolved.

                raggi@don.rag.pubR This user is from outside of this forum
                raggi@don.rag.pubR This user is from outside of this forum
                raggi@don.rag.pub
                wrote last edited by
                #10

                @filippo seeing Google finally publishing rust ones gives me hope. We need to keep breaking the seal, not let people freak out, and just get on with it

                1 Reply Last reply
                0
                • cks@mastodon.socialC cks@mastodon.social

                  @filippo Sorry, I didn't manage to say my actual thought. I think the dependabot race shows that today, people are updating rapidly as soon as new versions become visible to them, even with MVP. So slowing down visibility through a cooldown would buy time.

                  cks@mastodon.socialC This user is from outside of this forum
                  cks@mastodon.socialC This user is from outside of this forum
                  cks@mastodon.social
                  wrote last edited by
                  #11

                  @filippo This has made me think of a little attack that's basically a reverse tag replacement attack:
                  * get access to a repo and publish a compromised version with a new version tag
                  * get the Go proxy to fetch and cache your new version
                  * force-push an innocent version under the same tag

                  People will look at your repo and see harmless code under the tag, but I believe actual 'go mod' updates use the proxy's cached version (compromised) and its cached sum, unless you force upstream use?

                  filippo@abyssdomain.expertF 1 Reply Last reply
                  0
                  • cks@mastodon.socialC cks@mastodon.social

                    @filippo This has made me think of a little attack that's basically a reverse tag replacement attack:
                    * get access to a repo and publish a compromised version with a new version tag
                    * get the Go proxy to fetch and cache your new version
                    * force-push an innocent version under the same tag

                    People will look at your repo and see harmless code under the tag, but I believe actual 'go mod' updates use the proxy's cached version (compromised) and its cached sum, unless you force upstream use?

                    filippo@abyssdomain.expertF This user is from outside of this forum
                    filippo@abyssdomain.expertF This user is from outside of this forum
                    filippo@abyssdomain.expert
                    wrote last edited by
                    #12

                    @cks yep see https://words.filippo.io/go-source/

                    There is no “unless you force an upstream fetch” though: unless you turn off the sumdb there is only one true version. The issue is using an unverifiable view like the GitHub UI to try to view it.

                    Not different from any other ecosystem though: plenty of malicious npm packages with innocent code on GitHub.

                    cks@mastodon.socialC 1 Reply Last reply
                    0
                    • filippo@abyssdomain.expertF filippo@abyssdomain.expert

                      @cks yep see https://words.filippo.io/go-source/

                      There is no “unless you force an upstream fetch” though: unless you turn off the sumdb there is only one true version. The issue is using an unverifiable view like the GitHub UI to try to view it.

                      Not different from any other ecosystem though: plenty of malicious npm packages with innocent code on GitHub.

                      cks@mastodon.socialC This user is from outside of this forum
                      cks@mastodon.socialC This user is from outside of this forum
                      cks@mastodon.social
                      wrote last edited by
                      #13

                      @filippo If you force an upstream fetch you get a big fatal error about the checksums not matching (which will detect the substitution). Otherwise you'll pull without any way to discover that the upstream and the proxy don't match.

                      (I force pulls of upstream for my own eccentric reasons so I get to see this every so often.)

                      1 Reply Last reply
                      1
                      0
                      • R relay@relay.infosec.exchange shared this topic
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups