Democrats and Republicans don't agree on much these days, but their mutual distrust of big tech stocks poses an underappreciated threat to companies like Google and Facebook, according to Goldman Sachs.

And while the Department of Justice and the Federal Trade Commission already announced investigations into some of Wall Street's biggest tech companies, the regulatory pressure is likely to only get worse, Goldman's chief equity strategist, David Kostin, wrote Friday.

He downgraded the communications sector to neutral from buy and argued that the group could be set for lackluster performance over the next several months.

"Our previous research showed that antitrust lawsuits typically take years to resolve but ultimately result in lower valuation between lawsuit filing and resolution and slower sales growth following resolution," Kostin said in a note to clients.

"Although the growth prospects of many Communication Services companies remain attractive, the valuation overhang from regulatory uncertainty will likely continue to grow and weigh on the sector's performance," he added.

Whether Kostin's caution is called for will depend on coordination between lawmakers on both sides of the aisle as well as the results of the 2020 election.

Democratic hopeful Sen. Elizabeth Warren, for example, often finds a punching bag in Facebook and its CEO, Mark Zuckerberg. Her distrust of Silicon Valley tends to spark Wall Street angst her election could hasten antitrust legislation and a tougher Justice Department.

Her campaign put up a giant billboard in the heart of Silicon Valley calling for the breakup of Big Tech.

"They've bulldozed competition, used our private information for profit, and tilted the playing field against everyone else," Warren wrote in March. "That's why my administration will make big, structural changes to the tech sector to promote more competition — including breaking up Amazon, Facebook, and Google," she added.

Any mediocre performance from the communications sector could have consequences for the broader S&P 500.

The relatively new sector group — made up of 27 stocks including household names like AT&T, Netflix, Twitter, Alphabet and Facebook — represents 10% of the index by market cap and therefore could have an overstated impact on the direction of the market.

But just because the group could be set for unimpressive performance over the next year doesn't mean individual stocks in the group can't exceed expectations, Kostin wrote.

Facebook, a lightning rod on Capitol Hill for its advertising policies and data management practices, is up 47% this year despite the regulator scrutiny, well above the S&P 500's 22% gain. Alphabet and Amazon (which is technically a consumer discretionary stock) are up 20% and 19% in 2019, respectively.

— CNBC's Michael Bloom contributed reporting.