NSA Open Sources Tokeneer Research Project
Sorta. The govt is like any other entity that pays a contractor for copyrightable works. By default, the govt retains the copyright for any works done by the contractor for the govt. Some contracts can grant the contractor either limited/full or shared/exclusive rights depending on how the work is performed and who pays for what.
Note that just because it belongs to the US govt, it doesn't mean that the public has access to it. Many works are either classified, or very commonly, deemed FOUO (For Official Use Only) which restricts access to software.