Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Keep your dependencies in check

Keep your dependencies in check

If Log4Shell, Spring4Shell, etc. have taught us anything, it’s that we need to keep our dependencies up to date. But updating our applications can take a lot of time. How do we stay on top of that, while also continuing to deliver business value?

Luckily, there are plenty of tools that can help us with this, from package managers to bots that can automatically create changes on our repositories. Let’s go over some of the different options, so we can make informed choices about what’s best for us in a particular situation.

Marit van Dijk

May 10, 2023

More Decks by Marit van Dijk

Other Decks in Programming


  1. Keep your dependencies in check DevOxx UK - May 10-12,

    2023 https://maritvandijk.com/ @MaritvanDijk77
  2. Gradle • Add plugin, e.g. gradle-versions-plugin • Run `./gradlew dependencyUpdates`

    @MaritvanDijk77 https://github.com/ben-manes/gradle-versions-plugin
  3. Gradle • Analyze dependencies • Add plugin (e.g. nebula) @MaritvanDijk77

  4. IntelliJ IDEA: Update dependencies • Context Actions (⌥ ⏎ or

    Alt+Enter) @MaritvanDijk77 https://www.jetbrains.com/help/idea/package-search.html
  5. IntelliJ IDEA • Hover (or Context Actions (⌥ ⏎ or

    Alt+Enter) @MaritvanDijk77 https://www.jetbrains.com/help/idea/package-search.html
  6. Pros & Cons + Check dependencies while working on the

    project - Check out each individual project - Apply & verify updates @MaritvanDijk77
  7. SCA: Pros & Cons + No need to check out

    repos individually - I have to check the dashboard - Apply & verify updates @MaritvanDijk77
  8. Dependabot • GitHub native • Features: • Alerts • Security

    updates • Version updates @MaritvanDijk77
  9. Dependabot version updates • Add dependabot.yml • Specify: • Package

    manager & location of manifest file • Schedule interval (daily, weekly, or monthly) • Optional: • Max. number of PR's (default 5) • Rebase strategy • Etc @MaritvanDijk77 https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates
  10. Renovate • Available via GitHub App • Features: • Security

    updates • Version updates • Project dashboard @MaritvanDijk77
  11. Renovate configuration • All repos or selected repos • Config

    file is created for you • Scheduling • Max. number of PR's / concurrent branches • Rule based auto merge • More options & more fine-grained @MaritvanDijk77 https://docs.renovatebot.com/configuration-options/
  12. Renovate: Supported platforms • GitHub (.com and Enterprise Server) •

    GitLab (.com and CE/EE) • Bitbucket Cloud • Bitbucket Server • Azure DevOps • AWS CodeCommit • Gitea @MaritvanDijk77 https://docs.renovatebot.com/#supported-platforms
  13. Snyk Open Source • Available via Snyk • Features: •

    Security updates • Version updates • Test for new vulnerabilities (on PRs) • Test for vulnerabilities in source code • Dashboards @MaritvanDijk77 https://snyk.io/
  14. Snyk Open Source Configuration • Frequency (daily, weekly, never) •

    Enable/disable: New and/or known vulnerabilities • Enable/disable PR's for single project @MaritvanDijk77 https://docs.snyk.io/products/snyk-open-source/open-source-basics
  15. Snyk Open Source: Supported Platforms • GitHub • GitHub Enterprise

    • GitHub Read-only projects • Bitbucket Cloud Personal Access Token (Legacy) • Bitbucket Cloud App • Bitbucket Data Center/Server • GitLab • Azure Repos @MaritvanDijk77 https://docs.snyk.io/integrations/git-repository-scm-integrations
  16. Bots: Pros & Cons + Relatively easy to install +

    Automatic PR's - Can create "noise" - Manage PRs (merge & deploy) - No code changes (if needed) @MaritvanDijk77
  17. Error Prone • Static analysis tool for Java that catches

    common programming mistakes at compile-time. • Maven, Gradle, etc. • IntelliJ IDEA / Eclipse plugin, Command line • Bug patterns • Report or fix • Custom checks • Includes Refaster: refactor code using before-and-after templates @MaritvanDijk77 https://errorprone.info/
  18. OpenRewrite • Source code refactoring for framework migrations, vulnerability patches,

    and API migrations • Early focus on Java • Kotlin - early support, actively developed • Groovy - focus on Gradle dependency manipulation, works on most Groovy source code too • Python • JavaScript - in development, not released yet @MaritvanDijk77 https://docs.openrewrite.org/