Honestly, I wasn't confident enough to answer whether or not it is escaped by default.
So here is what I did. I changed one of my queries and ran the query profiler.
The result is as follows:
// Issue the request
$client = Clients::findFirstByPublicKey($key);
// The profile result
SELECT `clients`.`public_key`, `clients`.`private_key`, `clients`.`status`, `clients`.`type` FROM `clients` WHERE `clients`.`public_key` = :0 LIMIT 1
It looks like the framework does indeed use prepared statements when using findFirstBy<propertyName>()
.
Result: Using findFirstBy<propertyName>($value)
IS SECURE
Edit:: Thanks Phalcon - Was running my query profiler when you responded. Thanks again!