There are a few common devices used for security that involve x rays. They are generally regulated by federal or state agencies. (The walk-through arch where a magnetic field is used to determine if you have any metals on or in your body does NOT involve x rays.)
Cabinet x-ray systems are one of the more common devices used for security. They are found primarily at airports (the devices that carry-on bags are sent through for x-ray examination), although you might see them at the entrances to some federal and state agencies and courthouses. These units use a low-dose, continuous x-ray beam, which is also referred to as fluoroscopy. Most items receive about one-tenth of a millirem of exposure (about a tenth of a day’s worth of natural background radiation). This amount of radiation won’t harm food, vitamins, prescriptions, milk, or other items you might eat later and is usually even safe for your lower-speed camera film (<1,000). The x-ray source within the machine is completely shielded, so there is no hazard to you as you walk by the unit or to people who work by the unit 8 to 10 hours a day.
CT (computerized tomography) machines are used to scan your checked luggage at the airport and sometimes to scan cargo coming in on planes or ships. CT machines emit x rays and are as safe as the cabinet x-ray systems mentioned above. The radiation dose to your luggage is about the same, you can eat or drink anything that was in your luggage without concern, you can stand by the machine, and you can work by the machine—all with no worry.
Another type of device, an x-ray or electron-beam machine, is used to give high doses of radiation to mail that might contain some dangerous biological substance (like anthrax). Because biological agents like anthrax are resistant to radiation and will only be killed by a high dose, the mail receives radiation doses that are a couple million times higher than we routinely receive from daily background radiation. The radiation does not harm paper mail itself (other than to possibly discolor it), and the mail does not become radioactive. If electronics or photographic film are contained within the mail, the electronic item or film may be damaged to the point where it cannot be used.