President Donald Trump on Monday called out China on Twitter for having a "porous" border with North Korea ahead of a planned summit with Kim Jong Un, highlighting a major danger of the talks.

Trump's comments follow a rash of reports that Chinese companies have increased trade with North Korea and even helped it skirt sanctions by allowing its ships near its ports.

If Kim's diplomacy has bought him more support — specifically, economic support from China and South Korea becoming less willing to adhere to sanctions — then he's gained a massive boost for the talks.

If Kim drives a wedge between Washington and Beijing there's little else Trump can do to pressure North Korea besides war.

President Donald Trump called out China on Monday on Twitter for having a "porous" border with North Korea ahead of a planned summit with Kim Jong Un, highlighting a major danger of the talks in doing so.

"China must continue to be strong & tight on the Border of North Korea until a deal is made. The word is that recently the Border has become much more porous and more has been filtering in. I want this to happen, and North Korea to be VERY successful, but only after signing!" Trump wrote.

Trump's comments follow a rash of reports that Chinese companies have increased trade with North Korea and even helped it skirt sanctions by allowing its ships near its ports.

The Sino-North Korean border — just months ago an area devastated by the lack of cross-border trade after harsh US-led sanctions — has now economically perked up, with home prices on the Chinese side climbing up to 50%, according to Reuters.

While any increased trade with North Korea would likely be illicit and clandestine, the diplomatic thaw in tensions has been plainly noticeable with Kim twice traveling to China to meet with President Xi Jinping.

Trump touches on potential nightmare scenario with North Korea

North Korean leader Kim Jong Un was treated to a lavish welcome by President Xi during a trip to Beijing in May. AFP/Getty Images

If Kim and Xi's meetings have resulted in more economic support for North Korea, it could spell disaster for Trump's summit with Kim.

So far, North Korea has made only vague promises that it would denuclearize, which is the US's precondition for talks. Based on this promise, Kim has attained summits with South Korean President Moon Jae-in and Xi, resulting in warmer relations and more public support for Pyongyang.

If Kim's diplomacy has bought him more support — specifically economic support from China and South Korea becoming less willing to adhere to sanctions — then he's gained a massive boost in talks.

Rather than coming to Trump with the options of denuclearizing or facing united world pressure and isolation, Kim now can back out of the talks with increased support from China and possibly South Korea in his pocket.

About 90% of North Korea's trade is with China, and that alone could keep Kim's regime funded and in power. If Kim manages to drive a wedge between Washington and Beijing, Trump's only option for confronting North Korea may fall to military action.