The Pentagon over the years has secretly acquired Soviet equipment as part of a clandestine program. Now these weapons are going to Ukraine.
These weapons are decades old and were obtained by the U.S. so it could examine the technology used by the Russian military and which Moscow has exported around the world (source).
Likely the acquisition of weapons intended for direct fighting is difficult to keep secret. But it may be possible to do so with the samples acquired for reverse engineering or capability testing.
Also, various components require to make the weapons may be secretly acquired. Russian weapons contain many electronic components of foreign origin that are banned by sanctions yet somehow have been obtained (source).