The chemical reactions and pathways involving cyanuric acid, a suspected gastrointestinal or liver toxicant, and a potential degradation product of triazine herbicides, such as atrazine and simazine. It is widely used for the stabilization of available chlorine in swimming pool water and is also the starting compound for the synthesis of many organic derivatives.