A scanning cannula for scanning an electrosurgical instrument for electrical insulation defects includes an elongated sleeve having a receiving end, an opposite exit end, and a passageway extending from the receiving end to the exit end. At least one sweeping contact is disposed in the passageway with a limit switch or photocell upstream. A circuit is electrically connected to the at least one sweeping contact. A communication device is connected to the circuit to transmit signals from the circuit to a controller of a surgical instrument. An electrosurgical instrument inserted into the receiving end of the sleeve passes through the at least one sweeping contact, and any electrical defect of the electrosurgical instrument detected by the at least one sweeping contact and assessed by the software is relayed as an error signal to the circuit, which communicates the error signal to the controller. The controller cuts current to the electrosurgical instrument and signals an alarm.A minimally invasive RF scanning cannula is used for access in minimally invasive surgery (MIS). The cannula is partially inserted into the abdominal wall following a puncture wound that is performed by the trocar which protrudes from the bottom end of cannula. Once placed into the patients skin and related tissue, the cannula allows insertion of the working shafts of surgical devices into the laparoscopic cavity while sealing insufflation pressure. Many of the devices that are used in MIS are instruments that deliver monopolar RF energy to the target tissue for the purpose of cauterizing, cutting and sealing. RF monopolar energy is very powerful and many unintended injuries occur due to arcing and stray currents through insulation defects. The present invention discloses a cannula with an added capability for testing the insulated shafts of any incoming devices for insulation defects, and not allow electricity to flow to the device from the generator unless the insulation of the shaft has been