Use mdfind to find applications that meet certain criteria
mdfind -onlyin /Applications -onlyin /Developer/Applications "kMDItemContentType == 'com.apple.application-bundle' && kMDItemCFBundleIdentifier == 'com.apple.*'" | while read filename; do basename "$filename"; done
mdfind "kMDItemAppStoreHasReceipt=1"