Ah.... of course!
If you're looking in the users login.keychain-db, you'll need to specify the current logged in user & the absolute keychain path. I prefer to use `scutil` to get the currentUser.
I tried this method below and it spewed out a lot of data (I have 4 or 5 developer certs in my login keychain) so grep / awk if you want a specific name/trim the data returned down.
#get current user
currentUser="$(scutil <<<"show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }')"
# searches for 'developer' certs in current users login.keychain-db
# change path to /Library/Keychains/System.keychain if thats the one you want
SSKeychain=$(security find-certificate -a -c 'Developer' "/Users/${currentUser}/Library/Keychains/login.keychain-db")
# echos out but grep/awk the abve command to get a succinct reply then check with if clause
echo $SSKeychain