I think Apple's official code signing tool is also open source? https://github.com/Apple-FOSS-Mirror/security_systemkeychain...

xar is another tool for codesigning Mac installer packages, which runs on Linux. I've used it successfully in the past.

https://users.wfu.edu/cottrell/productsign/productsign_linux...

Good pointers indeed -

Apple's code signing tool is open source, but heavily dependent on Cocoa/OSX libraries like CoreFoundation. I'm not sure if it works with any of the open-source reimplementations of these libraries, although I kind of want to try now, just for fun - has anyone done this already? Plus, it's not Written in Rust (TM)!

`xar` only signs packages, not Mach-O binaries, at least as far as I know?

CoreFoundation is (partially?) open-source and cross-platform now: https://github.com/apple/swift-corelibs-foundation