There are a lot of “ors” and commas in that law, but it’s not hard to parse unless you’re being willfully obtuse.
((Declared war OR (invasion OR predatory incursion)) IS (perpetrated OR attempted OR threatened)) BY (foreign nation OR foreign government).
The law was drafted in the early 18th century when nation was more of an ethnographic term than a political one.
So "a predatory invasion threatened by Venezuelans" would satisfy that definition.