4 ms·
Maybe referring to go packages having no metadata and being unsigned, so if a github account was hacked and you used go get on a third party pkg you could end u
by grey-area 13y ago
Maybe referring to go packages having no metadata and being unsigned, so if a github account was hacked and you used go get on a third party pkg you could end up compiling unexpected exploit code into your binary?
- tptacek 13y agoAgain not sure what that has to do with heap corruption.
- grey-area 13y agoAh, I see what you're getting at now I think - an exploit would not be required as you are blindly running the go code anyway (e.g. in a web server it could read/write files etc just as the web server process can). Might being able to cause heap corruption let the code affect server operations in unexpected ways though? For example bypassing restrictions on an app plugin in some sort of CMS, bypassing restrictions on something like db access or passwords in memory, or bypassing a sandbox like that on play.golang.org. I don't think Go is especially vulnerable in this regard, as you noted below ruby gems are also mostly unsigned just now, however I think there was a move to have those signed after the recent problems, and Go's pkgs don't have metadata or a facility to do this AFAIK. So that could be seen as a weakness (though one shared by many other package management systems).
- TylerE 13y agoYes, that's exactly what I meant. Imagine if say, a database adapter had a backdoor added, and no one noticed.
- obiterdictum 13y agoYou simply do not use "go get" on 3rd party repos in production. It's not different from pip or gem.
- tptacek 13y agoWell... Ruby developers almost invariably do use gem in production. And of course, gems are not signed.
- grey-area 13y agoI suspect a lot of people will (as they do with gems or pips), given the extra trouble forking all your dependencies and keeping track of updates to them causes. Many companies don't have a team to take care of this process, just developers, and the easy route with bundler or with go get is to use the 3rd party code directly, though with bundler you can pin to a major/minor version at least. I'm not even sure there is much to gain security-wise by forking a gem/pkg/pip, save perhaps delays in your process that might save you from deploying an exploit before it is used, unless you have someone do a code audit on all the code. That's practical in a large org but not in many small shops. I agree there's very little security difference anyway though between go get and bundle install for gems say (don't agree with the OP there), but go get has no clear way to add metadata like out-of-band code signatures as gems or pips do.
- bdamm 13y agoThe introduction of package management directly into the language tooling core is a very good move for the language designers. It is a highly modern touch, which will enable rapid development and a common understanding of packages. Other languages have developed such add-ons, but only after a period of confusion. If the designers want to really take it to the next level, they should introduce, possibly with idiomatic behavior but preferable with syntax, the idea of version pinning or at least version hinting within the "import" syntax.
- mwcampbell 13y agoAt the risk of some controversy, I think that if Go's core developers are serious about encouraging good software engineering, they should drop "go get" (presumably in Go 2). It seems to me that subrepositories / submodules at the version control level, with support for pinning, are the best way to manage dependencies.
- nknighthb 13y agoGoogle's internal developers operate in a vastly different world from the one most of us are used to, always building from the head of a single, massive Perforce repository. When your world enforces the assumption that the latest version of a dependency is stable and compatible, 'go get' is a perfectly reasonable solution.
- wtbob 13y ago> At the risk of some controversy, I think that if Go's core developers are serious about encouraging good software engineering, they should drop "go get" (presumably in Go 2). It seems to me that subrepositories / submodules at the version control level, with support for pinning, are the best way to manage dependencies. That's how 'go get' works.
- TylerE 13y agoNo it doesn't, you can't request or pin a specific version. You just get whatever is in HEAD when you pull.
- wtbob 13y ago> No it doesn't, you can't request or pin a specific version. You just get whatever is in HEAD when you pull. You get the dependency at a version control level, at a known-good version (because you pulled from the master branch) at the time you pulled, and after that it's up to you to update it.
- deleted 13y ago[deleted]
- deleted 13y ago