News for hackers. Stuff that matters.
Re:GitHub Package Registry by adambatkin on Friday May 10, 2019 @07:39PM (#19883297)
Publishing to Maven Central comes with a bunch of requirements (https://central.sonatype.org/pages/requirements.html) may be seen as a burden to packagers, but is certainly a delight for end-users of those packages.

All packages are GPG signed, come with companion source and javadoc artifacts, and are guaranteed a certain amount of other metadata in the POM. There are "easier" repositories (like Bintray jcenter) but anyone who has used something from there that didn't include sources or proper licensing information soon comes to appreciate why it is that Maven Central (and not jcenter) that is the center of the Java ecosystem.

Re:GitHub Package Registry by wst_ on Saturday May 11, 2019 @04:15AM (#19885176)
Just compare how well organized and neet are the packages in Maven Cetral to mess in JCenter. JCenter is full of inconsistent trash. I can imagine people pushing packages there for testing and then just forget about them.

Not everyone and not all of them, of course. But while I was looking around to figure out which repository to choose as my main, JCenter has put me off. I still can't understand how people can easily trade convenience for quality.

Re:GitHub Package Registry by ccleve on Friday May 10, 2019 @09:36PM (#19883923)
Agree. It would be good if Github could enforce some standards as well. Maybe I should read the docs to see if they do...
Re:GitHub Package Registry by CamouflagedKiwi on Saturday May 11, 2019 @03:26AM (#19885059)
Unfortunately the GPG signing is worthless because there's no way of attaching trust to each key. So each package has been signed, but anyone could have issued the keys, so an attacker could easily do the same.

Also, not all artifacts have sources and javadoc. Most do but some certainly don't.

Re:GitHub Package Registry by wst_ on Saturday May 11, 2019 @04:37AM (#19885235)
So continuing this way GPG is worthless in general. Most of the keys you can't verify in person so there is no trust whatsoever. In this case Sonatype is verifying key for you. They will check if your key belongs to you and you are in control of your organization. Otherwise package would not be accepted.

I may be wrong but source and javadoc are requirements. Maybe there are some old packages without it, but new ones should be complete.

Re:GitHub Package Registry by CamouflagedKiwi on Saturday May 11, 2019 @05:43AM (#19885403)
Maybe they're historic and now it's a requirement, or maybe it's prereleases or something, but I have certainly seen some in the past. First one I can dig up: https://repo1.maven.org/maven2/com/google/protobuf/protobuf-... The newer versions certainly do have sources and javadoc, but you can't assume their presence for everything.
Re:GitHub Package Registry by dtech on Saturday May 11, 2019 @05:26AM (#19885354)
> So each package has been signed, but anyone could have issued the keys, so an attacker could easily do the same.

Not true. The GPG signature means the key belongs to an account with access to the group id (namespace, usually a domain), and that sonatype has verified the group id belongs to the original admin account for that group id.

It's not a lot of guarantees, but you cannot just generate a GPG key, sign a package, and publish to maven central.

Re:GitHub Package Registry by CamouflagedKiwi on Saturday May 11, 2019 @05:39AM (#19885390)
Anyone can issue a GPG key claiming to be whatever identity they want though. I've uploaded artifacts to Maven Central before and they didn't do any specific verification of the signing key - so if it just matches the domain that is no protection at all.
Re:GitHub Package Registry by Xylakant on Saturday May 11, 2019 @05:25AM (#19885353)
You could for example opt for TOFU. Then at least you’d be protected against a malicious takeover unless the attacker manages to access the maintainers private key. That’s been a pretty common issue in the recent past.