This is a method for the detection and repair of nanoscale surface defects in a material substrate. Pitting corrosion is a common hazard that penetrates holes into metal. It is difficult to detect due to the small diameter of the holes. In order to target these localized defects, this phage-based technology harnesses the binding specificity that is inherent to biological interactions. Biomolecules are able to differentiate individual molecules from thousands of competitors. Phage display, commonly used to identify peptides with specific substrate affinities, is used to select peptides that can bind these surface defects. Phage display is a screening system in which a peptide of interest is expressed as part of a coat protein on the surface of the phage. The phage will then bind to substrates for which the expressed peptide has an affinity. A phage library composed of millions of phage and associated peptides is used for the screen. The system is used to select phage that bind: 1) exclusively to defects, 2) exclusively to a repair material, and 3) to a tether that links (1) and (2). This provides a means to deliver a repair material to the identified defect and integrate it into the surface, conferring structural support and extending the lifespan of the material.