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

run scheduled builds every week #676

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ansnoussi
Copy link

@ansnoussi ansnoussi commented Aug 22, 2023

Context :

  • the current latest image for Gotenberg has several vulnerabilities (some from the base debian image, but mostly from installed packages like chromium)
  • rebuilding the image will fetch latest versions for these packages and solve 17High, 14Medium and 7Low vulnerabilities:
  • here's the test for rebuilding the image and scanning with Docker scout :
    • before :
      Screenshot 2023-08-22 at 14 31 13
    • after :
      Screenshot 2023-08-22 at 14 31 37

What's added in this PR :

Run scheduled weekly builds to the keep the latest image always up to date (Use the latest release tag for build).

@gulien
Copy link
Collaborator

gulien commented Aug 23, 2023

Hello @ansnoussi,

Thanks for your PR! AFAIK, it overrides the latest versions? Wouldn't it better to create a new minor release instead?

@ansnoussi
Copy link
Author

ansnoussi commented Aug 23, 2023

Hello @gulien , first of all thank you for this awesome project.

Following Semantic versioning, a minor release is when you add functionality in a backward compatible manner, which is not exactly the case here.
Even a patch version doesn't make much sense since Gotenberg's code hasn't really changed.

It's quite common for docker images to be built on schedule without bumping the version, In fact it's even better to re-build all the previous (supported) versions on regular basis.

@gulien
Copy link
Collaborator

gulien commented Aug 23, 2023

Sorry, I meant a PATCH release 😬 I understand why it would make sense in some projects, but Gotenberg relies heavily on its dependencies. That’s why I tend to consider that the dependencies in the Docker image are part of the semantic versioning.

@ansnoussi
Copy link
Author

ansnoussi commented Aug 23, 2023

I understand your point. And ultimately, there could be a system with :

  • stable tag for the minor and major versions ( images tagged with 7, 7.5 , 7.6, ... will keep getting updated)
  • unique tag for minor versions ( images tagged with 7.5.1 , 7.5.2, ... will not get any updates)

I made the change so there is a someway to keep getting security updates without using the latest tag which could introduce a breaking change (major version bump).

PS: I do know that Gotenberg should not be public-facing, but this keeps triggering automated security alerts, which I believe should be the case for other users too.

@gulien
Copy link
Collaborator

gulien commented Aug 30, 2023

Thanks @ansnoussi and sorry for the delay.

I’m still not convinced of the actual implementation. When a bug comes, it’s often great to know the exact version that is affected. If we auto-update 7 version, the startup message will still show 7.9.1.

IMO, I do think having a dedicated patch release is a better option in our context.

@ansnoussi
Copy link
Author

ansnoussi commented Aug 30, 2023

@gulien I do understand your hesitation, but I think the issue you are talking about can be fixed in 2 ways :

  • having automated tests done on the built image : best solution IMO but takes time/effort to put in place.
  • fixing all dependencies versions down to minor release versions so make sure no breaking change is introduced by any dependency : an overall best practice and should be done even if you implement the first solution.

From my POV, having regular updates is mandatory to fix security findings, but releasing a patch version with each re-build of the image is not perfect :

  • if there were no updates to any dependency/base image => you would have many patch versions that are exactly the same, and it would be costly.
  • I don't see a scenario where someone would rather use an old version with the exact gotenberg api, but vulnerable base image / dependencies.
  • users who want to always have the latest patches will have to update their infra each week.

I think to help you make a decision, you can take a look at other OS projects with nightly docker image updates :

@stale
Copy link

stale bot commented Sep 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 16, 2023
@gulien gulien added enhancement New feature or request maybe and removed wontfix This will not be worked on labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maybe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants