We present a cellular automata approach to the morphology evolution of a corroding metal surface. In the model, we consider a morphology dependent corrosion probability of a site on the corrosion front. Selecting the model parameters we are able to reproduce a variety of different pit shapes and morphological regimes ranging from narrow pore-like channels to broader cavities. In the model, we control the ratio between localised and uniform corrosion. A diffusion process is also taken into account. The model is capable of predicting different scenarios for the evolution of the corrosion front in time.