> In the absence of a CLA who does own the copyright to the work you do
under US law, if you are not an employee of the company that owns the code you're contributing to, and you didn't sign a work-for-hire agreement with them, then you own the code you produce, full stop.
Unless you signed a work-for-hire agreement with somebody else! Yhis is where it gets tricky.
In the US (afaik / ianal) your employer gets to claim your copyright if you’ve contributed to a project on company time, or using company equipment, or something else I can’t remember. This actually sounds reasonable to me.
under US law, if you are not an employee of the company that owns the code you're contributing to, and you didn't sign a work-for-hire agreement with them, then you own the code you produce, full stop.