List all keys added to keychain using `security add-generic-password`
This did it for me

security dump-keychain | grep 0x00000007 | awk -F= '{print $2}'


I used it for this blog post: https://www.aria.ai/blog/posts/storing-secrets-with-keychain.html