The State of Israel was the aggressor in the Six-Day War which started with Israeli air-raids into Egypt and Syria on June 5th, 1967.
...
The timeline of the six days war is clear and documented, Israel responded to the aggression of Egypt and started an air attack on Egypt, after that Jordan and Syria attacked Israel. Both Syria and Jordan threw the first punch and Israel responded to that, matter of fact Levi Eshkol said this: "We shall not attack any country unless it opens war on us. Even now, when the mortars speak, we have not given up our quest for peace. We strive to repel all menace of terrorism and any danger of aggression to ensure our security and our legitimate rights."
Israel also sent massages to Jordan that they don’t want war with them, but Jordan ignored that and attacked Israel.
In addition, Nasser did violate the right of innocent maritime passage and the 1957 declaration of 17 maritime powers at the UN, that stated that Israel had the right of transit through the Straits of Tiran, and closed Straits of Tiran which means blocking Israel main port, Israel was denied access to its main supplier of oil, and Nasser knew that :
“"Taking over Sharm el Sheikh meant confrontation with Israel (and) also meant that we were ready to enter a general war with Israel. The battle will be a general one and our basic objective will be to destroy Israel” - Gamal Abdel Nasser speech to the General Council of the International Confederation of Arab Trade Unions”
President LB Johnson addressed this act of war and said:
"[The Arab blockade of Israel shipping in the Gulf of Aqaba is] illegal and potentially disastrous to the cause of peace. ...The purported closing of the Gulf of Aqaba has brought a new and grave dimension to the crisis. The United States considers the gulf to be an international waterway."President LB Johnson - Times May 24th 1967 full text here
And as Abba Eban said:
"Our intention to regard the closing of the Straits as a casus belli was communicated...to the foreign ministers of those states which had supported international navigation in the Straits in 1957 and thereafter. There can be no doubt that these warnings reached Cairo. One thing was now clear. If Nasser imposed a blockade, the explosion would ensue not from 'miscalculation', but from an open-eyed and conscious readiness for war." - Abba Eban
Also Israel had been surrounded by approximately 465,000 enemy troops, more than 2880 tanks and 810 aircraft.
Israel tried to find a diplomatic solutions but all of them failed, eventually Israel had to respond to these acts of aggression.
Even the UN said it was war of defense when they rejected resolutions which labling Israel as the aggressor in the UN Security Council, and also in the UN General Assembly after the war. At the Security Council it was outvoted 11-4, and at the General Assembly only 32 states supported it while the majority didn’t. It was clear back then, it was war of defense.