Corrosion can initiate cracking that leads to structural integrity reduction. Quantitative corrosion assessment is challenging, and the modeling of corrosion-induced crack initiation is essential for model-based corrosion reliability analysis of various structures. This paper proposes a probabilistic computational analysis framework for corrosion-to-crack transitions by integrating a phase-field model with machine learning and uncertainty quantification. An electro-chemo-mechanical phase-field model is modified to predict pitting corrosion evolution, in which stress is properly coupled into the electrode chemical potential. A crack initiation criterion based on morphology is proposed to quantify the pit-to-cracking transition. A spatiotemporal surrogate modeling method is developed to facilitate this, consisting of a Convolution Neural Network (CNN) to map corrosion morphology to latent spaces, and a Gaussian Process regression model with a nonlinear autoregressive exogenous model (NARX) architecture for prediction of corrosion dynamics in the latent space over time. It enables the real-time prediction of corrosion morphology and crack initiation behaviors (whether, when, and where the corrosion damage triggers the crack initiation), and thus makes it possible for probabilistic analysis, with uncertainty quantified. Examples at various stress and corrosion conditions are presented to demonstrate the proposed computational framework.