Analysis of the causes of accidents indicates the prevailing influence of corrosion factors on the structural reliability of main gas pipelines. During operation, main pipelines are exposed to the in-pipe pressure of the pumped product and ground electrolytes, which leads to corrosion-mechanical damage. Moreover, these factors can act in the most unfavorable combinations. This combined action reduces the durability of the material. This leads to much faster destruction of the pipe metal. Therefore, it is necessary to monitor not only general corrosion damage, but also local damage, which, when subjected to mechanical stress, can become a source of corrosion crack. The article discusses the main factors influencing the environmental safety of main gas pipelines, as determining the required level of quality at the time of operation.