(Taken from the RN eligibility notes)
Drug and Substance Misuse
The short, medium and long-term effects of the misuse of either illegal drugs or substances or legally obtained drugs or substances can have a damaging impact on mental and physical fitness and health. Drug or Substance misuse constitutes a direct threat to the operational effectiveness of the Armed Forces; the security and safety of Service personnel; and, potentially, the security and safety of the civilians whom they protect. Illegal misuse of drugs or substances by Service personnel also damages the reputation and standing of the Service. For all of these reasons, the misuse of drugs or substances is not tolerated within the Naval Service. The Naval Service recognise, however, that drug or substance misuse is increasingly common in civilian life, particularly among the young, and that you may have misused drugs or substances yourself in the past. This will not necessarily prevent you from joining, as all applications are considered individually. Acceptance into the Services will depend on the frequency of use and the class and type of drug or substance that has been misused. Criminal convictions for trafficking or supply of any class of drug or substance will bar entry.
Once you have joined the Naval Service, you are required to stay clear of drugs or substances at all times and also to avoid association with drug or substance misuse and suppliers. Once you have been enlisted, you will be liable by law to random compulsory drug testing throughout your Service career. If these tests show that you have misused drugs or substances, it is Armed Forces policy that, with very few exceptions, you will be discharged.
The short answer is, there’s a zero tolerance policy to drugs and drug use, don’t be an idiot and think you’ll get away with it because you definitely won’t.