Example for google.com as an item name, I have two keychain items with the name "Foo", one in KeychainA another in keychainB.
When I run the following which password should be retrieved? Password from KeychainA or KeychainB?
Does it retrieve items from keychains by prioritizing retrieval from 'default' keychain first? Or it's sorted by the keychain name? or it prioritizes items based on date?
security find-generic-password -w -s 'google.com' -a 'Foo'
I asked because we often have certs that are duplicated across keychains and when I run the command above, the item is retrieved from a locked keychain. Which causes an OS prompt and that halts our Jenkins/CI.