Volume 4, Book 52, Number 286:
Narrated Salama bin Al-Akwa:
"An infidel spy came to the Prophet while he was on a journey. The
spy sat with the companions of the Prophet and started talking and then
went away. The Prophet said (to his companions), 'Chase and kill him.'
So, I killed him." The Prophet then gave him the belongings of the killed
spy (in addition to his share of the war booty).
Seemingly, there was no trial, no attempt to find out whether he really was a spy or if he had any other reason to leave. There was suspicion from Muhammad, and the command to kill him based on that suspicion.
Is that just judgment based on knowledge of truth? Is it just to condemn and execute people without giving them the right to speak for themselves first and explain?