The tooling allows having byte-for-byte match between two binaries if build your own from scratch using tools. In other words, cloning the repo and building v2.x.x using @GoReleaser on your own machines should give you 0-diff binary compared to the ones produced by our CI/CD.
Sweet! We still have a missing piece of the puzzle: signing the artifacts. This was me after wrestling with gpg on the same day of setting up our CI/CD flows. We have hashes, but who says the artifacts and the hashes were not MitM-ed? 🫤
Signing proves the integrity of the artifact and the identity of the person putting their John Hancock on it. We had an incident in late 2020 where CI/CD executed the release workflow on due to tag pushed on a fork. How do we know the tag is approved?
Our fix to that issue was by including a step in our workflow to reject tags not signed by @mholt6, the BDFL of @caddyserver, plain and simple. I admit, this was a band-aid.
Binaries are still not signed, though. How do we publicly prove the integrity of the binaries, proving the identity of the subject behind the signing key, prove the validity of the signature and the keys, and prove all is in order?
.@projectsigstore is an initiative to create an ecosystem to generate code-signing certs, publicly publish cert transparency logs (tlog), the signatures, and everything in between by utilizing the identity information embedded in CI/CD envs.
Yet again, with the help of @GoReleaser, it was easy to add not only keyless signatures with @projectsigstore, but also SBOMs for all binaries attached to releases. Moreover, all artifacts are signed, be it archives, SBOM, or checksum file!
Sign all the things!
In sum: @caddyserver git tags are signed, SBOMs are provided and signed, builds are reproducible and checksumed and signed, and signatures are publicly published. Are we still trusting trust of the supply chain?
We'll publish instructions on how to verify the signatures 📑
We're probably too late to the party, @lorenc_dan, but the answer is: Yes, as of v2.6.0-beta*
What is the maximum UID and GID? Can they be negative numbers?
To begin the investigation, we need to first know the type limitation. Is it an int or uint? @Wikipedia says it's signed int, but the sign bit is ignored, so 2^x ? x= ?
Still... (u?)int? Both Linux and macOS define {g,u}id as uint. Can we assume we will never encounter a negative {u,g}id? Hahaha, innocent of you to assume! On macOS, /etc/{passwd,group} has entries for `nobody` with {g,u}id of -2.
Is this a bug? Well, no.
You see, if you `egrep '(UID|GID)_MAX' /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/syslimits.h` on macOS, you'll find `?_MAX 2147483647U /* max value for a ?_t (2^31-2) */`, which means they account for the -2 underflow!!!
The issue was recognized when a friend reported `scp` and `rsync` not working. I found the culprit to be not hooking up the session's/channel's I/O to spawned process, otherwise the new process assumed the null devices as its std{in,out,err}.
In other words, the newly created process was not reading/writing to/from the client's shell, rather from, e.g., secondary tty device (pair of the pty device). Thus the I/O was not channeled from the client to the process, rather to the PTY session.