Does the act of writing a specification (how the code should behave) for a piece of security sensitive code lead to developers producing more secure code? We asked 138 developers to write a snippet of code to store a password: Half of them were asked to write down a specification of how the code should behave before writing the program, the other half were asked to write the code but without being prompted to write a specification first. We find that explicitly prompting developers to write a specification has a small positive effect on the security of password storage approaches implemented. However, developers often fail to store passwords securely, despite claiming to be confident and knowledgeable in their approaches, and despite considering an appropriate range of threats. We find a need for developer-centered usable mechanisms for telling developers how to store passwords: lists of what they must do are not working.
翻译:写一个安全敏感代码的规格( 代码应该如何行事) 是否会导致开发者生成更安全的代码? 我们要求138个开发者写一个代码片段以存储密码: 半数开发者被要求写一个代码在写入程序之前应该如何行事的规格, 另一半被要求写代码, 但没有被要求先写一个规格。 我们发现, 明确促使开发者写一个规格对所实施的密码存储方法的安全性影响不大。 然而, 开发者往往没有安全地存储密码, 尽管他们声称对方法有信心和了解, 尽管考虑过各种适当的威胁 。 我们发现, 开发者需要以开发者为中心的可用机制来告诉开发者如何存储密码: 他们必须做的事情清单是行不通的 。