-
Notifications
You must be signed in to change notification settings - Fork 49
Verify SSL certificates by default #23
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
Verify SSL certificates by default #23
Conversation
This commit does not change the behaviour of this file. Instead it stores the options in a variable to remove one of the two curl blocks that have been identical for the most part. `&> /dev/null` is not needed if `-v` is omitted and `-s` is used.
Certificates are now verified by default. To disable verification use the option `verify_ssl: false` in your workflow config. See also: `curl` docs on option `-k`: https://curl.se/docs/manpage.html#-k
Thank you for these contributions, I appreciate any help to improve the project, and these are valuable additions. I have a busy week ahead, but will make some time during the week to review and merge. |
I have merged the pull requests and released a new version (v2.0.0). I mentioned you in the release note, if you prefer me to remove that, please let me know. I am still busy testing the features myself, and will continue to do so over the weekend. If it needs tweaking to sort out any issues (I don't think it will), then I'll patch it as I go. But for now a v2 tag exists and can be used - the previous v1 tag obviously also still exists, for those who currently use it. |
Great 👍! Line 50 in dc09356
On another note: I didn't like that the docker image was rebuilt for each run of the action and I was unsure how to use the caching feature. Therefore I switched to a composite action instead of a docker action in my fork, this means that CI would only work on linux (at least I suppose so), but as all my workflows run on If you find some time and are interested you can take a look at johannes-huther@af1465f. It runs significantly faster for me now. I also had to replace the way how the request id is generated as the previous method seems to be incompatible with ubuntu, but that should be no problem (johannes-huther@20d7312). I don't know if this is relevant for you or other users, or if you need the platform independence and therefore I didn't yet create a PR. If you ever got the caching feature working I would also be interested in an example workflow file :) |
I updated the v1 reference thanks. I'm aware that a caching solution is needed, and hoping to again look into the available options sometime soon. Would be great to improve that part for sure. |
Would you mind if I release my fork as an " Another approach would be to have both of them in your repository, but on different branches and tagging them as I'd of course also provide a link back to your repository such as: Cross-platform alternativeThis is a composite-action fork of the docker based cross-platform compatible project distributhor/workflow-webhook. If you need to run on anything different than |
I'm totally fine with it. If someone can benefit, it's all good. Once I've had a look at all the options available for caching and performance improvements, I will decide on an appropriate course of action for the project, but would lean towards supporting wider, as opposed to being more restrictive. Will definitely still look at what you've done and take it into consideration. But in the meantime you are more than welcome to create an alternative project and pulling upstream changes. No problem with that. |
Just a quick update. I've tested several options over the weekend, to determine best way forward for performance improvements. I first tried to play with docker image caching, but it didn't result in a major improvement - it was only fractionally faster. I then looked into the composite actions, as you have in the fork, and this does make a substantial difference. The only "downside" is that you are then tied a little closer to the environment in which it turns, and I'd like (as far as possible) to remain agnostic on that aspect. The last thing I tried was to pre-build the docker image, and host it on docker hub. The action then won't have to build the image, but can simply pull it. This is also a lot faster, and is almost comparable to the composite actions in terms of speed. After exploring all those avenues, I am going to update the project such that it will now use the pre-built docker image, so that here is no docker build step. The pre-built image uses the same Dockerfile that is in the project, so it all feels very clean, and the performance gains are good. |
Great, I didn't think about that option at all. I think I will stick with the composite variant for my projects for now, as it is the method with least overhead and i run everything on Some things you might consider (if you haven't already):
|
Merging this PR closes #20.
The code in this PR makes verification of SSL certificates the default (corresponds to approach 1 mentioned in #20). This has the benefit that the most secure option is used by default, but might break other peoples' workflows if they use unsigned certificates and would require them to update their workflow config.
If you want certificate verification not to be the default, I can modifiy this PR. If you want to do the change yourself, feel free to do so as well.
This PR also cleans up some of the code by storing the options in a variable and therefore allowing one of the
curl
sections to be removed. Also:&> /dev/null
is not needed if-v
is omitted and-s
is used and therefore removed.Disclaimer: I'm not fully able to test this as a proper GitHub Action in one of my projects. I therefore tested the code by running the docker container with the same environment variables, that I believe GitHub would use.Code fully tested using:
Also tested with
verify_ssl: false
andsilent: true
.