Hi,
When I run the following script with valid keychain password, the system asks something like:
with buttons “Allow”, “Deny”, and “Always Allow”:
do shell script "security unlock-keychain -p kcPassword 'MyKeychain.keychain'"
do shell script "security 2>&1 find-generic-password -a kelhome -g"
Is it secure to always allow security access?
Edited: oops, forgot to redirect output to the trash:
do shell script "security unlock-keychain -p kcPassword 'MyKeychain.keychain'"
do shell script "security 2>&1 >/dev/null find-generic-password -a kelhome -g"
Edited: oops again . Forgot the added -w option:
do shell script "security unlock-keychain -p kcPassword 'MyKeychain.keychain'"
set r to (do shell script "security find-generic-password -a kelhome -gw")
display dialog r
Edited: I would think it is secure because you still need the password to unlock the keychain.
Thanks,
kel
Model: MBP
AppleScript: AS 2.2.4
Browser: Safari 536.28.10
Operating System: Mac OS X (10.8)