exasol / project-keeper

This maven plugin checks and unifies a project's structure according to the Exasol integration team's repository standards.
MIT License
3 stars 1 forks source link

Dependency upgrade process #515

Closed kaklakariada closed 7 months ago

kaklakariada commented 8 months ago

Goal

Speedup process for fixing vulnerabilities in third party dependencies.

Implementation

When the dependencies_check.yml workflow finds new vulnerabilities in dependencies it will trigger another GitHub workflow. This new workflow will upgrade all dependencies to their latest versions.

Input

We add a new update-dependencies mode to PK that gets an optional parameter. This parameter describes:

Process

  1. Create new branch if main branch is checked out currently
  2. Read version from pom, increment patch version and set version in pom using maven version plugin.
  3. Update project-keeper version in pom
  4. Update dependencies via mvn versions:use-latest-releases && mvn versions:update-properties, see update-properties & use-latest-releases
  5. Run PK fix
  6. Update changelog if vulnerability details are available:
    • release date = today
    • Code name: Fix vulnerabilities CVE-.... in dependency ...
    • Summary: This release fixes the following vulnerabilities: ...
    • Changes: # Security * #... Fixed CVE-... in dependency ...
  7. Commit to new branch & push it
  8. Create a pull request with "Closes #..." comment
### Tasks
- [x] Add requirements & design
- [x] Document `upgrade-dependencies` mode
- [x] Document how to exclude dependencies from upgrading using `versions-maven-plugin`'s [excludesList](https://www.mojohaus.org/versions/versions-maven-plugin/use-latest-releases-mojo.html#excludesList)
- [x] Add `upgrade-dependencies.yml` GH workflow (manually triggered) that launches PK `upgrade-dependencies`.

Open questions

Delimitations / out-of-scope

pj-spoelders commented 8 months ago

I don't know if you kept this in mind, but another nice thing would be to manually be able to batch update projects' multiple dependencies when we release something, eg in case of virtual-schema-common-jdbc being updated .. I'm not sure if that's out of scope or not.

ckunki commented 8 months ago

Review effort .2

kaklakariada commented 7 months ago

Effort: ~8pd