there is a nation wide ban assault rifles in the U.S.
" As of 2019, there were no federal laws banning semiautomatic assault weapons, military-style .50 caliber rifles, handguns, or large-capacity magazines. There was a federal prohibition on assault weapons and large-capacity magazines between 1994 and 2004, but Congress allowed these restrictions to expire."
cfr.org/backgrounder/us-gun-policy-global-comparisons#chapter-title-0-1
" The gun used by the Gilroy shooter was an AK-47 type assault rifle. This weapon is illegal to buy or possess in California, which appears to be why the shooter crossed into Nevada to buy the gun," said Senator Dianne Feinstein in a statement. "The assault weapons ban legislation I introduced earlier this year would have prevented that sale from happening. It's time for Congress to debate this bill and vote on it."
"Senator Kamala Harris, who represents California, has called for a renewal of a federal assault weapons ban as well. She has stated that should she be elected, she will give Congress 100 days to take legislative action on gun violence"
theguardian.com/us-news/2019/jul/29/gilroy-shooting-us-gun-control-california
"Efforts to pass a new federal assault weapons ban were made in December 2012 after the Sandy Hook Elementary School shooting, in Newtown, Connecticut.[52][53][54] On January 24, 2013, Senator Feinstein introduced S. 150, the Assault Weapons Ban of 2013 (AWB 2013).[55] The bill was similar to the 1994 ban, but differed in that it would not expire after 10 years, On March 14, 2013, the Senate Judiciary Committee approved a version of the bill along party lines.[58] On April 17, 2013, AWB 2013 failed on a Senate vote of 40 to 60."
en.wikipedia.org/wiki/Federal_Assault_Weapons_Ban