This excerpt is taken from Sheikh Muhammad Iqbal Kilani's book "Al-Wala Wal-Bara" .
نہی الـــولاء عن المنـــافـقین
It is forbidden to befriend hypocrites who are at war with Muslims and have relations with disbelievers.
Hypocrites who commit treason during war must be killed immediately.
[وَدُّوۡا لَوۡ تَکۡفُرُوۡنَ کَمَا کَفَرُوۡا فَتَکُوۡنُوۡنَ سَوَآءً فَلَا تَتَّخِذُوۡا مِنۡہُمۡ اَوۡلِیَآءَ حَتّٰی یُہَاجِرُوۡا فِیۡ سَبِیۡلِ اللّٰہِ ؕ فَاِنۡ تَوَلَّوۡا فَخُذُوۡہُمۡ وَ اقۡتُلُوۡہُمۡ حَیۡثُ وَجَدۡتُّمُوۡہُمۡ ۪ وَ لَا تَتَّخِذُوۡا مِنۡہُمۡ وَلِیًّا وَّ لَا نَصِیۡرًا]
They (i.e., the hypocrites) want that you become disbelievers just as they are disbelievers so that you all become equal. Do not take any of such hypocrites as your friend until they migrate in the way of Allah. If they do not migrate, then seize them wherever you find them and kill them. Do not take any of them as your friend or helper.
Reference: (Surah An-Nisa:89)
It is forbidden to attend the gatherings of hypocrites unless they repent.
[وَ قَدۡ نَزَّلَ عَلَیۡکُمۡ فِی الۡکِتٰبِ اَنۡ اِذَا سَمِعۡتُمۡ اٰیٰتِ اللّٰہِ یُکۡفَرُ بِہَا وَ یُسۡتَہۡزَاُ بِہَا فَلَا تَقۡعُدُوۡا مَعَہُمۡ حَتّٰی یَخُوۡضُوۡا فِیۡ حَدِیۡثٍ غَیۡرِہٖۤ ۫ۖ اِنَّکُمۡ اِذًا مِّثۡلُہُمۡ ؕ اِنَّ اللّٰہَ جَامِعُ الۡمُنٰفِقِیۡنَ وَ الۡکٰفِرِیۡنَ فِیۡ جَہَنَّمَ جَمِیۡعَۨا]
Allah Almighty has commanded you in this book that wherever you hear disbelief being spread against the verses of Allah Almighty and they are being mocked, do not sit there until these people engage in some other matter. If you do so, you too will be like them. Indeed, Allah Almighty gathers the hypocrites and disbelievers in Hell.
Reference: (Surah An-Nisa:140)