A Canadian political data firm called AggregateIQ (AIQ) left a large code repository downloadable online, according to a security researcher, exposing the political data and microtargeting tools that various Republican campaigns used to try to influence voters in the United States' 2016 election cycle.

The exposed data reveals AIQ's ties to the embattled data analytics firm Cabridge Analytica -- and, by extension, its ties to the campaigns of conservative Texas politicians Sen. Ted Cruz and Gov. Greg Abbott. As reported by Gizmodo, they also reveal AggregateIQ (AIQ)'s connection to Ukrainian steel magnate Serhiy Taruta, head Ukraine's newly formed Osnova party.

The data warehouse, discovered by UpGuard Director of Cyber Risk Research Chris Vickery, was hosted on a subdomain of AIQ and using a custom version of Gitlab, located at the web address gitlab.aggregateiq.com.

From UpGuard:

"Revealed within this repository is a set of sophisticated applications, data management programs, advertising trackers, and information databases that collectively could be used to target and influence individuals through a variety of methods, including automated phone calls, emails, political websites, volunteer canvassing, and Facebook ads. Also exposed among these tools are numerous credentials, keys, hashes, usernames, and passwords to access other AIQ assets, including databases, social media accounts, and Amazon Web Services repositories, raising the possibility of attacks by any malicious actors encountering the exposure."

The files were taken offline after Gizmodo reached out to AIQ's co-founder.

The exposed information confirms prior reporting that AIQ built a software program for Cambridge Analytica called Ripon (named for the town of Ripon, Wisconsin, where the Republican Party was founded). The platform was used by Cruz's bid for the 2016 GOP presidential nomination -- though unnamed sources from the Cruz campaign told Gizmodo that the software never actually functioned. While Gizmodo says AIQ was solely responsible for the platform, the company was bound a non-disclosure agreement from discussing its contract with Cambridge Analytica.

For Cruz and other conservatives tied to Cambridge Analytica, the confirmed connection to AIQ is another unwelcome link to controversy.

Cambridge Analytica is already under scrutiny in the US for hoarding and misusing data from more than 50 million Facebook users to benefit Republican campaigns.

Meanwhile, both Cambridge Analytica and AIQ are under fire across the pond for their involvement in Brexit campaigns. British authorities are currently investigating whether a Brexit campaign, which had more cash than it was legally allowed to spend, illegally funneled money to AIQ through other Brexit groups. The exposed files from AIQ should be of interest to investigators, Gizmodo noted, as they include references to some of the groups in question -- namely, Vote Leave and Veterans for Britain.

An unnamed former Cruz aide told Gizmodo that the campaign was initially unaware Cambridge Analytica tapped AIQ to develop the Ripon platform.

At the same time, the unearthed documents reveal another way in which foreign nationals were involved in the US 2016 election.

In some cases, the involvement of foreign nationals in US elections is illegal: Specifically, US law says foreign nationals must not "directly or indirectly participate in the decision-making process" of a political campaign.

On Monday morning, the government watchdog group Common Cause filed a complaint with the US Justice Department and the Federal Election Commission (FEC) against Cambridge Analytica for violating those laws. The London-based Cambridge Analytica, against the advice of its own counsel, tapped foreign nationals to advise US campaigns, in a "clear violation" of US law, Paul S. Ryan, Common Cause's VP of Policy & Litigation, told ZDNet.

However, Ryan said that in the wake of the UpGuard and Gizmodo reports, it's unclear whether AIQ's involvement was substantive enough to represent a violation of US election law.

"I don't know if simply writing code to create software platforms that are used by campaigns rises to that level of involvement," he said.

Ultimately, the connection between AIQ and Cambridge Analytica may have more of an impact in the UK than in the US.

Meanwhile, UpGuard notes the enormity of leaving such campaign data insecure: "one inadvertent leak can reveal implements designed to potentially influence entire electorates, and perhaps expose millions of people to the invasion of their privacy and the possibility of harm by malicious actors."