Skip to content
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

Deprecate -s flag and add --ed-key-file option to generate_appcast #2170

Merged
merged 1 commit into from
Jun 25, 2022

Conversation

zorgiepoo
Copy link
Member

@zorgiepoo zorgiepoo commented Jun 20, 2022

Passing a raw secret to command line argument (even when using a 'secret' environment variable) is discouraged and unsafe. After reading up several sources online, it's recommended to pass such a secret that CI platforms may provide as standard input to the program, using a built-in like echo.

So we deprecate the -s flag in sign_update and generate_appcast, add a --ed-key-file option to generate_appcast that takes a file just like sign_update -f (or --ed-key-file now), and interpret - as the standard input file to read the key from.

I'm pretty certain now this is the right way forward but I'll leave this PR open a bit in case anyone wants to chime in.

As our documentation generally recommends using the keychain which is the default path for these tools, I don't think we need to update any website documentation (edit: I should update the migration page). The help pages for these tools will be updated.

Fixes #2168

Misc Checklist

  • My change requires a documentation update on Sparkle's website repository
  • My change requires changes to generate_appcast, generate_keys, or sign_update

Only bug fixes to regressions or security fixes are being backported to the 1.x (master) branch now. If you believe your change is significant enough to backport, please also create a separate pull request against the master branch.

Testing

I tested and verified my change by using one or multiple of these methods:

  • Sparkle Test App
  • Unit Tests
  • My own app
  • Other (please specify)

For sign_update and generate_appcast tested that:

  • --ed-key-file path-to-file works
  • --ed-key-file - works
  • -s still works and prints deprecation warning to stderr for sign_update, and to stdout for generate_appcast

macOS version tested: 12.4 (21F79)

Copy link

@jeremyhu jeremyhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@zorgiepoo zorgiepoo merged commit e64b764 into 2.x Jun 25, 2022
@zorgiepoo zorgiepoo deleted the deprecate-raw-key-flags branch June 25, 2022 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reassess options that allow passing signing key as command line argument to signing tools
2 participants