With his contract set to expire at the end of the 2006–07 season, Rivet was traded on February 25, 2007, to the San Jose Sharks with a fifth-round draft pick in 2008 for Josh Gorges and a first-round draft pick in 2007. This pick would later be used to draft former Canadien captain Max Pacioretty (currently playing for the Vegas Golden Knights). Before becoming an unrestricted free agent in the off-season, he re-signed with the Sharks to a four-year, US$14 million contract, citing San Jose's fan base and competitiveness as major factors in staying with the club. He reportedly chose that offer over San Jose's offer of $12 million over the same time span, but with a no-trade clause. In the first season of his new contract, he recorded a career-high 30 assists and 35 points, topping all team defencemen in scoring (Brian Campbell finished with more points overall during the season, but only scored 19 of his points with San Jose).