Input validation: input validation frameworks

Some object frameworks help with the syntax part of the input validation. Examples of input validation frameworks include the OWASP ESAPI Validation API, Struts, the Apache commons validator, the Hibernate validator, Java EE Bean validation, some uses of XML, and rare JSON libraries. When these objects or frameworks are available, you should make use of them.

Remember that using the framework or object does solve all input validation issues. When you use the framework, you must properly describe the tests to perform. Watch out for “It needs to ship yesterday. We’ll finish the input specifications later.” Also, you must ensure that you use the framework properly. For example. CWE-101 is Struts Validation Problems, of which there are 10 sub-weaknesses. In other words, while using it can help, developers regularly get it wrong and so the attackers win.

Frameworks and objects can often handle length and type. Sometimes then can handle syntax. They rarely are capable of checking business rules. This means that you are responsible for the business rules validation.

Published by

Kenneth Ingham

Kenneth has been working with security since the early 1980s. He was a system administrator when the Morris Worm was released, and one of his work areas was helping secure the systems. Since then, Kenneth has studied network and computer security, and spent many, many hours looking at how software fails. With knowledge about failures, he can help you produce software that is less likely to suffer a security breach. Kenneth has a Ph.D. in Computer Science, and his research topic was on computer security. Kenneth has helped developers creating systems for financial services institutions, telecommunications companies, and embedded system and process control.

Leave a Reply

Your email address will not be published. Required fields are marked *