-
Notifications
You must be signed in to change notification settings - Fork 7
Make certificate-password and keychain-password optional #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR makes two inputs optional for iOS app signing: certificate-password and keychain-password. The changes remove required validation for these parameters and implement fallback logic to handle cases where they are not provided.
- Remove validation that required
certificate-passwordandkeychain-passwordinputs - Add auto-generation of keychain password when not provided using
openssl rand -base64 32 - Add conditional certificate import logic to handle password-protected and unprotected certificates
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| action.yml | Removes validation checks and implements fallback logic for optional password parameters |
| README.md | Updates documentation to clarify that both password parameters are now optional |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
action.yml
Outdated
| if ! security import $CERTIFICATE_PATH -A -t cert -f pkcs12 -k $KEYCHAIN_PATH; then | ||
| echo "Certificate import failed. If this P12 file requires a password, please provide certificate-password input." |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message could be more specific about the actual failure reason. Consider capturing the security command's error output to provide more actionable feedback to users.
| if ! security import $CERTIFICATE_PATH -A -t cert -f pkcs12 -k $KEYCHAIN_PATH; then | |
| echo "Certificate import failed. If this P12 file requires a password, please provide certificate-password input." | |
| SECURITY_IMPORT_ERROR=$(security import $CERTIFICATE_PATH -A -t cert -f pkcs12 -k $KEYCHAIN_PATH 2>&1) | |
| if [ $? -ne 0 ]; then | |
| echo "Certificate import failed. If this P12 file requires a password, please provide certificate-password input." | |
| echo "Error output from 'security import':" | |
| echo "$SECURITY_IMPORT_ERROR" |
action.yml
Outdated
| # Mask the keychain password to prevent accidental logging | ||
| echo "::add-mask::$KEYCHAIN_PASSWORD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we even need to log this? I'd remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done ✅
Uh oh!
There was an error while loading. Please reload this page.