Developer Reading List, July 01, 2014 The best summer reads.
The CERT C Coding Standard, 2nd Ed.
by Robert Seacord
The author, Robert Seacord, works at Carnegie-Mellon University's CERT (Computer Emergency Readiness Team), which has for decades been at the center of the fight against black hat hackers. He has an unparalleled reputation for putting out some of the best, if also the dullest, books of secure coding rules. They all use the same general approach: a catalog of mostly rules that, if followed faithfully, will reduce the number of exploitable opportunities in your code. This book follows in that long tradition. It contains 98 rules for C programming with examples of problems (termed "non-compliant" code) and the remediating counter-examples followed by a military-like classification system in which severity, likelihood, remediation cost, and priority are all assessed and presented in endless categorization details.
However, because of Seacord's unremitting thoroughness and clarity, the books occupy an important place in the coding literature. Every organization that codes in C should, in my view, obtain a copy of this book and thoughtfully incorporate its recommendations into their coding standards. What Seacord does not say, but should say, is that most sites' coding standards focus heavily on syntax, while offering minimal guidance on topics like security. Moreover, most experts would agree that sites rarely have the talent in-house to formulate secure-coding rules correctly, so they are incapable of properly formulating the necessary guidelines even if they are so disposed. That is where this book comes in. It is a fairly complete (could it ever be entirely complete?) compendium, useful for both reference and for excerpting into in-house standards and enforcing in code reviews. For that purpose, I prefer it to Seacord's earlier Secure Coding in C and C++, which I reviewed last year. While the latter book is more readable (it's thematic, rather than a reference resource), it is less adoptable by organizations in need.
Few developers, especially in regulated industries, would disagree that programmers need to learn to code automatically using secure techniques and hardened functions most especially in C. This volume, which at 512 pages provides all the necessary detail, is bound to get them across the river Jordan to that happy, secure place. Definitely recommended.