Fiber-optic network infrastructures are crucial for the transmission of data over long and short distances. Fiber optics are also preferred for the infrastructure of in-building data communications. In this study, we use polarization analysis to ensure the security of the optical fiber/cables of the physical layer. This method exploits the changes induced by mechanical vibrations to polarization states, which can be easily detected using a polarization beam splitter and a balancing photodetector. We use machine learning to classify selected events that violate the safety of the physical layer, such as manipulation or temporary disconnection of connectors. The results show the resting state can be accurately distinguished from selected security breaches for a fiber route subjected to environmental disturbances, where individual events can be classified with nearly 99% accuracy.