Follow Least Power Principle Luke

Alex Tatulchenkov
1 min readApr 18, 2020

In my previous post I said that you may not care about source of the data, and to prevent any type of injection attack it’s sufficient to do context specific escaping. But let’s look from a different perspective: until input data reach the sink it consume computational power of your server. Usually computer power is not free, so why should you pay for useless or harmful data and let malicious users to abuse your server resources?

Access to computational power is a privilege. Taking into account Least Privilege Principle I urge you to follow Least computational Power Principle:

Do not transfer malicious data from source to sink. Do full recognition at the very beginning and stop program execution if input data doesn’t conform rules of your domain.

--

--

Alex Tatulchenkov

Senior Software Engineer at Intetics Inc., AppSec Manifesto evangelist